Package serp.bytecode

Class InnerClass

java.lang.Object
serp.bytecode.InnerClass
All Implemented Interfaces:
BCEntity, VisitAcceptor

public class InnerClass extends Object implements BCEntity, VisitAcceptor
Any referenced class that is not a package member is represented by this structure. This includes member classes and interfaces.
Author:
Abe White
  • Method Details

    • getOwner

      public InnerClasses getOwner()
      Inner classes are stored in an InnerClasses attribute.
    • getAccessFlags

      public int getAccessFlags()
      Return the access flags of the inner class.
    • setAccessFlags

      public void setAccessFlags(int accessFlags)
      Set the access flags of the inner class.
    • isPublic

      public boolean isPublic()
      Manipulate the inner class access flags.
    • makePublic

      public void makePublic()
      Manipulate the inner class access flags.
    • isProtected

      public boolean isProtected()
      Manipulate the inner class access flags.
    • makeProtected

      public void makeProtected()
      Manipulate the inner class access flags.
    • isPrivate

      public boolean isPrivate()
      Manipulate the inner class access flags.
    • makePrivate

      public void makePrivate()
      Manipulate the inner class access flags.
    • isFinal

      public boolean isFinal()
      Manipulate the inner class access flags.
    • setFinal

      public void setFinal(boolean on)
      Manipulate the inner class access flags.
    • isStatic

      public boolean isStatic()
      Manipulate the inner class access flags.
    • setStatic

      public void setStatic(boolean on)
      Manipulate the inner class access flags.
    • isInterface

      public boolean isInterface()
      Manipulate the class access flags.
    • setInterface

      public void setInterface(boolean on)
      Manipulate the class access flags.
    • isAbstract

      public boolean isAbstract()
      Manipulate the class access flags.
    • setAbstract

      public void setAbstract(boolean on)
      Manipulate the class access flags.
    • isSynthetic

      public boolean isSynthetic()
      Manipulate the inner class access flags.
    • setSynthetic

      public void setSynthetic(boolean on)
      Manipulate the inner class access flags.
    • isAnnotation

      public boolean isAnnotation()
      Manipulate the inner class access flags.
    • setAnnotation

      public void setAnnotation(boolean on)
      Manipulate the inner class access flags. Setting to true also makes this an interface.
    • isEnum

      public boolean isEnum()
      Manipulate the inner class access flags.
    • setEnum

      public void setEnum(boolean on)
      Manipulate the inner class access flags.
    • getNameIndex

      public int getNameIndex()
      Return the ConstantPool index of the UTF8Entry that describes the simple name this class is referred to in source, or 0 for anonymous classes.
    • setNameIndex

      public void setNameIndex(int nameIndex)
      Set the ConstantPool index of the UTF8Entry that describes the simple name this class is referred to in source, or 0 for anonymous classes.
    • getName

      public String getName()
      Return the simple name of this inner class, or null if anonymous.
    • setName

      public void setName(String name)
      Set the simple name of this inner class.
    • getTypeIndex

      public int getTypeIndex()
      Return the ConstantPool index of the ClassEntry that describes this class, or 0 if none.
    • setTypeIndex

      public void setTypeIndex(int index)
      Set the ConstantPool index of the ClassEntry that describes this class.
    • getTypeName

      public String getTypeName()
      Return the full name of the inner class, or null if unset.
    • getType

      public Class getType()
      Return the type of the inner class. If the type has not been set, this method will return null.
    • getTypeBC

      public BCClass getTypeBC()
      Return the type for this instruction. If the type has not been set, this method will return null.
    • setType

      public void setType(String type)
      Set the type of this inner class.
    • setType

      public void setType(Class type)
      Set the type of this inner class.
    • setType

      public void setType(BCClass type)
      Set the type of this inner class.
    • getDeclarerIndex

      public int getDeclarerIndex()
      Return the ConstantPool index of the ClassEntry that describes the declaring class, or 0 if this class is not a member class.
    • setDeclarerIndex

      public void setDeclarerIndex(int ownerIndex)
      Set the ConstantPool index of the ClassEntry that describes the declaring class, or 0 if this class is not a member class.
    • getDeclarerName

      public String getDeclarerName()
      Return the full name of the declaring class, or null if unset/not a member.
    • getDeclarerType

      public Class getDeclarerType()
      Return the type of the declaring class. If the type has not been set or the class is not a member, this method will return null.
    • getDeclarerBC

      public BCClass getDeclarerBC()
      Return the type for this instruction. If the type has not been set or the class is not a member, this method will return null.
    • setDeclarer

      public void setDeclarer(String type)
      Set the type of this declaring class.
    • setDeclarer

      public void setDeclarer(Class type)
      Set the type of this declaring class.
    • setDeclarer

      public void setDeclarer(BCClass type)
      Set the type of this declaring class.
    • getProject

      public Project getProject()
      Description copied from interface: BCEntity
      Return the project of the current class.
      Specified by:
      getProject in interface BCEntity
    • getPool

      public ConstantPool getPool()
      Description copied from interface: BCEntity
      Return the constant pool of the current class.
      Specified by:
      getPool in interface BCEntity
    • getClassLoader

      public ClassLoader getClassLoader()
      Description copied from interface: BCEntity
      Return the class loader to use when loading related classes.
      Specified by:
      getClassLoader in interface BCEntity
    • isValid

      public boolean isValid()
      Description copied from interface: BCEntity
      Return false if this entity has been removed from its parent; in this case the results of any operations on the entity are undefined.
      Specified by:
      isValid in interface BCEntity
    • acceptVisit

      public void acceptVisit(BCVisitor visit)
      Description copied from interface: VisitAcceptor
      Accept a visit from a BCVisitor, 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:
      acceptVisit in interface VisitAcceptor