org.jboss.jandex
public final class ClassInfo extends Object implements AnnotationTarget
Global information including the parent class, implemented interfaces, and access flags are also provided since this information is often necessary.
Note that a parent class and interface may exist outside of the scope of the index (e.g. classes in a different jar) so the references are stored as names instead of direct references. It is expected that multiple indexes may need to be queried to assemble a full hierarchy in a complex multi-jar environment (e.g. an application server).
Thread-Safety
This class is immutable and can be shared between threads without safe publication.Modifier and Type | Method and Description |
---|---|
Map<DotName,List<AnnotationInstance>> |
annotations() |
static ClassInfo |
create(DotName name,
DotName superName,
short flags,
DotName[] interfaces,
Map<DotName,List<AnnotationInstance>> annotations,
boolean hasNoArgsConstructor)
Constructs a "mock" ClassInfo using the passed values.
|
short |
flags() |
boolean |
hasNoArgsConstructor()
Returns a boolean indicating the presence of a no-arg constructor, if supported by the underlying index store.
|
DotName[] |
interfaces() |
DotName |
name() |
DotName |
superName() |
String |
toString() |
public static ClassInfo create(DotName name, DotName superName, short flags, DotName[] interfaces, Map<DotName,List<AnnotationInstance>> annotations, boolean hasNoArgsConstructor)
name
- the name of this classsuperName
- the name of the parent classflags
- the class attributesinterfaces
- the interfaces this class implementsannotations
- the annotations on this classpublic final DotName name()
public final short flags()
public final DotName superName()
public final DotName[] interfaces()
public final Map<DotName,List<AnnotationInstance>> annotations()
public final boolean hasNoArgsConstructor()
true
in case of the Java class has a no-args constructor, false
if it does not, or it is not knownCopyright © 2016 JBoss by Red Hat. All rights reserved.