class AnnotationJClassDef extends AbstractJClassDef implements JClassItem
JClassItem.Kind
SMART_NAME_SORT
Constructor and Description |
---|
AnnotationJClassDef(int mods,
AbstractJClassDef enclosingClass,
java.lang.String name) |
AnnotationJClassDef(int mods,
ImplJSourceFile classFile,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
JClassDef |
_extends(java.lang.Class<?> clazz)
Add an
extends type to this type. |
JClassDef |
_extends(JType type)
Add an
extends type to this type. |
JClassDef |
_extends(java.lang.String name)
Add an
extends type to this type. |
JClassDef |
_implements(java.lang.Class<?>... classes)
Add one or more
implements type(s) to this type. |
JClassDef |
_implements(JType... types)
Add one or more
implements type(s) to this type. |
JClassDef |
_implements(java.lang.String... names)
Add one or more
implements type(s) to this type. |
JMethodDef |
constructor(java.util.ArrayList<ClassContent> content,
int mods) |
(package private) Tokens.$KW |
designation() |
JClassItem.Kind |
getItemKind()
Get the kind of item.
|
java.lang.String |
getName()
Get the name of this element, if there is one.
|
JBlock |
init(java.util.ArrayList<ClassContent> content) |
JMethodDef |
method(java.util.ArrayList<ClassContent> content,
int mods,
JType returnType,
java.lang.String name) |
(package private) boolean |
methodCanHaveBody(int mods) |
JTypeParamDef |
typeParam(java.lang.String name)
Define a type parameter.
|
_class, _class, _enum, _enum, _enum, _interface, _interface, add, add, annotationInterface, annotationInterface, blankLine, constructor, erasedType, field, field, field, field, field, field, field, genericType, getClassFile, getContent, getEnclosingClass, getExtends, getImplements, getMemberIndentation, getModifiers, getMods, hasAllModifiers, hasAnyModifier, hasInterfaceStyleExtends, init, method, method, method, section, staticInit, staticInit, supportsCompactInitOnly, write, writeClassHeader, writeContent, writeContentBlock
typeParams, typeParamsToArgs, writeTypeParams
annotate, annotate, annotate, writeAnnotations
deprecated, docComment, writeDocComments
blockComment, lineComment, writeComments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModifiers, hasAllModifiers, hasAnyModifier
annotate, annotate, annotate
deprecated, docComment
typeParams
blockComment, lineComment
AnnotationJClassDef(int mods, ImplJSourceFile classFile, java.lang.String name)
AnnotationJClassDef(int mods, AbstractJClassDef enclosingClass, java.lang.String name)
Tokens.$KW designation()
designation
in class AbstractJClassDef
public JClassDef _extends(java.lang.String name)
JClassDef
extends
type to this type._extends
in interface JClassDef
_extends
in class AbstractJClassDef
name
- the type namepublic JClassDef _extends(JType type)
JClassDef
extends
type to this type._extends
in interface JClassDef
_extends
in class AbstractJClassDef
type
- the typepublic JClassDef _extends(java.lang.Class<?> clazz)
JClassDef
extends
type to this type._extends
in interface JClassDef
_extends
in class AbstractJClassDef
clazz
- the typepublic JClassDef _implements(java.lang.String... names)
JClassDef
implements
type(s) to this type._implements
in interface JClassDef
_implements
in class AbstractJClassDef
names
- the type namepublic JClassDef _implements(JType... types)
JClassDef
implements
type(s) to this type._implements
in interface JClassDef
_implements
in class AbstractJClassDef
types
- the typepublic JClassDef _implements(java.lang.Class<?>... classes)
JClassDef
implements
type(s) to this type._implements
in interface JClassDef
_implements
in class AbstractJClassDef
classes
- the typepublic JBlock init(java.util.ArrayList<ClassContent> content)
init
in interface Sectionable
init
in class AbstractJClassDef
boolean methodCanHaveBody(int mods)
methodCanHaveBody
in class AbstractJClassDef
public JMethodDef constructor(java.util.ArrayList<ClassContent> content, int mods)
constructor
in interface Sectionable
constructor
in class AbstractJClassDef
public JTypeParamDef typeParam(java.lang.String name)
JGenericDef
typeParam
in interface JGenericDef
typeParam
in class AbstractJClassDef
name
- the type parameter namepublic JMethodDef method(java.util.ArrayList<ClassContent> content, int mods, JType returnType, java.lang.String name)
method
in interface Sectionable
method
in class AbstractJClassDef
public JClassItem.Kind getItemKind()
JClassItem
getItemKind
in interface JClassItem
public java.lang.String getName()
JClassItem
getName
in interface JClassItem
getName
in class AbstractJClassDef
null
if there is none