Class ReferenceChain
java.lang.Object
org.openjdk.jmc.agent.util.expression.ReferenceChain
A ReferenceChain instance presents a field reference expression. eg.
OuterClass.this.field.STATIC_FIELD is a reference chain consisting elements: a
qualified-this reference and two field reference (field and
STATIC_FIELD).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<?> private final List<ReferenceChainElement> -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
callerClass
-
references
-
-
Constructor Details
-
ReferenceChain
- Parameters:
callerClass- the caller class making this reference
-
-
Method Details
-
getCallerClass
- Returns:
- the caller class making this reference
-
getReferences
- Returns:
- all elements on the reference chain
-
normalize
Reduces the reference chain to prepend "this" or qualified-this references if necessary, and short-circuits on static references- Returns:
- the normalized reference chain
-
getType
public org.objectweb.asm.Type getType()- Returns:
- the type of the last reference element
-
append
Appends a ReferenceChainElement to the chain- Parameters:
ref- ReferenceChainElement to be appended
-
isStatic
public boolean isStatic()- Returns:
- whether the reference is valid from a static context
-