Package bridge
Class Invocation
java.lang.Object
bridge.Invocation
A class that can be used to access field & method bridges (and other things too)
- Notes:
- Imaginary objects defined within and returned by this class may not be stored. In other words, you are required to use them in the same statement they were created in for your code to compile correctly.
-
Nested Class Summary
Modifier and TypeClassDescriptionfinal class
A class that is used to execute field invocationsfinal class
A class that is used to execute method invocations -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Creates fork(s) of your class with code tailored to the specified Java language level(s) -
Constructor Summary
ConstructorDescriptionInvocation
(Class<?> type) Starts a direct reference to something staticInvocation
(Class<?> type, Object instance) Starts a direct reference to something that belongs to an instance of an objectInvocation
(Object instance) Starts a direct reference to something that belongs to an instance of an objectInvocation
(String type) Starts a direct reference to something staticInvocation
(String type, Object instance) Starts a direct reference to something that belongs to an instance of an object -
Method Summary
Modifier and TypeMethodDescription(package private) static <T> T
Class<?>
Creates a direct reference to a classCreates a direct reference to a constructorCreates a direct reference to a fieldCreates a direct reference to a fieldCreates a direct reference to a fieldboolean
Creates a direct type-compatibility checkCreates a direct reference to a methodCreates a direct reference to a methodCreates a direct reference to a method
-
Field Details
-
LANGUAGE_LEVEL
public static final int LANGUAGE_LEVELCreates fork(s) of your class with code tailored to the specified Java language level(s)- Notes:
- This constant may only appear in integer comparisons as the first operand. Using it anywhere else will not compile correctly.
-
-
Constructor Details
-
Invocation
Starts a direct reference to something static- Parameters:
type
- Type constant – no dynamic values are permitted here.
-
Invocation
Starts a direct reference to something static- Parameters:
type
- Type name constant – no dynamic values or string manipulation is permitted here.
-
Invocation
Starts a direct reference to something that belongs to an instance of an object- Parameters:
instance
- Object instance- Notes:
- Calling this overload will cause the object type to be determined automatically.
-
Invocation
Starts a direct reference to something that belongs to an instance of an object- Parameters:
type
- Type constant – no dynamic values are permitted here.instance
- Object instance
-
Invocation
Starts a direct reference to something that belongs to an instance of an object- Parameters:
type
- Type name constant – no dynamic values or string manipulation is permitted here.instance
- Object instance
-
-
Method Details
-
$
-
ofClassLiteral
Creates a direct reference to a class- Returns:
- An actual class reference.
-
ofInstanceOf
public boolean ofInstanceOf()Creates a direct type-compatibility check- Returns:
- The actual boolean response.
- Notes:
- This operation requires instance access.
-
ofConstructor
Creates a direct reference to a constructor- Returns:
- An imaginary reference for you to execute your request with.
- Notes:
- This operation requires static access.
-
ofMethod
Creates a direct reference to a method- Parameters:
name
- Method name constant – no dynamic values or string manipulation is permitted here.- Returns:
- An imaginary reference for you to execute your request with.
- Notes:
- Calling this overload will cause the method return type to be determined automatically.
-
ofMethod
Creates a direct reference to a method- Parameters:
type
- Method return type constant – no dynamic values are permitted here.name
- Method name constant – no dynamic values or string manipulation is permitted here.- Returns:
- An imaginary reference for you to execute your request with.
-
ofMethod
Creates a direct reference to a method- Parameters:
type
- Method return type name constant – no dynamic values or string manipulation is permitted here.name
- Method name constant – no dynamic values or string manipulation is permitted here.- Returns:
- An imaginary reference for you to execute your request with.
-
ofField
Creates a direct reference to a field- Parameters:
name
- Field name constant – no dynamic values or string manipulation is permitted here.- Returns:
- An imaginary reference for you to execute your request with.
- Notes:
- Calling this overload will cause the field type to be determined automatically.
-
ofField
Creates a direct reference to a field- Parameters:
type
- Field type constant – no dynamic values are permitted here.name
- Field name constant – no dynamic values or string manipulation is permitted here.- Returns:
- An imaginary reference for you to execute your request with.
-
ofField
Creates a direct reference to a field- Parameters:
type
- Field type name constant – no dynamic values or string manipulation is permitted here.name
- Field name constant – no dynamic values or string manipulation is permitted here.- Returns:
- An imaginary reference for you to execute your request with.
-