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)
Constructs a "mock" ClassInfo using the passed values.
|
short |
flags() |
DotName[] |
interfaces() |
DotName |
name() |
DotName |
superName() |
String |
toString() |
public static final ClassInfo create(DotName name, DotName superName, short flags, DotName[] interfaces, Map<DotName,List<AnnotationInstance>> annotations)
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()
Copyright © 2014 JBoss by Red Hat. All rights reserved.