Class JavaClass


  • public class JavaClass
    extends java.lang.Object
    Represents a Java class, that is, the data structures, constant pool, fields, methods and commands contained in a Java .class file. See JVM specification for details. The intent of this class is to represent a parsed or otherwise existing class file. Those interested in programmatically generating classes should see the ClassGen class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAccessFlags()
      Get the access flags of this class.
      AnnotationEntry[] getAllAnnotationEntries()
      Return annotations entries from "RuntimeVisibleAnnotations" attribute on the class, fields or methods if there is any.
      AnnotationEntry[] getAnnotationEntries()
      Return annotations entries from "RuntimeVisibleAnnotations" attribute on the class, if there is any.
      java.lang.String getClassName()
      Get the name of this class.
      java.lang.String[] getInterfaceNames()
      Get the names of the interfaces implemented by this class.
      java.lang.String getSuperclassName()
      returns the super class name of this class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getAccessFlags

        public final int getAccessFlags()
        Get the access flags of this class.
        Returns:
        the access flags
      • getAllAnnotationEntries

        public AnnotationEntry[] getAllAnnotationEntries()
        Return annotations entries from "RuntimeVisibleAnnotations" attribute on the class, fields or methods if there is any.
        Returns:
        An array of entries or null
      • getAnnotationEntries

        public AnnotationEntry[] getAnnotationEntries()
        Return annotations entries from "RuntimeVisibleAnnotations" attribute on the class, if there is any.
        Returns:
        An array of entries or null
      • getClassName

        public java.lang.String getClassName()
        Get the name of this class.
        Returns:
        the class name
      • getInterfaceNames

        public java.lang.String[] getInterfaceNames()
        Get the names of the interfaces implemented by this class.
        Returns:
        the interface names
      • getSuperclassName

        public java.lang.String getSuperclassName()
        returns the super class name of this class. In the case that this class is Object, it will return itself (Object). This is probably incorrect but isn't fixed at this time to not break existing clients.
        Returns:
        Superclass name.