Annotation Interface ObjectInstance
Descriptor of object instance, can pass constructor arguments. Constructor arguments are constrained to string type.
For example, take class P:
class P {
P() { ... };
P(String a) { ... };
P(String a, String b) { ... };
P(String a, int b) { ... }; // can't instantiate using instance descriptor!
}
Instance descriptors to create 3 instances of object P, each
using different constructor are:
ObjectInstance (value = "no-arg", constructorArgs = {})
ObjectInstance (value = "a", constructorArgs = {"someAValue"})
ObjectInstance (value = "ab", constructorArgs = {"someAValue", "someBValue"})
- Since:
- 0.1.0
- Author:
- Adam Dubiel
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionString[]String array of constructor arguments, class has to have matching constructor.Name of instance.