Package software.amazon.jsii
Class JsiiObject
java.lang.Object
software.amazon.jsii.JsiiObject
- All Implemented Interfaces:
JsiiSerializable
Represents a JavaScript object in the Java world.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumUsed as a marker for bypassing native ctor chain. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJsiiObject(JsiiObject.InitializationMode initializationMode) A special constructor that allows creating wrapper objects while bypassing the normal constructor chain.protectedJsiiObject(JsiiObjectRef objRef) Used to construct a JSII object with a reference to an existing managed JSII node object. -
Method Summary
Modifier and TypeMethodDescriptionprotected final <T> TjsiiAsyncCall(String method, Class<T> returnType, @Nullable Object... args) Deprecated.protected final <T> TjsiiAsyncCall(String method, NativeType<T> nativeType, @Nullable Object... args) Deprecated.protected final <T> TDeprecated.protected final <T> TjsiiCall(String method, NativeType<T> nativeType, @Nullable Object... args) Deprecated.protected final <T> TDeprecated.useKernel.get(Object, String, NativeType)insteadprotected final <T> TjsiiGet(String property, NativeType<T> type) Deprecated.useKernel.get(Object, String, NativeType)insteadprotected final voidDeprecated.UseKernel.set(Object, String, Object)insteadprotected static <T> TjsiiStaticCall(Class<?> nativeClass, String method, Class<T> returnType, @Nullable Object... args) Deprecated.protected static <T> TjsiiStaticCall(Class<?> nativeClass, String method, NativeType<T> nativeType, @Nullable Object... args) Calls a static method.protected static <T> TjsiiStaticGet(Class<?> nativeClass, String property, Class<T> type) Deprecated.usejsiiStaticGet(Class, String, NativeType)insteadprotected static <T> TjsiiStaticGet(Class<?> nativeClass, String property, NativeType<T> type) Returns the value of a static property.protected static voidjsiiStaticSet(Class<?> nativeClass, String property, @Nullable Object value) Sets a value for a static property.protected static voidjsiiStaticSet(JsiiEngine engine, Class<?> nativeClass, String property, @Nullable Object value) Sets a value for a static property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
JsiiObject
A special constructor that allows creating wrapper objects while bypassing the normal constructor chain. This is used when an object was created in javascript-land and just needs a wrapper in native-land.- Parameters:
initializationMode- Must always be set to "JSII".
-
JsiiObject
Used to construct a JSII object with a reference to an existing managed JSII node object.- Parameters:
objRef- Reference to existing managed JSII node object.
-
-
Method Details
-
jsiiCall
@Nullable @Deprecated @Internal protected final <T> T jsiiCall(String method, Class<T> returnType, @Nullable @Nullable Object... args) Deprecated.Calls a JavaScript method on the object.- Type Parameters:
T- Java type for the return value.- Parameters:
method- The name of the method.returnType- The return type.args- Method arguments.- Returns:
- A return value.
-
jsiiCall
@Nullable @Deprecated @Internal protected final <T> T jsiiCall(String method, NativeType<T> nativeType, @Nullable @Nullable Object... args) Deprecated.Calls a JavaScript method on the object.- Type Parameters:
T- Java type for the return value.- Parameters:
method- The name of the method.nativeType- The return type.args- Method arguments.- Returns:
- A return value.
-
jsiiStaticCall
@Nullable @Deprecated @Internal protected static <T> T jsiiStaticCall(Class<?> nativeClass, String method, Class<T> returnType, @Nullable @Nullable Object... args) Deprecated.Calls a static method.- Type Parameters:
T- Return type.- Parameters:
nativeClass- The java class.method- The method to call.returnType- The return type.args- The method arguments.- Returns:
- Return value.
-
jsiiStaticCall
@Nullable @Internal protected static <T> T jsiiStaticCall(Class<?> nativeClass, String method, NativeType<T> nativeType, @Nullable @Nullable Object... args) Calls a static method.- Type Parameters:
T- Return type.- Parameters:
nativeClass- The java class.method- The method to call.nativeType- The return type.args- The method arguments.- Returns:
- Return value.
-
jsiiAsyncCall
@Nullable @Deprecated @Internal protected final <T> T jsiiAsyncCall(String method, Class<T> returnType, @Nullable @Nullable Object... args) Deprecated.Calls an async method on the object.- Type Parameters:
T- Java type for the return value.- Parameters:
method- The name of the method.returnType- The return type.args- Method arguments.- Returns:
- A return value.
-
jsiiAsyncCall
@Nullable @Internal protected final <T> T jsiiAsyncCall(String method, NativeType<T> nativeType, @Nullable @Nullable Object... args) Deprecated.Calls an async method on the object.- Type Parameters:
T- Java type for the return value.- Parameters:
method- The name of the method.nativeType- The return type.args- Method arguments.- Returns:
- A return value.
-
jsiiGet
Deprecated.useKernel.get(Object, String, NativeType)insteadGets a property value from the object.- Type Parameters:
T- The Java type of the property.- Parameters:
property- The property name.type- The Java type of the property.- Returns:
- The property value.
-
jsiiGet
Deprecated.useKernel.get(Object, String, NativeType)insteadGets a property value from the object.- Type Parameters:
T- The Java type of the property.- Parameters:
property- The property name.type- The Java type of the property.- Returns:
- The property value.
-
jsiiStaticGet
@Nullable @Deprecated @Internal protected static <T> T jsiiStaticGet(Class<?> nativeClass, String property, Class<T> type) Deprecated.usejsiiStaticGet(Class, String, NativeType)insteadReturns the value of a static property.- Type Parameters:
T- Return type- Parameters:
nativeClass- The java class.property- The name of the property.type- The expected java return type.- Returns:
- Return value
-
jsiiStaticGet
@Nullable @Internal protected static <T> T jsiiStaticGet(Class<?> nativeClass, String property, NativeType<T> type) Returns the value of a static property.- Type Parameters:
T- Return type- Parameters:
nativeClass- The java class.property- The name of the property.type- The expected java return type.- Returns:
- Return value
-
jsiiSet
@Deprecated @Internal protected final void jsiiSet(String property, @Nullable @Nullable Object value) Deprecated.UseKernel.set(Object, String, Object)insteadSets a property value of an object.- Parameters:
property- The name of the property.value- The property value.
-
jsiiStaticSet
@Internal protected static void jsiiStaticSet(Class<?> nativeClass, String property, @Nullable @Nullable Object value) Sets a value for a static property.- Parameters:
nativeClass- The java class.property- The name of the propertyvalue- The value
-
jsiiStaticSet
@Internal protected static void jsiiStaticSet(JsiiEngine engine, Class<?> nativeClass, String property, @Nullable @Nullable Object value) Sets a value for a static property. This method is meant to be used only in unit tests.- Parameters:
engine- The JsiiEngine to use.nativeClass- The java class.property- The name of the propertyvalue- The value
-
Kernel.asyncCall(Object, String, NativeType, Object...)instead