类 LibraryClass

所有已实现的接口:
Serializable, Clazz, FeatureNamed, Processable

public class LibraryClass extends SimpleFeatureNamedProcessable implements Clazz
This Clazz is a compact representation of the essential data in a Java class.
另请参阅:
  • 字段详细资料

    • u2accessFlags

      public int u2accessFlags
    • thisClassName

      public String thisClassName
    • superClassName

      public String superClassName
    • interfaceNames

      public String[] interfaceNames
    • fields

      public LibraryField[] fields
    • methods

      public LibraryMethod[] methods
    • kotlinMetadata

      public KotlinMetadata kotlinMetadata
    • superClass

      public Clazz superClass
      An extra field pointing to the superclass of this class. This field is filled out by the ClassSuperHierarchyInitializer.
    • interfaceClasses

      public Clazz[] interfaceClasses
      An extra field pointing to the interfaces of this class. This field is filled out by the ClassSuperHierarchyInitializer.
    • subClasses

      public Clazz[] subClasses
      An extra field pointing to the subclasses of this class. This field is filled out by the ClassSubHierarchyInitializer.
    • subClassCount

      public int subClassCount
  • 构造器详细资料

    • LibraryClass

      public LibraryClass()
      Creates an empty LibraryClass.
    • LibraryClass

      public LibraryClass(int u2accessFlags, String thisClassName, String superClassName)
      Creates an initialized LibraryClass
      参数:
      u2accessFlags - access flags for the new class.
      thisClassName - the fully qualified name of the new class.
      superClassName - the fully qualified name of the super class.
    • LibraryClass

      public LibraryClass(int u2accessFlags, String thisClassName, String superClassName, KotlinMetadata kotlinMetadata)
      Creates an initialized LibraryClass
      参数:
      u2accessFlags - access flags for the new class.
      thisClassName - the fully qualified name of the new class.
      superClassName - the fully qualified name of the super class.
      kotlinMetadata - the metadata attached to this class if it is a Kotlin class.
    • LibraryClass

      public LibraryClass(int u2accessFlags, String thisClassName, String superClassName, String[] interfaceNames, Clazz[] interfaceClasses, int subClassCount, Clazz[] subClasses, LibraryField[] fields, LibraryMethod[] methods, KotlinMetadata kotlinMetadata)
      Creates an initialized LibraryClass
      参数:
      u2accessFlags - access flags for the new class.
      thisClassName - the fully qualified name of the new class.
      superClassName - the fully qualified name of the super class.
      interfaceNames - the names of the interfaces that are implemented by this class.
      interfaceClasses - references to the interface classes of the interfaces that are implemented by this class.
      subClassCount - the number of subclasses of this class.
      subClasses - references to the subclasses of this class.
      fields - references to the fields of this class.
      methods - references to the methods of this class.
      kotlinMetadata - the metadata attached to this class if it is a Kotlin class
  • 方法详细资料

    • getAccessFlags

      public int getAccessFlags()
      从接口复制的说明: Clazz
      Returns the access flags of this class.
      指定者:
      getAccessFlags 在接口中 Clazz
      另请参阅:
    • getName

      public String getName()
      从接口复制的说明: Clazz
      Returns the full internal name of this class.
      指定者:
      getName 在接口中 Clazz
    • getSuperName

      public String getSuperName()
      从接口复制的说明: Clazz
      Returns the full internal name of the super class of this class, or null if this class represents java.lang.Object.
      指定者:
      getSuperName 在接口中 Clazz
    • getInterfaceCount

      public int getInterfaceCount()
      从接口复制的说明: Clazz
      Returns the number of interfaces that this class implements.
      指定者:
      getInterfaceCount 在接口中 Clazz
    • getInterfaceName

      public String getInterfaceName(int index)
      从接口复制的说明: Clazz
      Returns the full internal name of the interface at the given index of this class.
      指定者:
      getInterfaceName 在接口中 Clazz
    • getTag

      public int getTag(int constantIndex)
      从接口复制的说明: Clazz
      Returns the tag value of the Constant at the specified index.
      指定者:
      getTag 在接口中 Clazz
    • getString

      public String getString(int constantIndex)
      从接口复制的说明: Clazz
      Returns the String value of the Utf8Constant at the specified index.
      指定者:
      getString 在接口中 Clazz
    • getStringString

      public String getStringString(int constantIndex)
      从接口复制的说明: Clazz
      Returns the String value of the StringConstant at the specified index.
      指定者:
      getStringString 在接口中 Clazz
    • getClassName

      public String getClassName(int constantIndex)
      从接口复制的说明: Clazz
      Returns the class name of ClassConstant at the specified index.
      指定者:
      getClassName 在接口中 Clazz
    • getReferencedClass

      public Clazz getReferencedClass(int constantIndex)
      从接口复制的说明: Clazz
      Returns the ClassConstant.referencedClass at the specified index.
      指定者:
      getReferencedClass 在接口中 Clazz
    • getName

      public String getName(int constantIndex)
      从接口复制的说明: Clazz
      Returns the name of the NameAndTypeConstant at the specified index.
      指定者:
      getName 在接口中 Clazz
    • getType

      public String getType(int constantIndex)
      从接口复制的说明: Clazz
      Returns the type of the NameAndTypeConstant at the specified index.
      指定者:
      getType 在接口中 Clazz
    • getRefClassName

      public String getRefClassName(int constantIndex)
      从接口复制的说明: Clazz
      Returns the class name of the RefConstant at the specified index.
      指定者:
      getRefClassName 在接口中 Clazz
    • getRefName

      public String getRefName(int constantIndex)
      从接口复制的说明: Clazz
      Returns the name of the RefConstant at the specified index.
      指定者:
      getRefName 在接口中 Clazz
    • getRefType

      public String getRefType(int constantIndex)
      从接口复制的说明: Clazz
      Returns the type of the RefConstant at the specified index.
      指定者:
      getRefType 在接口中 Clazz
    • getModuleName

      public String getModuleName(int constantIndex)
      从接口复制的说明: Clazz
      Returns the name of the ModuleConstant at the specified index.
      指定者:
      getModuleName 在接口中 Clazz
    • getPackageName

      public String getPackageName(int constantIndex)
      从接口复制的说明: Clazz
      Returns the name of the PackageConstant at the specified index.
      指定者:
      getPackageName 在接口中 Clazz
    • addSubClass

      public void addSubClass(Clazz clazz)
      从接口复制的说明: Clazz
      Notifies this Clazz that it is being subclassed by another class.
      指定者:
      addSubClass 在接口中 Clazz
    • removeSubClass

      public void removeSubClass(Clazz clazz)
      从接口复制的说明: Clazz
      Notifies this Clazz that it is no longer being subclassed by another class.
      指定者:
      removeSubClass 在接口中 Clazz
    • getSuperClass

      public Clazz getSuperClass()
      从接口复制的说明: Clazz
      Returns the super class of this class.
      指定者:
      getSuperClass 在接口中 Clazz
    • getInterface

      public Clazz getInterface(int index)
      从接口复制的说明: Clazz
      Returns the interface at the given index.
      指定者:
      getInterface 在接口中 Clazz
    • extends_

      public boolean extends_(Clazz clazz)
      从接口复制的说明: Clazz
      Returns whether this class extends the given class. A class is always considered to extend itself. Interfaces are considered to only extend the root Object class.
      指定者:
      extends_ 在接口中 Clazz
    • extends_

      public boolean extends_(String className)
      从接口复制的说明: Clazz
      Returns whether this class extends the specified class. A class is always considered to extend itself. Interfaces are considered to only extend the root Object class.
      指定者:
      extends_ 在接口中 Clazz
    • extendsOrImplements

      public boolean extendsOrImplements(Clazz clazz)
      从接口复制的说明: Clazz
      Returns whether this class implements the given class. A class is always considered to implement itself. Interfaces are considered to implement all their superinterfaces.
      指定者:
      extendsOrImplements 在接口中 Clazz
    • extendsOrImplements

      public boolean extendsOrImplements(String className)
      从接口复制的说明: Clazz
      Returns whether this class implements the specified class. A class is always considered to implement itself. Interfaces are considered to implement all their superinterfaces.
      指定者:
      extendsOrImplements 在接口中 Clazz
    • findField

      public Field findField(String name, String descriptor)
      从接口复制的说明: Clazz
      Returns the field with the given name and descriptor.
      指定者:
      findField 在接口中 Clazz
      参数:
      name - the field name, or null if it is irrelevant.
      descriptor - the field type, or null if it is irrelevant.
      返回:
      the first matching field, or null there is no matching field.
    • findMethod

      public Method findMethod(String name, String descriptor)
      从接口复制的说明: Clazz
      Returns the method with the given name and descriptor.
      指定者:
      findMethod 在接口中 Clazz
      参数:
      name - the method name, or null if it is irrelevant.
      descriptor - the method descriptor, or null if it is irrelevant.
      返回:
      the first matching method, or null there is no matching method.
    • accept

      public void accept(ClassVisitor classVisitor)
      从接口复制的说明: Clazz
      Accepts the given class visitor.
      指定者:
      accept 在接口中 Clazz
    • hierarchyAccept

      public void hierarchyAccept(boolean visitThisClass, boolean visitSuperClass, boolean visitInterfaces, boolean visitSubclasses, ClassVisitor classVisitor)
      从接口复制的说明: Clazz
      Accepts the given class visitor in the class hierarchy.
      指定者:
      hierarchyAccept 在接口中 Clazz
      参数:
      visitThisClass - specifies whether to visit this class.
      visitSuperClass - specifies whether to visit the super classes.
      visitInterfaces - specifies whether to visit the interfaces.
      visitSubclasses - specifies whether to visit the subclasses.
      classVisitor - the ClassVisitor that will visit the class hierarchy.
    • superClassAccept

      public void superClassAccept(ClassVisitor classVisitor)
      Lets the given class visitor visit the superclass, if it is known.
      参数:
      classVisitor - the ClassVisitor that will visit the superclass.
    • interfacesAccept

      public void interfacesAccept(ClassVisitor classVisitor)
      Lets the given class visitor visit all known direct interfaces.
      参数:
      classVisitor - the ClassVisitor that will visit the interfaces.
    • subclassesAccept

      public void subclassesAccept(ClassVisitor classVisitor)
      从接口复制的说明: Clazz
      Lets the given class visitor visit all known subclasses.
      指定者:
      subclassesAccept 在接口中 Clazz
      参数:
      classVisitor - the ClassVisitor that will visit the subclasses.
    • constantPoolEntriesAccept

      public void constantPoolEntriesAccept(ConstantVisitor constantVisitor)
      从接口复制的说明: Clazz
      Lets the given constant pool entry visitor visit all constant pool entries of this class.
      指定者:
      constantPoolEntriesAccept 在接口中 Clazz
    • constantPoolEntryAccept

      public void constantPoolEntryAccept(int index, ConstantVisitor constantVisitor)
      从接口复制的说明: Clazz
      Lets the given constant pool entry visitor visit the constant pool entry at the specified index.
      指定者:
      constantPoolEntryAccept 在接口中 Clazz
    • thisClassConstantAccept

      public void thisClassConstantAccept(ConstantVisitor constantVisitor)
      从接口复制的说明: Clazz
      Lets the given constant pool entry visitor visit the class constant pool entry of this class.
      指定者:
      thisClassConstantAccept 在接口中 Clazz
    • superClassConstantAccept

      public void superClassConstantAccept(ConstantVisitor constantVisitor)
      从接口复制的说明: Clazz
      Lets the given constant pool entry visitor visit the class constant pool entry of the super class of this class, if there is one.
      指定者:
      superClassConstantAccept 在接口中 Clazz
    • interfaceConstantsAccept

      public void interfaceConstantsAccept(ConstantVisitor constantVisitor)
      从接口复制的说明: Clazz
      Lets the given constant pool entry visitor visit the class constant pool entries for all interfaces of this class.
      指定者:
      interfaceConstantsAccept 在接口中 Clazz
    • fieldsAccept

      public void fieldsAccept(MemberVisitor memberVisitor)
      从接口复制的说明: Clazz
      Lets the given member info visitor visit all fields of this class.
      指定者:
      fieldsAccept 在接口中 Clazz
    • fieldAccept

      public void fieldAccept(String name, String descriptor, MemberVisitor memberVisitor)
      从接口复制的说明: Clazz
      Lets the given member info visitor visit the specified field.
      指定者:
      fieldAccept 在接口中 Clazz
    • methodsAccept

      public void methodsAccept(MemberVisitor memberVisitor)
      从接口复制的说明: Clazz
      Lets the given member info visitor visit all methods of this class.
      指定者:
      methodsAccept 在接口中 Clazz
    • methodAccept

      public void methodAccept(String name, String descriptor, MemberVisitor memberVisitor)
      从接口复制的说明: Clazz
      Lets the given member info visitor visit the specified method.
      指定者:
      methodAccept 在接口中 Clazz
    • mayHaveImplementations

      public boolean mayHaveImplementations(Method method)
      从接口复制的说明: Clazz
      Returns whether the given method may possibly have implementing or overriding methods down the class hierarchy. This can only be true if the class is not final, and the method is not private, static, or final, or a constructor.
      指定者:
      mayHaveImplementations 在接口中 Clazz
      参数:
      method - the method that may have implementations.
      返回:
      whether it may have implementations.
    • attributesAccept

      public void attributesAccept(AttributeVisitor attributeVisitor)
      从接口复制的说明: Clazz
      Lets the given attribute info visitor visit all attributes of this class.
      指定者:
      attributesAccept 在接口中 Clazz
    • attributeAccept

      public void attributeAccept(String name, AttributeVisitor attributeVisitor)
      从接口复制的说明: Clazz
      Lets the given attribute info visitor visit the specified attribute.
      指定者:
      attributeAccept 在接口中 Clazz
    • kotlinMetadataAccept

      public void kotlinMetadataAccept(KotlinMetadataVisitor kotlinMetadataVisitor)
      从接口复制的说明: Clazz
      Lets the given Kotlin metadata visitor visit the metadata of this class.
      指定者:
      kotlinMetadataAccept 在接口中 Clazz
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object