Package serp.bytecode
Class BCMember
- java.lang.Object
-
- serp.bytecode.Attributes
-
- serp.bytecode.Annotated
-
- serp.bytecode.BCMember
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAccessFlags()Return the access flags for this member as a bit array of ACCESS_XXX constants fromConstants.java.lang.ClassLoadergetClassLoader()Return the class loader to use when loading related classes.BCClassgetDeclarer()Return theBCClassthat declares this member.java.lang.StringgetDescriptor()Return the descriptor of this member, in internal form.intgetDescriptorIndex()Return the index in the classConstantPoolof theUTF8Entryholding the descriptor of this member.java.lang.StringgetName()Return the name of this member.intgetNameIndex()Return the index in the classConstantPoolof theUTF8Entryholding the name of this member.ConstantPoolgetPool()Return the constant pool of the current class.ProjectgetProject()Return the project of the current class.booleanisDeprecated()Convenience method to return deprecation information for the member.booleanisFinal()Manipulate the member access flags.booleanisPackage()Manipulate the member access flags.booleanisPrivate()Manipulate the member access flags.booleanisProtected()Manipulate the member access flags.booleanisPublic()Manipulate the member access flags.booleanisStatic()Manipulate the member access flags.booleanisSynthetic()Manipulate the field access flags.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.voidmakePackage()Manipulate the member access flags.voidmakePrivate()Manipulate the member access flags.voidmakeProtected()Manipulate the member access flags.voidmakePublic()Manipulate the member access flags.voidsetAccessFlags(int access)Set the access flags for this member as a bit array of ACCESS_XXX constants fromConstants.voidsetDeprecated(boolean on)Convenience method to set whether this member should be considered deprecated.voidsetDescriptor(java.lang.String desc)Set the descriptor of this member.voidsetDescriptorIndex(int index)Set the index in the classConstantPoolof theUTF8Entryholding the descriptor of this member.voidsetFinal(boolean on)Manipulate the member access flags.voidsetName(java.lang.String name)Set the name of this member.voidsetNameIndex(int index)Set the index in the classConstantPoolof theUTF8Entryholding the name of this member.voidsetStatic(boolean on)Manipulate the member access flags.voidsetSynthetic(boolean on)Manipulate the field access flags.-
Methods inherited from class serp.bytecode.Annotated
getDeclaredAnnotations, getDeclaredRuntimeAnnotations, removeDeclaredAnnotations, removeDeclaredRuntimeAnnotations
-
Methods inherited from class serp.bytecode.Attributes
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes
-
-
-
-
Method Detail
-
getAccessFlags
public int getAccessFlags()
Return the access flags for this member as a bit array of ACCESS_XXX constants fromConstants. This can be used to transfer access flags between members without getting/setting each possible access flag. Defaults toConstants.ACCESS_PRIVATE
-
setAccessFlags
public void setAccessFlags(int access)
Set the access flags for this member as a bit array of ACCESS_XXX constants fromConstants. This can be used to transfer access flags between members without getting/setting each possible access flag. Defaults toConstants.ACCESS_PRIVATE
-
isPublic
public boolean isPublic()
Manipulate the member access flags.
-
makePublic
public void makePublic()
Manipulate the member access flags.
-
isProtected
public boolean isProtected()
Manipulate the member access flags.
-
makeProtected
public void makeProtected()
Manipulate the member access flags.
-
isPrivate
public boolean isPrivate()
Manipulate the member access flags.
-
makePrivate
public void makePrivate()
Manipulate the member access flags.
-
isPackage
public boolean isPackage()
Manipulate the member access flags.
-
makePackage
public void makePackage()
Manipulate the member access flags.
-
isFinal
public boolean isFinal()
Manipulate the member access flags.
-
setFinal
public void setFinal(boolean on)
Manipulate the member access flags.
-
isStatic
public boolean isStatic()
Manipulate the member access flags.
-
setStatic
public void setStatic(boolean on)
Manipulate the member access flags.
-
isSynthetic
public boolean isSynthetic()
Manipulate the field access flags. This method also checks the synthetic member attribute.
-
setSynthetic
public void setSynthetic(boolean on)
Manipulate the field access flags. This method also manipulates the synthetic member attribute.
-
getNameIndex
public int getNameIndex()
Return the index in the classConstantPoolof theUTF8Entryholding the name of this member.
-
setNameIndex
public void setNameIndex(int index)
Set the index in the classConstantPoolof theUTF8Entryholding the name of this member.
-
getDescriptorIndex
public int getDescriptorIndex()
Return the index in the classConstantPoolof theUTF8Entryholding the descriptor of this member.
-
setDescriptorIndex
public void setDescriptorIndex(int index)
Set the index in the classConstantPoolof theUTF8Entryholding the descriptor of this member.
-
getName
public java.lang.String getName()
Return the name of this member.
-
setName
public void setName(java.lang.String name)
Set the name of this member.
-
getDescriptor
public java.lang.String getDescriptor()
Return the descriptor of this member, in internal form.
-
setDescriptor
public void setDescriptor(java.lang.String desc)
Set the descriptor of this member.
-
isDeprecated
public boolean isDeprecated()
Convenience method to return deprecation information for the member. Acts internally through theAttributesinterface.
-
setDeprecated
public void setDeprecated(boolean on)
Convenience method to set whether this member should be considered deprecated. Acts internally through theAttributesinterface.
-
getProject
public Project getProject()
Description copied from interface:BCEntityReturn the project of the current class.
-
getPool
public ConstantPool getPool()
Description copied from interface:BCEntityReturn the constant pool of the current class.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Description copied from interface:BCEntityReturn the class loader to use when loading related classes.
-
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.
-
-