Package com.tonic.analysis.xref
Enum XrefType
- java.lang.Object
-
- java.lang.Enum<XrefType>
-
- com.tonic.analysis.xref.XrefType
-
- All Implemented Interfaces:
Serializable,Comparable<XrefType>
public enum XrefType extends Enum<XrefType>
Kinds of cross-reference tracked in the xref database.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOTSTRAP_ARG_FIELDA field named by a field method handle passed as a static argument to a bootstrap method.BOOTSTRAP_ARG_METHODA method named by a method handle passed as a static argument to a bootstrap method, such as the lambda body behind an invokedynamic.BOOTSTRAP_METHODA method invoked by the JVM at link time to resolve an invokedynamic call site or a dynamic constant.CLASS_ANNOTATIONAn annotation type applied to a class, method, field, or parameter.CLASS_CASTA type a value is checked-cast to, from a cast expression.CLASS_EXTENDSA class named as the direct superclass of the referencing class.CLASS_IMPLEMENTSAn interface listed among the referencing class's direct interfaces.CLASS_INSTANCEOFA type tested against a value by aninstanceofcheck.CLASS_INSTANTIATEA class allocated by the referencing code, from anewexpression.FIELD_READA field whose value the referencing code loads.FIELD_WRITEA field whose value the referencing code stores to.METHOD_CALLA method named at an invoke instruction in the referencing method's body.METHOD_OVERRIDEA supertype method that the referencing method redeclares, recorded from the class hierarchy rather than from a call site.TYPE_LOCAL_VARA class named as the declared type of a local variable, recorded from the local variable table rather than from an instruction.TYPE_PARAMETERA class named as a generic type argument or type-parameter bound in a signature.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()StringgetDisplayName()booleanisFieldRef()Check if this is a field-related reference.booleanisInheritanceRef()Check if this reference indicates inheritance/implementation.booleanisMethodRef()Check if this is a method-related reference.booleanisTypeRef()Check if this is a class/type-related reference.static XrefTypevalueOf(String name)Returns the enum constant of this type with the specified name.static XrefType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
METHOD_CALL
public static final XrefType METHOD_CALL
A method named at an invoke instruction in the referencing method's body.
-
METHOD_OVERRIDE
public static final XrefType METHOD_OVERRIDE
A supertype method that the referencing method redeclares, recorded from the class hierarchy rather than from a call site.
-
BOOTSTRAP_METHOD
public static final XrefType BOOTSTRAP_METHOD
A method invoked by the JVM at link time to resolve an invokedynamic call site or a dynamic constant.
-
BOOTSTRAP_ARG_METHOD
public static final XrefType BOOTSTRAP_ARG_METHOD
A method named by a method handle passed as a static argument to a bootstrap method, such as the lambda body behind an invokedynamic.
-
BOOTSTRAP_ARG_FIELD
public static final XrefType BOOTSTRAP_ARG_FIELD
A field named by a field method handle passed as a static argument to a bootstrap method.
-
FIELD_READ
public static final XrefType FIELD_READ
A field whose value the referencing code loads.
-
FIELD_WRITE
public static final XrefType FIELD_WRITE
A field whose value the referencing code stores to.
-
CLASS_INSTANTIATE
public static final XrefType CLASS_INSTANTIATE
A class allocated by the referencing code, from anewexpression.
-
CLASS_CAST
public static final XrefType CLASS_CAST
A type a value is checked-cast to, from a cast expression.
-
CLASS_INSTANCEOF
public static final XrefType CLASS_INSTANCEOF
A type tested against a value by aninstanceofcheck.
-
CLASS_EXTENDS
public static final XrefType CLASS_EXTENDS
A class named as the direct superclass of the referencing class.
-
CLASS_IMPLEMENTS
public static final XrefType CLASS_IMPLEMENTS
An interface listed among the referencing class's direct interfaces.
-
CLASS_ANNOTATION
public static final XrefType CLASS_ANNOTATION
An annotation type applied to a class, method, field, or parameter.
-
TYPE_PARAMETER
public static final XrefType TYPE_PARAMETER
A class named as a generic type argument or type-parameter bound in a signature.
-
TYPE_LOCAL_VAR
public static final XrefType TYPE_LOCAL_VAR
A class named as the declared type of a local variable, recorded from the local variable table rather than from an instruction.
-
-
Method Detail
-
values
public static XrefType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (XrefType c : XrefType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static XrefType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getDisplayName
public String getDisplayName()
- Returns:
- the display name
-
getDescription
public String getDescription()
- Returns:
- the description
-
isMethodRef
public boolean isMethodRef()
Check if this is a method-related reference.- Returns:
- true for the call, override, and bootstrap-method kinds
-
isFieldRef
public boolean isFieldRef()
Check if this is a field-related reference.- Returns:
- true for the field read and write kinds
-
isTypeRef
public boolean isTypeRef()
Check if this is a class/type-related reference.- Returns:
- true for instantiation, cast, instanceof, inheritance, annotation, and type-usage kinds
-
isInheritanceRef
public boolean isInheritanceRef()
Check if this reference indicates inheritance/implementation.- Returns:
- true for the extends and implements kinds
-
-