Class JavaClass
java.lang.Object
org.apache.tomcat.util.bcel.classfile.JavaClass
Represents a Java class, i.e., 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
Modifier and TypeMethodDescriptionfinal int
Return annotations entries from "RuntimeVisibleAnnotations" attribute on the class, fields or methods if there is any.Return annotations entries from "RuntimeVisibleAnnotations" attribute on the class, if there is any.String[]
returns the super class name of this class.
-
Method Details
-
getAccessFlags
public final int getAccessFlags()- Returns:
- Access flags of the object aka. "modifiers".
-
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
Return annotations entries from "RuntimeVisibleAnnotations" attribute on the class, if there is any.- Returns:
- An array of entries or
null
-
getClassName
- Returns:
- Class name.
-
getInterfaceNames
- Returns:
- Names of implemented interfaces.
-
getSuperclassName
returns the super class name of this class. In the case that this class isObject
, it will return itself (Object
). This is probably incorrect but isn't fixed at this time to not break existing clients.- Returns:
- Superclass name.
-