public class PrimitiveArrayConstant extends Constant
Modifier and Type | Field and Description |
---|---|
java.lang.Object |
values |
CLASS, DOUBLE, DYNAMIC, FIELDREF, FLOAT, INTEGER, INTERFACE_METHODREF, INVOKE_DYNAMIC, LONG, METHOD_HANDLE, METHOD_TYPE, METHODREF, MODULE, NAME_AND_TYPE, PACKAGE, PRIMITIVE_ARRAY, STRING, UTF8
processingFlags, processingInfo
Constructor and Description |
---|
PrimitiveArrayConstant()
Creates an uninitialized PrimitiveArrayConstant.
|
PrimitiveArrayConstant(java.lang.Object values)
Creates a new PrimitiveArrayConstant with the given array of values.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Clazz clazz,
ConstantVisitor constantVisitor)
Accepts the given visitor.
|
boolean |
contentEquals(PrimitiveArrayConstant other)
Returns whether all elements of the primitive array are equal to the elements of the given
primitive array.
|
boolean |
equals(java.lang.Object object) |
int |
getLength()
Returns the length of the primitive array.
|
char |
getPrimitiveType()
Returns the type of the elements of the primitive array.
|
int |
getTag()
Returns the constant pool info tag that specifies the entry type.
|
java.lang.Object |
getValues()
Returns the values.
|
int |
hashCode() |
boolean |
isCategory2()
Returns whether the constant is of category 2.
|
void |
primitiveArrayAccept(Clazz clazz,
PrimitiveArrayConstantVisitor primitiveArrayConstantVisitor)
Applies the given PrimitiveArrayConstantVisitor to the primitive array.
|
void |
primitiveArrayElementsAccept(Clazz clazz,
PrimitiveArrayConstantElementVisitor primitiveArrayConstantElementVisitor)
Applies the given PrimitiveArrayConstantElementVisitor to all elements of the primitive array.
|
java.lang.String |
toString() |
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfo
public PrimitiveArrayConstant()
public PrimitiveArrayConstant(java.lang.Object values)
public char getPrimitiveType()
public int getLength()
public java.lang.Object getValues()
public void primitiveArrayAccept(Clazz clazz, PrimitiveArrayConstantVisitor primitiveArrayConstantVisitor)
public void primitiveArrayElementsAccept(Clazz clazz, PrimitiveArrayConstantElementVisitor primitiveArrayConstantElementVisitor)
public boolean contentEquals(PrimitiveArrayConstant other)
public int getTag()
Constant
public boolean isCategory2()
Constant
isCategory2
in class Constant
public void accept(Clazz clazz, ConstantVisitor constantVisitor)
Constant
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object