Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use ClassModel
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
elements()
), or via random access (e.g.,
flags()
), or by freely mixing the two.
Modifier and Type | Method and Description |
---|---|
public ConstantPool | |
public List | |
public AccessFlags | |
public List | Returns: the interfaces implemented by this classReturns the interfaces implemented by this class. |
public boolean | Returns: whether this class is a module descriptorReturns whether this class is a module descriptor. |
public int | |
public List | |
public int | |
public Optional | Returns: the superclass of this class, if there is oneReturns the superclass of this class, if there is one. |
public ClassEntry | Returns: the constant pool entry describing the name of this classReturns the constant pool entry describing the name of this class. |
constantPool | back to summary |
---|---|
public ConstantPool constantPool() Returns the constant pool for this class.
|
fields | back to summary |
---|---|
public List Returns the fields of this class.
|
flags | back to summary |
---|---|
public AccessFlags flags() Returns the access flags.
|
interfaces | back to summary |
---|---|
public List Returns the interfaces implemented by this class.
|
isModuleInfo | back to summary |
---|---|
public boolean isModuleInfo() Returns whether this class is a module descriptor.
|
majorVersion | back to summary |
---|---|
public int majorVersion() Returns the major classfile version.
|
methods | back to summary |
---|---|
public List Returns the methods of this class.
|
minorVersion | back to summary |
---|---|
public int minorVersion() Returns the minor classfile version.
|
superclass | back to summary |
---|---|
public Optional Returns the superclass of this class, if there is one.
|
thisClass | back to summary |
---|---|
public ClassEntry thisClass() Returns the constant pool entry describing the name of this class.
|