 | IJVMWrapperDirectNewWithSignature(String, String, Object) Method |
Instantiates a new JVM object of className type using the constructor
identified by an explicit JNI signature and a variable-length argument list.
Namespace: MASES.JCOBridge.C2JBridge.JVMInteropAssembly: C2JBridge (in C2JBridge.dll) Version: 2.6.10.261112-5ffe0920c00dbac056780af7ab9b1978b26ef4a5
SyntaxIJavaObjectBase NewWithSignature(
string className,
string signature,
params Object[] args
)
Function NewWithSignature (
className As String,
signature As String,
ParamArray args As Object()
) As IJavaObjectBase
Parameters
- className String
- The class name in the dot or slash form (example are java.lang.Boolean or java/lang/Boolean)
- signature String
- The JNI constructor descriptor string that uniquely identifies the target constructor.
- args Object
-
The arguments to pass to the constructor. Each element must be compatible with the
corresponding Java parameter type declared in signature.
Return Value
IJavaObjectBaseA new
IJavaObjectBase wrapping the newly created JVM instance.
Exceptions| Exception | Condition |
|---|
| MissingMethodException |
Thrown if no constructor matching signature is found on the underlying Java class.
|
Remarks
The explicit signature is resolved at the JNI level before dispatching the call,
so this overload is suitable when multiple constructors share the same parameter count and
the bridge cannot unambiguously select the right one from the argument types alone.
For a fixed, known number of arguments (0–5), prefer the strongly-typed overloads
to avoid the overhead of array allocation.
See Also