File: new.Rd

package info (click to toggle)
rjava 1.0-11-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,184 kB
  • sloc: java: 13,223; ansic: 5,479; sh: 3,776; xml: 325; makefile: 250; perl: 33
file content (33 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
\name{new}
\alias{new,jclassName-method}
\title{
  Create a new Java object
}
\description{
  Creates a new Java object and invokes the constructor with given arguments.
}
\section{Methods}{
  \describe{
    \item{\code{new}}{\code{signature(Class = "jclassName")}: ... }
  }
}
\details{
  The \code{new} method is used as the high-level API to create new
  Java objects (for low-level access see \code{\link{.jnew}}). It
  returns the newly created Java object.

  \code{...} arguments are passed to the constructor of the class
  specified as \code{J("class.name")}.
}
\seealso{
  \code{\link{.jnew}}, \code{\link{jclassName-class}}
}
\examples{
\dontrun{
v <- new(J("java.lang.String"), "Hello World!")
v$length()
v$indexOf("World")
names(v)
}
}
\keyword{interface}