Package serp.bytecode
Class Annotation.Property
java.lang.Object
serp.bytecode.Annotation.Property
- All Implemented Interfaces:
BCEntity,VisitAcceptor
- Enclosing class:
- Annotation
An annotation property.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacceptVisit(BCVisitor visit) Accept a visit from aBCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this one.The owning annotation.Return the annotation value of this property, or null if not set.booleanReturn the boolean value of this property, or false if not set.byteReturn the byte value of this property, or false if not set.Return the class loader to use when loading related classes.Return the class value of this property, or null if not set.doubleReturn the double value of this property, or 0 if not set.floatReturn the float value of this property, or 0 if not set.intReturn the int value of this property, or 0 if not set.longReturn the long value of this property, or 0 if not set.getName()Return the name of this property.intReturn the index in the classConstantPoolof theUTF8Entryholding the name of this property.getPool()Return the constant pool of the current class.Return the project of the current class.shortReturn the short value of this property, or 0 if not set.Return the string value of this property, or null if not set.getValue()Return the value of the property as its wrapper type.booleanisValid()Return false if this entity has been removed from its parent; in this case the results of any operations on the entity are undefined.newAnnotationArrayValue(Class type, int length) Set this property value to a new annotation array of the given type and length, returning the annotations for manipulation.newAnnotationArrayValue(String type, int length) Set this property value to a new annotation array of the given type and length, returning the annotations for manipulation.newAnnotationArrayValue(BCClass type, int length) Set this property value to a new annotation array of the given type and length, returning the annotations for manipulation.newAnnotationValue(Class type) Set this property value to a new annotation of the given type, returning the annotation for manipulation.newAnnotationValue(String type) Set this property value to a new annotation of the given type, returning the annotation for manipulation.newAnnotationValue(BCClass type) Set this property value to a new annotation of the given type, returning the annotation for manipulation.voidsetClassNameValue(String value) Set the class value of this property.voidSet the name of this property.voidsetNameIndex(int index) Set the index in the classConstantPoolof theUTF8Entryholding the name of this property.voidsetValue(boolean value) Set the boolean value of this property.voidsetValue(byte value) Set the byte value of this property.voidsetValue(double value) Set the double value of this property.voidsetValue(float value) Set the float value of this property.voidsetValue(int value) Set the int value of this property.voidsetValue(long value) Set the long value of this property.voidsetValue(short value) Set the short value of this property.voidSet the class value of this property.voidSet value of this property.voidSet the string value of this property.setValue(Annotation value) Set the annotation value of this property by importing the given annotation from another instance.setValue(Annotation[] value) Set the annotation value of this property by importing the given annotation from another instance.voidSet the class value of this property.
-
Method Details
-
getAnnotation
The owning annotation. -
getNameIndex
public int getNameIndex()Return the index in the classConstantPoolof theUTF8Entryholding the name of this property. -
setNameIndex
public void setNameIndex(int index) Set the index in the classConstantPoolof theUTF8Entryholding the name of this property. -
getName
Return the name of this property. -
setName
Set the name of this property. -
getValue
Return the value of the property as its wrapper type. Returns class values as the class name. -
setValue
Set value of this property. The value should be an instance of any primitive wrapper type, String, Class, BCClass, an enum constant, an annotation, or an array of any of these types. -
getStringValue
Return the string value of this property, or null if not set. -
getBooleanValue
public boolean getBooleanValue()Return the boolean value of this property, or false if not set. -
getByteValue
public byte getByteValue()Return the byte value of this property, or false if not set. -
getIntValue
public int getIntValue()Return the int value of this property, or 0 if not set. -
getLongValue
public long getLongValue()Return the long value of this property, or 0 if not set. -
getFloatValue
public float getFloatValue()Return the float value of this property, or 0 if not set. -
getDoubleValue
public double getDoubleValue()Return the double value of this property, or 0 if not set. -
getShortValue
public short getShortValue()Return the short value of this property, or 0 if not set. -
getClassNameValue
Return the class value of this property, or null if not set. -
getAnnotationValue
Return the annotation value of this property, or null if not set. -
setValue
Set the string value of this property. -
setValue
public void setValue(boolean value) Set the boolean value of this property. -
setValue
public void setValue(byte value) Set the byte value of this property. -
setValue
public void setValue(int value) Set the int value of this property. -
setValue
public void setValue(long value) Set the long value of this property. -
setValue
public void setValue(float value) Set the float value of this property. -
setValue
public void setValue(double value) Set the double value of this property. -
setValue
public void setValue(short value) Set the short value of this property. -
setValue
Set the class value of this property. -
setValue
Set the class value of this property. -
setClassNameValue
Set the class value of this property. -
setValue
Set the annotation value of this property by importing the given annotation from another instance. -
setValue
Set the annotation value of this property by importing the given annotation from another instance. -
newAnnotationValue
Set this property value to a new annotation of the given type, returning the annotation for manipulation. -
newAnnotationValue
Set this property value to a new annotation of the given type, returning the annotation for manipulation. -
newAnnotationValue
Set this property value to a new annotation of the given type, returning the annotation for manipulation. -
newAnnotationArrayValue
Set this property value to a new annotation array of the given type and length, returning the annotations for manipulation. -
newAnnotationArrayValue
Set this property value to a new annotation array of the given type and length, returning the annotations for manipulation. -
newAnnotationArrayValue
Set this property value to a new annotation array of the given type and length, returning the annotations for manipulation. -
getProject
Description copied from interface:BCEntityReturn the project of the current class.- Specified by:
getProjectin interfaceBCEntity
-
getPool
Description copied from interface:BCEntityReturn the constant pool of the current class. -
getClassLoader
Description copied from interface:BCEntityReturn the class loader to use when loading related classes.- Specified by:
getClassLoaderin interfaceBCEntity
-
isValid
public boolean isValid()Description copied from interface:BCEntityReturn false if this entity has been removed from its parent; in this case the results of any operations on the entity are undefined. -
acceptVisit
Description copied from interface:VisitAcceptorAccept a visit from aBCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this one.- Specified by:
acceptVisitin interfaceVisitAcceptor
-