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 TypeClassDescriptionstatic final class
A class that is used to execute field invocationsstatic final 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 TypeMethodDescriptionClass<?>
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
Performs a direct type-compatibility check using the given argumentsCreates 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:
- This will attempt to determine the object type 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
-
ofInstanceOf
public boolean ofInstanceOf()Performs a direct type-compatibility check using the given arguments- Returns:
- The actual boolean response.
-
ofClassLiteral
Creates a direct reference to a class- Returns:
- An actual class reference.
-
ofConstructor
Creates a direct reference to a constructor- Returns:
- An imaginary reference for you to execute your request with.
-
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:
- This will attempt to determine the method return type 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:
- This will attempt to determine the field type 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.
-