Title: | A Test Library |
---|---|
Description: | Documents the features of the 'r6-generator-maven-plugin' by providing an example of an R package automatically generated from Java code by the plugin. It is not intended to be useful beyond testing, demonstrating and documenting the features of the r6 generator plugin. |
Authors: | Rob Challen [aut, cre], terminological [aut], Rob Challen [aut] |
Maintainer: | Rob Challen <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.1.0 |
Built: | 2024-12-12 04:29:00 UTC |
Source: | https://github.com/terminological/r6-generator-docs |
Documents the features of the 'r6-generator-maven-plugin' by providing an example of an R package automatically generated from Java code by the plugin. It is not intended to be useful beyond testing, demonstrating and documenting the features of the r6 generator plugin.
Version: 1.1.0
Classes:
JavaApi
MinimalExample
BounceTest
FeatureTest
MoreFeatureTest
FactoryTest
Serialiser
Rob Challen [email protected]
Rob Challen [email protected] 0000-0002-5504-7768
terminological
Cancel an asynchronous operation by id.
.background_cancel(id)
.background_cancel(id)
id |
the id from '.background_status()' |
nothing, called for side effects
Cancel all asynchronous operations.
.background_cancel_all()
.background_cancel_all()
nothing, called for side effects
Get a background task from the '.background_status()' list and wrap it in an R6 RFuture class. This
.background_get_by_id(id)
.background_get_by_id(id)
id |
the id from '.background_status()' |
an RFuture
Print any asynchronous java function calls that are in progress, complete or cancelled. The function returns a thread id which may be used to retrieve the thread itself
.background_status()
.background_status()
a maybe empty dataframe with 'id' and 'status' columns
Remove all processed and cancelled aync operations from the status list. This will potentially free up some system resources
.background_tidy_up()
.background_tidy_up()
nothing, called for side effects
no description
async_factory()
async_factory()
an 'RFuture' with methods 'cancel()', 'isCancelled()', 'isDone()' and 'get()'. The result of a 'get()' call will be an R6 FactoryTest object:
no description
async_static_countdown( label, rtimer )
async_static_countdown( label, rtimer )
label |
label - (java expects a RCharacter) |
rtimer |
rtimer - (java expects a RInteger) |
an 'RFuture' with methods 'cancel()', 'isCancelled()', 'isDone()' and 'get()'. The result of a 'get()' call will be an RCharacter:
missing description
Version: 1.1.0
Generated: 2024-05-16T16:22:15.451498127
no details
instance$clone()
instance$print()
new()
the default no-args constructor
J = testRapi::JavaApi$get() instance = J$BounceTest$new();
none
the new R6 BounceTest object
bounceNull()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceNull(x)
- (java expects a RNull)
RNull:
bounceVoid()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceVoid()
none
void:
bounceString()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceString(x)
- (java expects a String)
String:
bounceCharacter()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceCharacter(x)
- (java expects a RCharacter)
RCharacter:
bounceCharacterVector()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceCharacterVector(x)
- (java expects a RCharacterVector)
RCharacterVector:
bounceDouble()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceDouble(x)
- (java expects a double)
double:
bounceNumeric()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceNumeric(x)
- (java expects a RNumeric)
RNumeric:
bounceNumericVector()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceNumericVector(x)
- (java expects a RNumericVector)
RNumericVector:
bounceInt()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceInt(x)
- (java expects a int)
int:
bounceInteger()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceInteger(x)
- (java expects a RInteger)
RInteger:
bounceIntegerVector()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceIntegerVector(x)
- (java expects a RIntegerVector)
RIntegerVector:
bounceFactor()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceFactor(x)
- (java expects a RFactor)
RFactor:
bounceFactorVector()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceFactorVector(x)
- (java expects a RFactorVector)
RFactorVector:
bounceDate()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceDate(x)
- (java expects a RDate)
RDate:
bounceDateVector()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceDateVector(x)
- (java expects a RDateVector)
RDateVector:
bounceLogical()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceLogical(x)
- (java expects a RLogical)
RLogical:
bounceLogicalVector()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceLogicalVector(x)
- (java expects a RLogicalVector)
RLogicalVector:
bounceFile()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceFile(x)
- (java expects a RFile)
RFile:
bounceDataframe()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceDataframe(x)
- (java expects a RDataframe)
RDataframe:
bounceList()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceList(x)
- (java expects a RList)
RList:
bounceNamedList()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceNamedList(x)
- (java expects a RNamedList)
RNamedList:
bounceArray()
no title
J = testRapi::JavaApi$get() instance = J$BounceTest$new(); instance$bounceArray(x)
- (java expects a RNumericArray)
RNumericArray:
## ----------------------------------- ## Construct new instance of BounceTest ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$BounceTest$new() ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNull(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNull(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceVoid()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceVoid() ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceString(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceString(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceCharacter(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceCharacter(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceCharacterVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceCharacterVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDouble(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDouble(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNumeric(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNumeric(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNumericVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNumericVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceInt(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceInt(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceInteger(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceInteger(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceIntegerVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceIntegerVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceFactor(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceFactor(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceFactorVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceFactorVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDate(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDate(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDateVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDateVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceLogical(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceLogical(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceLogicalVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceLogicalVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceFile(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceFile(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDataframe(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDataframe(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceList(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceList(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNamedList(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNamedList(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceArray(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceArray(x) ## End(Not run)
## ----------------------------------- ## Construct new instance of BounceTest ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$BounceTest$new() ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNull(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNull(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceVoid()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceVoid() ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceString(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceString(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceCharacter(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceCharacter(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceCharacterVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceCharacterVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDouble(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDouble(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNumeric(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNumeric(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNumericVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNumericVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceInt(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceInt(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceInteger(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceInteger(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceIntegerVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceIntegerVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceFactor(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceFactor(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceFactorVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceFactorVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDate(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDate(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDateVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDateVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceLogical(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceLogical(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceLogicalVector(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceLogicalVector(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceFile(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceFile(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceDataframe(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceDataframe(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceList(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceList(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceNamedList(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceNamedList(x) ## End(Not run) ## ----------------------------------- ## Method `BounceTest$bounceArray(x)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$bounceArray(x) ## End(Not run)
no description
collider.feature_test( message1, message2 )
collider.feature_test( message1, message2 )
message1 |
message1 - (java expects a RCharacter) |
message2 |
message2 - (java expects a RCharacter) |
RCharacter:
no description
collider.more_feature_test( message1, message2 )
collider.more_feature_test( message1, message2 )
message1 |
message1 - (java expects a RCharacter) |
message2 |
message2 - (java expects a RCharacter) |
RCharacter:
library(testthat) tmp = collider.more_feature_test('should ','work') expect_equal(tmp,'more feature test: should work')
library(testthat) tmp = collider.more_feature_test('should ','work') expect_equal(tmp,'more feature test: should work')
no description
concat( message1, message2 )
concat( message1, message2 )
message1 |
message1 - (java expects a RCharacter) |
message2 |
message2 - (java expects a RCharacter) |
RCharacter:
no description
create( message1, message2 )
create( message1, message2 )
message1 |
message1 - the message to be printed - (java expects a RCharacter) |
message2 |
message2 - will be used for toString - (java expects a RCharacter) |
R6 MoreFeatureTest object: A MoreFeatureTest R6 object
J = JavaApi$get() J$MoreFeatureTest$create('Hello,',' World')
J = JavaApi$get() J$MoreFeatureTest$create('Hello,',' World')
These are accessed through the root of the R api, and as a functional interface
demo_static( message )
demo_static( message )
message |
message a message - (java expects a String) |
void:
J = JavaApi$get() J$FeatureTest$demoStatic('Ola, el mundo') demo_static('Bonjour, le monde')
J = JavaApi$get() J$FeatureTest$demoStatic('Ola, el mundo') demo_static('Bonjour, le monde')
no description
deserialise_dataframe( filename )
deserialise_dataframe( filename )
filename |
filename - (java expects a String) |
RDataframe:
no description
deserialise_list( filename )
deserialise_list( filename )
filename |
filename - (java expects a String) |
RList:
no description
deserialise_named_list( filename )
deserialise_named_list( filename )
filename |
filename - (java expects a String) |
RNamedList:
A copy serialised into java, using RObject.writeRDS, saved within the jar file of the package, and exposed here using RObject.readRDS.
diamonds()
diamonds()
RDataframe: the ggplot2::diamonds dataframe
dplyr::glimpse( diamonds() )
dplyr::glimpse( diamonds() )
missing description
Version: 1.1.0
Generated: 2024-05-16T16:22:15.487711497
no details
instance$clone()
instance$print()
new()
the default no-args constructor
J = testRapi::JavaApi$get() instance = J$FactoryTest$new();
none
the new R6 FactoryTest object
generateCharacter()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateCharacter()
none
RCharacter:
generateNumeric()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateNumeric()
none
RNumeric:
generateInteger()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateInteger()
none
RInteger:
generateFactor()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateFactor()
none
RFactor:
generateLogical()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateLogical()
none
RLogical:
generateCharacterVec()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateCharacterVec()
none
RCharacterVector:
generateNumericVec()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateNumericVec()
none
RNumericVector:
generateIntegerVec()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateIntegerVec()
none
RIntegerVector:
generateFactorVec()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateFactorVec()
none
RFactorVector:
generateLogicalVec()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateLogicalVec()
none
RLogicalVector:
generateDataframe()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateDataframe()
none
RDataframe:
generateStreamDataframe()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateStreamDataframe()
none
RDataframe:
generateList()
Lists are much harder to type check than vectors hence RList builder methods throw checked exceptions
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateList()
none
RList: a RList containing the supplied Java objects converted into RObjects
generateNamedList()
no title
J = testRapi::JavaApi$get() instance = J$FactoryTest$new(); instance$generateNamedList()
none
RNamedList:
## ----------------------------------- ## Construct new instance of FactoryTest ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$FactoryTest$new() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateCharacter()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateCharacter() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateNumeric()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateNumeric() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateInteger()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateInteger() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateFactor()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateFactor() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateLogical()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateLogical() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateCharacterVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateCharacterVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateNumericVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateNumericVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateIntegerVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateIntegerVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateFactorVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateFactorVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateLogicalVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateLogicalVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateDataframe()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateDataframe() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateStreamDataframe()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateStreamDataframe() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateList()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateList() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateNamedList()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateNamedList() ## End(Not run)
## ----------------------------------- ## Construct new instance of FactoryTest ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$FactoryTest$new() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateCharacter()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateCharacter() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateNumeric()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateNumeric() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateInteger()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateInteger() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateFactor()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateFactor() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateLogical()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateLogical() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateCharacterVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateCharacterVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateNumericVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateNumericVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateIntegerVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateIntegerVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateFactorVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateFactorVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateLogicalVec()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateLogicalVec() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateDataframe()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateDataframe() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateStreamDataframe()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateStreamDataframe() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateList()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateList() ## End(Not run) ## ----------------------------------- ## Method `FactoryTest$generateNamedList()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateNamedList() ## End(Not run)
A test of the R6 generator templating
Version: 1.1.0
Generated: 2024-05-16T16:22:15.462768704
logMessage |
logMessage - a message which will be logged - (java expects a String) |
The feature test should allow mathjax in javadoc
$$e = mc^2$$
this is a details comment
instance$clone()
instance$print()
new()
A maximum of one constructor of any signature can be used.
If different constructors are needed then they may be used but not included in the R Api (i.e. not annotated with @RMethod.)
Static factory methods can be used instead.
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage);
- (java expects a String)
the new R6 FeatureTest object
library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() minExample = J$FeatureTest$new('Hello from Java constructor!')
doHelloWorld()
A hello world function
More detailed description
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$doHelloWorld()
none
RCharacter: this java method returns a String
library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() minExample = J$FeatureTest$new('Hello, R World!') minExample$doHelloWorld()
doSum()
Add some numbers (1).
The doSum function description = it adds two numerics
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$doSum(a, b)
- (java expects a RNumeric)
- (java expects a RNumeric)
RNumeric: A+B of course, NAs in inputs are converted to null in Java. This catches the resulting NPE in java idiom and returns an explicit NA. This only matters if you care about the difference between NA_real_ and NaN in R.
library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() library(testthat) minExample = J$FeatureTest$new('Hello from Java constructor!') result = minExample$doSum(2,7.5) testthat::expect_equal(result,9.5)
doSum2()
Adds some numbers
Do sum 2 uses native ints rather than RNumerics It should throw an error if given something that cannot be coerced to an integer. This also demonstrated the use of the '@RDefault' annotation
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$doSum2(a, b)
- (java expects a int)
- (java expects a int)
int: A+B of course
getMessage()
Get the message
message desciption
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$getMessage()
none
RCharacter: The message (previously set by the constructor)
fluentSetMessage()
Set a message in a fluent way
A fluent method which updates the message in this object, returning the same object. This is differentiated from factory methods which produce a new instance of the same class by checking to see if the returned Java object is equal to the calling Java object.
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$fluentSetMessage(message)
- (java expects a RCharacter)
R6 FeatureTest object: this should return exactly the same R6 object.
factoryMethod()
A factory or builder method which constructs an object of another class from some parameters
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$factoryMethod(a, b)
- (java expects a RCharacter)
- (java expects a RCharacter)
R6 MoreFeatureTest object: A MoreFeatureTest R6 reference
objectAsParameter()
no title
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$objectAsParameter(otherObj)
- (java expects a MoreFeatureTest)
String:
doSomethingWithDataFrame()
Consumes a data frame and logs its length
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$doSomethingWithDataFrame(dataframe)
- (java expects a RDataframe)
void:
generateDataFrame()
Creates a basic dataframe and returns it
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$generateDataFrame()
none
RDataframe: a daatframe
errorThrower()
Throws an error
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$errorThrower()
none
void:
asyncCountdown()
no title
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$asyncCountdown()
none
RCharacter:
asyncRaceCountdown()
no title
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$asyncRaceCountdown()
none
RCharacter:
blockingCountdown()
no title
J = testRapi::JavaApi$get() instance = J$FeatureTest$new(logMessage); instance$blockingCountdown()
none
RCharacter:
## ----------------------------------- ## Construct new instance of FeatureTest ## ----------------------------------- library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() minExample = J$FeatureTest$new('Hello from Java constructor!') ## ----------------------------------- ## Method `FeatureTest$doHelloWorld()` ## ----------------------------------- library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() minExample = J$FeatureTest$new('Hello, R World!') minExample$doHelloWorld() ## ----------------------------------- ## Method `FeatureTest$doSum(a, b)` ## ----------------------------------- library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() library(testthat) minExample = J$FeatureTest$new('Hello from Java constructor!') result = minExample$doSum(2,7.5) testthat::expect_equal(result,9.5) ## ----------------------------------- ## Method `FeatureTest$doSum2(a, b)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$doSum2(a, b) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$getMessage()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$getMessage() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$fluentSetMessage(message)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$fluentSetMessage(message) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$factoryMethod(a, b)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$factoryMethod(a, b) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$objectAsParameter(otherObj)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$objectAsParameter(otherObj) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$doSomethingWithDataFrame(dataframe)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$doSomethingWithDataFrame(dataframe) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$generateDataFrame()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateDataFrame() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$errorThrower()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$errorThrower() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$asyncCountdown()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$asyncCountdown() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$asyncRaceCountdown()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$asyncRaceCountdown() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$blockingCountdown()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$blockingCountdown() ## End(Not run)
## ----------------------------------- ## Construct new instance of FeatureTest ## ----------------------------------- library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() minExample = J$FeatureTest$new('Hello from Java constructor!') ## ----------------------------------- ## Method `FeatureTest$doHelloWorld()` ## ----------------------------------- library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() minExample = J$FeatureTest$new('Hello, R World!') minExample$doHelloWorld() ## ----------------------------------- ## Method `FeatureTest$doSum(a, b)` ## ----------------------------------- library(roxygen2) library(devtools) library(here) library(tidyverse) library(ggplot2) library(readr) library(dplyr) library(tibble) J = JavaApi$get() library(testthat) minExample = J$FeatureTest$new('Hello from Java constructor!') result = minExample$doSum(2,7.5) testthat::expect_equal(result,9.5) ## ----------------------------------- ## Method `FeatureTest$doSum2(a, b)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$doSum2(a, b) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$getMessage()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$getMessage() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$fluentSetMessage(message)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$fluentSetMessage(message) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$factoryMethod(a, b)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$factoryMethod(a, b) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$objectAsParameter(otherObj)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$objectAsParameter(otherObj) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$doSomethingWithDataFrame(dataframe)` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$doSomethingWithDataFrame(dataframe) ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$generateDataFrame()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$generateDataFrame() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$errorThrower()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$errorThrower() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$asyncCountdown()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$asyncCountdown() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$asyncRaceCountdown()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$asyncRaceCountdown() ## End(Not run) ## ----------------------------------- ## Method `FeatureTest$blockingCountdown()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$blockingCountdown() ## End(Not run)
Documents the features of the 'r6-generator-maven-plugin' by providing an example of an R package automatically generated from Java code by the plugin. It is not intended to be useful beyond testing, demonstrating and documenting the features of the r6 generator plugin.
Version: 1.1.0
Generated: 2024-05-16T16:22:15.382427434
logLevel |
optional - the slf4j log level as a string - one of OFF (most specific, no logging), FATAL (most specific, little data), ERROR, WARN, INFO, DEBUG, TRACE (least specific, a lot of data), ALL (least specific, all data) |
J = testRapi::JavaApi$get(logLevel)
JavaApi$installDependencies()
This package level method checks for, and installs any dependencies needed for the running of the package. It is called automatically on first package load and so in general does not need to be used directly.
testRapi::JavaApi$installDependencies()
none
nothing. called for side effects.
JavaApi$rebuildDependencies()
This package level method removes existing dependencies and re-installs dependencies needed for the running of the package. It is called automatically on first package load and so in general does not need to be called.
testRapi::JavaApi$rebuildDependencies()
none
nothing. called for side effects.
JavaApi$versionInformation()
This package level method returns debugging version information for the package
testRapi::JavaApi$versionInformation()
none
A list containing a set of versioning information about this package.
JavaApi$get()
This is the main entry point for the package and the root of the Java API in this package. All classes defined in the package are made available as items under this root. The JavaApi object manages the communication between R and Java.
J = testRapi::JavaApi$get() # package classes and functions are nested under the `J` api object.
The desired verbosity of the package. One of "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "ALL".
A R6 testRapi::JavaApi object containing the access point to the objects and functions defined in this package
J$changeLogLevel(logLevel)
Once the package is initialised the log level can be changed to increase the level of messages from the api.
J = testRapi::JavaApi$get() J$changeLogLevel("DEBUG")
The desired verbosity of the package. One of "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "ALL".
nothing. used for side effects.
J$reconfigureLog(log4jproperties)
Experimental / Advanced use: Once the package is initialised the log configureation can be changed to log to an external file for example.
J = testRapi::JavaApi$get() prp = fs::path(getwd(),"log4j.properties") if (fs::file_exists(prp)) { J$changeLogLevel(prp) }
a full path to a log4jproperies file
nothing. used for side effects.
J$printMessages()
Experimental / Internal use: Messages from Java to R are queued and printed after each function call. It is unlikely that any will be not printed so in normal circumstances this function should do nothing.
J = testRapi::JavaApi$get() J$printMessages()
none
nothing. used for side effects.
MinimalExample$new()
the default no-args constructor
J = testRapi::JavaApi$get() J$MinimalExample$new()
none
R6 MinimalExample object:
BounceTest$new()
the default no-args constructor
J = testRapi::JavaApi$get() J$BounceTest$new()
none
R6 BounceTest object:
FeatureTest$new()
A maximum of one constructor of any signature can be used.
If different constructors are needed then they may be used but not included in the R Api (i.e. not annotated with @RMethod.)
Static factory methods can be used instead.
J = testRapi::JavaApi$get() J$FeatureTest$new(logMessage)
- (java expects a String)
R6 FeatureTest object:
minExample = J$FeatureTest$new('Hello from Java constructor!')
FeatureTest$demoStatic()
Static methods are also supported.
These are accessed through the root of the R api, and as a functional interface
J = testRapi::JavaApi$get() J$FeatureTest$demoStatic(message) # this method is also exposed as a package function: testRapi::demo_static(message)
- (java expects a String)
void:
J = JavaApi$get() J$FeatureTest$demoStatic('Ola, el mundo') demo_static('Bonjour, le monde')
FeatureTest$diamonds()
The ggplot2::diamonds dataframe
A copy serialised into java, using RObject.writeRDS, saved within the jar file of the package, and exposed here using RObject.readRDS.
J = testRapi::JavaApi$get() J$FeatureTest$diamonds() # this method is also exposed as a package function: testRapi::diamonds()
none
RDataframe: the ggplot2::diamonds dataframe
dplyr::glimpse( diamonds() )
FeatureTest$collider()
no title
J = testRapi::JavaApi$get() J$FeatureTest$collider(message1, message2) # this method is also exposed as a package function: testRapi::collider.feature_test(message1, message2)
- (java expects a RCharacter)
- (java expects a RCharacter)
RCharacter:
FeatureTest$asyncStaticCountdown()
no title
J = testRapi::JavaApi$get() J$FeatureTest$asyncStaticCountdown(label, rtimer) # this method is also exposed as a package function: testRapi::async_static_countdown(label, rtimer)
- (java expects a RCharacter)
- (java expects a RInteger)
An 'RFuture' with methods 'cancel()', 'isCancelled()', 'isDone()' and 'get()'. The result of a 'get()' call will be an RCharacter:
FeatureTest$asyncFactory()
no title
J = testRapi::JavaApi$get() J$FeatureTest$asyncFactory() # this method is also exposed as a package function: testRapi::async_factory()
none
An 'RFuture' with methods 'cancel()', 'isCancelled()', 'isDone()' and 'get()'. The result of a 'get()' call will be an R6 FactoryTest object:
MoreFeatureTest$new()
the first constructor is used if there are none annotated
J = testRapi::JavaApi$get() J$MoreFeatureTest$new(message1, message2)
- (java expects a RCharacter)
- (java expects a RCharacter)
R6 MoreFeatureTest object:
MoreFeatureTest$create()
A static object constructor
J = testRapi::JavaApi$get() J$MoreFeatureTest$create(message1, message2) # this method is also exposed as a package function: testRapi::create(message1, message2)
- (java expects a RCharacter)
- (java expects a RCharacter)
R6 MoreFeatureTest object: A MoreFeatureTest R6 object
J = JavaApi$get() J$MoreFeatureTest$create('Hello,',' World')
MoreFeatureTest$concat()
no title
J = testRapi::JavaApi$get() J$MoreFeatureTest$concat(message1, message2) # this method is also exposed as a package function: testRapi::concat(message1, message2)
- (java expects a RCharacter)
- (java expects a RCharacter)
RCharacter:
MoreFeatureTest$collider()
no title
J = testRapi::JavaApi$get() J$MoreFeatureTest$collider(message1, message2) # this method is also exposed as a package function: testRapi::collider.more_feature_test(message1, message2)
- (java expects a RCharacter)
- (java expects a RCharacter)
RCharacter:
library(testthat) tmp = collider.more_feature_test('should ','work') expect_equal(tmp,'more feature test: should work')
FactoryTest$new()
the default no-args constructor
J = testRapi::JavaApi$get() J$FactoryTest$new()
none
R6 FactoryTest object:
Serialiser$new()
the default no-args constructor
J = testRapi::JavaApi$get() J$Serialiser$new()
none
R6 Serialiser object:
Serialiser$serialiseDataframe()
no title
J = testRapi::JavaApi$get() J$Serialiser$serialiseDataframe(dataframe, filename) # this method is also exposed as a package function: testRapi::serialise_dataframe(dataframe, filename)
- (java expects a RDataframe)
- (java expects a String)
void:
Serialiser$deserialiseDataframe()
no title
J = testRapi::JavaApi$get() J$Serialiser$deserialiseDataframe(filename) # this method is also exposed as a package function: testRapi::deserialise_dataframe(filename)
- (java expects a String)
RDataframe:
Serialiser$serialiseList()
no title
J = testRapi::JavaApi$get() J$Serialiser$serialiseList(dataframe, filename) # this method is also exposed as a package function: testRapi::serialise_list(dataframe, filename)
- (java expects a RList)
- (java expects a String)
void:
Serialiser$deserialiseList()
no title
J = testRapi::JavaApi$get() J$Serialiser$deserialiseList(filename) # this method is also exposed as a package function: testRapi::deserialise_list(filename)
- (java expects a String)
RList:
Serialiser$serialiseNamedList()
no title
J = testRapi::JavaApi$get() J$Serialiser$serialiseNamedList(dataframe, filename) # this method is also exposed as a package function: testRapi::serialise_named_list(dataframe, filename)
- (java expects a RNamedList)
- (java expects a String)
void:
Serialiser$deserialiseNamedList()
no title
J = testRapi::JavaApi$get() J$Serialiser$deserialiseNamedList(filename) # this method is also exposed as a package function: testRapi::deserialise_named_list(filename)
- (java expects a String)
RNamedList:
## ----------------------------------- ## Check library dependencies for testRapi ## ----------------------------------- testRapi::JavaApi$installDependencies() ## ----------------------------------- ## Construct a testRapi Java API instance ## ----------------------------------- J = testRapi::JavaApi$get() # or a more verbose configuration # J = testRapi::JavaApi$get("DEBUG") ## ----------------------------------- ## Method `J$MinimalExample$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$MinimalExample$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$BounceTest$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$BounceTest$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$FeatureTest$new(...)` ## ----------------------------------- minExample = J$FeatureTest$new('Hello from Java constructor!') ## ----------------------------------- ## Method `J$FeatureTest$demoStatic(...)` ## Aliased as `testRapi::demo_static(...)` ## ----------------------------------- J = JavaApi$get() J$FeatureTest$demoStatic('Ola, el mundo') demo_static('Bonjour, le monde') ## ----------------------------------- ## Method `J$FeatureTest$diamonds(...)` ## Aliased as `testRapi::diamonds(...)` ## ----------------------------------- dplyr::glimpse( diamonds() ) ## ----------------------------------- ## Method `J$FeatureTest$collider(...)` ## Aliased as `testRapi::collider.feature_test(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FeatureTest$collider(message1, message2) # or alternatively: testRapi::collider.feature_test(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `J$FeatureTest$asyncStaticCountdown(...)` ## Aliased as `testRapi::async_static_countdown(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FeatureTest$asyncStaticCountdown(label, rtimer) # or alternatively: testRapi::async_static_countdown(label, rtimer) ## End(Not run) ## ----------------------------------- ## Method `J$FeatureTest$asyncFactory(...)` ## Aliased as `testRapi::async_factory(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FeatureTest$asyncFactory() # or alternatively: testRapi::async_factory() ## End(Not run) ## ----------------------------------- ## Method `J$MoreFeatureTest$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$MoreFeatureTest$new(message1, message2) # or alternatively: testRapi::new(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `J$MoreFeatureTest$create(...)` ## Aliased as `testRapi::create(...)` ## ----------------------------------- J = JavaApi$get() J$MoreFeatureTest$create('Hello,',' World') ## ----------------------------------- ## Method `J$MoreFeatureTest$concat(...)` ## Aliased as `testRapi::concat(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$MoreFeatureTest$concat(message1, message2) # or alternatively: testRapi::concat(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `J$MoreFeatureTest$collider(...)` ## Aliased as `testRapi::collider.more_feature_test(...)` ## ----------------------------------- library(testthat) tmp = collider.more_feature_test('should ','work') expect_equal(tmp,'more feature test: should work') ## ----------------------------------- ## Method `J$FactoryTest$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FactoryTest$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$serialiseDataframe(...)` ## Aliased as `testRapi::serialise_dataframe(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$serialiseDataframe(dataframe, filename) # or alternatively: testRapi::serialise_dataframe(dataframe, filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$deserialiseDataframe(...)` ## Aliased as `testRapi::deserialise_dataframe(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$deserialiseDataframe(filename) # or alternatively: testRapi::deserialise_dataframe(filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$serialiseList(...)` ## Aliased as `testRapi::serialise_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$serialiseList(dataframe, filename) # or alternatively: testRapi::serialise_list(dataframe, filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$deserialiseList(...)` ## Aliased as `testRapi::deserialise_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$deserialiseList(filename) # or alternatively: testRapi::deserialise_list(filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$serialiseNamedList(...)` ## Aliased as `testRapi::serialise_named_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$serialiseNamedList(dataframe, filename) # or alternatively: testRapi::serialise_named_list(dataframe, filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$deserialiseNamedList(...)` ## Aliased as `testRapi::deserialise_named_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$deserialiseNamedList(filename) # or alternatively: testRapi::deserialise_named_list(filename) ## End(Not run)
## ----------------------------------- ## Check library dependencies for testRapi ## ----------------------------------- testRapi::JavaApi$installDependencies() ## ----------------------------------- ## Construct a testRapi Java API instance ## ----------------------------------- J = testRapi::JavaApi$get() # or a more verbose configuration # J = testRapi::JavaApi$get("DEBUG") ## ----------------------------------- ## Method `J$MinimalExample$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$MinimalExample$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$BounceTest$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$BounceTest$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$FeatureTest$new(...)` ## ----------------------------------- minExample = J$FeatureTest$new('Hello from Java constructor!') ## ----------------------------------- ## Method `J$FeatureTest$demoStatic(...)` ## Aliased as `testRapi::demo_static(...)` ## ----------------------------------- J = JavaApi$get() J$FeatureTest$demoStatic('Ola, el mundo') demo_static('Bonjour, le monde') ## ----------------------------------- ## Method `J$FeatureTest$diamonds(...)` ## Aliased as `testRapi::diamonds(...)` ## ----------------------------------- dplyr::glimpse( diamonds() ) ## ----------------------------------- ## Method `J$FeatureTest$collider(...)` ## Aliased as `testRapi::collider.feature_test(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FeatureTest$collider(message1, message2) # or alternatively: testRapi::collider.feature_test(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `J$FeatureTest$asyncStaticCountdown(...)` ## Aliased as `testRapi::async_static_countdown(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FeatureTest$asyncStaticCountdown(label, rtimer) # or alternatively: testRapi::async_static_countdown(label, rtimer) ## End(Not run) ## ----------------------------------- ## Method `J$FeatureTest$asyncFactory(...)` ## Aliased as `testRapi::async_factory(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FeatureTest$asyncFactory() # or alternatively: testRapi::async_factory() ## End(Not run) ## ----------------------------------- ## Method `J$MoreFeatureTest$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$MoreFeatureTest$new(message1, message2) # or alternatively: testRapi::new(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `J$MoreFeatureTest$create(...)` ## Aliased as `testRapi::create(...)` ## ----------------------------------- J = JavaApi$get() J$MoreFeatureTest$create('Hello,',' World') ## ----------------------------------- ## Method `J$MoreFeatureTest$concat(...)` ## Aliased as `testRapi::concat(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$MoreFeatureTest$concat(message1, message2) # or alternatively: testRapi::concat(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `J$MoreFeatureTest$collider(...)` ## Aliased as `testRapi::collider.more_feature_test(...)` ## ----------------------------------- library(testthat) tmp = collider.more_feature_test('should ','work') expect_equal(tmp,'more feature test: should work') ## ----------------------------------- ## Method `J$FactoryTest$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$FactoryTest$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$new(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$new() # or alternatively: testRapi::new() ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$serialiseDataframe(...)` ## Aliased as `testRapi::serialise_dataframe(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$serialiseDataframe(dataframe, filename) # or alternatively: testRapi::serialise_dataframe(dataframe, filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$deserialiseDataframe(...)` ## Aliased as `testRapi::deserialise_dataframe(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$deserialiseDataframe(filename) # or alternatively: testRapi::deserialise_dataframe(filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$serialiseList(...)` ## Aliased as `testRapi::serialise_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$serialiseList(dataframe, filename) # or alternatively: testRapi::serialise_list(dataframe, filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$deserialiseList(...)` ## Aliased as `testRapi::deserialise_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$deserialiseList(filename) # or alternatively: testRapi::deserialise_list(filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$serialiseNamedList(...)` ## Aliased as `testRapi::serialise_named_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$serialiseNamedList(dataframe, filename) # or alternatively: testRapi::serialise_named_list(dataframe, filename) ## End(Not run) ## ----------------------------------- ## Method `J$Serialiser$deserialiseNamedList(...)` ## Aliased as `testRapi::deserialise_named_list(...)` ## ----------------------------------- ## Not run: # no example given - appropriate parameter values must be provided: J$Serialiser$deserialiseNamedList(filename) # or alternatively: testRapi::deserialise_named_list(filename) ## End(Not run)
A very simple test
manualFunction()
manualFunction()
a string
This class is a very basic example of the features of the rJava maven plugin.
Version: 1.1.0
Generated: 2024-05-16T16:22:15.444089981
The class is annotated with an @RClass to identify it as part of the R API.
instance$clone()
instance$print()
new()
the default no-args constructor
J = testRapi::JavaApi$get() instance = J$MinimalExample$new();
none
the new R6 MinimalExample object
demo()
Documentation of the method can be done in JavaDoc and these will be present in the R documentation
J = testRapi::JavaApi$get() instance = J$MinimalExample$new(); instance$demo(dataframe, message)
- (java expects a RDataframe)
- (java expects a String)
RDataframe: the dataframe unchanged
J = JavaApi$get() minExample = J$MinimalExample$new() minExample$demo(dataframe=tibble::tibble(input=c(1, 2,3)), message='Hello world')
## ----------------------------------- ## Construct new instance of MinimalExample ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$MinimalExample$new() ## End(Not run) ## ----------------------------------- ## Method `MinimalExample$demo(dataframe, message)` ## ----------------------------------- J = JavaApi$get() minExample = J$MinimalExample$new() minExample$demo(dataframe=tibble::tibble(input=c(1, 2,3)), message='Hello world')
## ----------------------------------- ## Construct new instance of MinimalExample ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$MinimalExample$new() ## End(Not run) ## ----------------------------------- ## Method `MinimalExample$demo(dataframe, message)` ## ----------------------------------- J = JavaApi$get() minExample = J$MinimalExample$new() minExample$demo(dataframe=tibble::tibble(input=c(1, 2,3)), message='Hello world')
This has no documentation
Version: 1.1.0
Generated: 2024-05-16T16:22:15.480444175
message1 |
message1 - the message to be printed - (java expects a RCharacter) |
message2 |
message2 - will be used for toString - (java expects a RCharacter) |
This has no documentation
instance$clone()
instance$print()
new()
the first constructor is used if there are none annotated
J = testRapi::JavaApi$get() instance = J$MoreFeatureTest$new(message1, message2);
- (java expects a RCharacter)
- (java expects a RCharacter)
the new R6 MoreFeatureTest object
testLogging()
no title
J = testRapi::JavaApi$get() instance = J$MoreFeatureTest$new(message1, message2); instance$testLogging()
none
void:
throwCatchable()
no title
J = testRapi::JavaApi$get() instance = J$MoreFeatureTest$new(message1, message2); instance$throwCatchable()
none
RCharacter:
printMessage()
no title
J = testRapi::JavaApi$get() instance = J$MoreFeatureTest$new(message1, message2); instance$printMessage()
none
void:
throwRuntime()
no title
J = testRapi::JavaApi$get() instance = J$MoreFeatureTest$new(message1, message2); instance$throwRuntime()
none
RCharacter:
## ----------------------------------- ## Construct new instance of MoreFeatureTest ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$MoreFeatureTest$new(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$testLogging()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$testLogging() ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$throwCatchable()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$throwCatchable() ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$printMessage()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$printMessage() ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$throwRuntime()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$throwRuntime() ## End(Not run)
## ----------------------------------- ## Construct new instance of MoreFeatureTest ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$MoreFeatureTest$new(message1, message2) ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$testLogging()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$testLogging() ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$throwCatchable()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$throwCatchable() ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$printMessage()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$printMessage() ## End(Not run) ## ----------------------------------- ## Method `MoreFeatureTest$throwRuntime()` ## ----------------------------------- ## Not run: # appropriate parameter values must be provided instance$throwRuntime() ## End(Not run)
no description
serialise_dataframe( dataframe, filename )
serialise_dataframe( dataframe, filename )
dataframe |
dataframe - (java expects a RDataframe) |
filename |
filename - (java expects a String) |
void:
no description
serialise_list( dataframe, filename )
serialise_list( dataframe, filename )
dataframe |
dataframe - (java expects a RList) |
filename |
filename - (java expects a String) |
void:
no description
serialise_named_list( dataframe, filename )
serialise_named_list( dataframe, filename )
dataframe |
dataframe - (java expects a RNamedList) |
filename |
filename - (java expects a String) |
void:
Actually useful class which takes an R dataframe and a filename
Version: 1.1.0
Generated: 2024-05-16T16:22:15.497640740
string and serialises the dataframe so it can be used natively in java for testing purposes.
none
instance$clone()
instance$print()
new()
the default no-args constructor
J = testRapi::JavaApi$get() instance = J$Serialiser$new();
none
the new R6 Serialiser object
## ----------------------------------- ## Construct new instance of Serialiser ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$Serialiser$new() ## End(Not run)
## ----------------------------------- ## Construct new instance of Serialiser ## ----------------------------------- ## Not run: J = testRapi::JavaApi$get() # appropriate parameter values must be provided instance = J$Serialiser$new() ## End(Not run)