Package org.jboss.jdeparser
Class AnnotationJClassDef
- java.lang.Object
-
- All Implemented Interfaces:
ClassContent,ClassFileContent,JAnnotatable,JClassDef,JClassDefSection,JClassItem,JCommentable,JDocCommentable,JGenericDef,Sectionable,Writable
class AnnotationJClassDef extends AbstractJClassDef implements JClassItem
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.jdeparser.JClassItem
JClassItem.Kind
-
-
Field Summary
-
Fields inherited from interface org.jboss.jdeparser.JClassItem
SMART_NAME_SORT
-
-
Constructor Summary
Constructors Constructor Description AnnotationJClassDef(int mods, AbstractJClassDef enclosingClass, java.lang.String name)AnnotationJClassDef(int mods, ImplJSourceFile classFile, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JClassDef_extends(java.lang.Class<?> clazz)Add anextendstype to this type.JClassDef_extends(java.lang.String name)Add anextendstype to this type.JClassDef_extends(JType type)Add anextendstype to this type.JClassDef_implements(java.lang.Class<?>... classes)Add one or moreimplementstype(s) to this type.JClassDef_implements(java.lang.String... names)Add one or moreimplementstype(s) to this type.JClassDef_implements(JType... types)Add one or moreimplementstype(s) to this type.JMethodDefconstructor(java.util.ArrayList<ClassContent> content, int mods)(package private) Tokens.$KWdesignation()JClassItem.KindgetItemKind()Get the kind of item.java.lang.StringgetName()Get the name of this element, if there is one.JBlockinit(java.util.ArrayList<ClassContent> content)JMethodDefmethod(java.util.ArrayList<ClassContent> content, int mods, JType returnType, java.lang.String name)(package private) booleanmethodCanHaveBody(int mods)JTypeParamDeftypeParam(java.lang.String name)Define a type parameter.-
Methods inherited from class org.jboss.jdeparser.AbstractJClassDef
_class, _class, _enum, _enum, _enum, _interface, _interface, add, add, annotationInterface, annotationInterface, blankLine, blockComment, constructor, erasedType, field, field, field, field, field, field, field, genericType, getClassFile, getContent, getEnclosingClass, getExtends, getImplements, getMemberIndentation, getModifiers, getMods, hasAllModifiers, hasAnyModifier, hasInterfaceStyleExtends, init, lineComment, method, method, method, section, staticInit, staticInit, supportsCompactInitOnly, write, writeClassHeader, writeContent, writeContentBlock
-
Methods inherited from class org.jboss.jdeparser.AbstractJGeneric
typeParams, typeParamsToArgs, writeTypeParams
-
Methods inherited from class org.jboss.jdeparser.BasicJAnnotatable
annotate, annotate, annotate, writeAnnotations
-
Methods inherited from class org.jboss.jdeparser.AbstractJDocCommentable
deprecated, docComment, writeDocComments
-
Methods inherited from class org.jboss.jdeparser.BasicJCommentable
writeComments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.jdeparser.JAnnotatable
annotate, annotate, annotate
-
Methods inherited from interface org.jboss.jdeparser.JClassItem
getModifiers, hasAllModifiers, hasAnyModifier
-
Methods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docComment
-
Methods inherited from interface org.jboss.jdeparser.JGenericDef
typeParams
-
-
-
-
Constructor Detail
-
AnnotationJClassDef
AnnotationJClassDef(int mods, ImplJSourceFile classFile, java.lang.String name)
-
AnnotationJClassDef
AnnotationJClassDef(int mods, AbstractJClassDef enclosingClass, java.lang.String name)
-
-
Method Detail
-
designation
Tokens.$KW designation()
- Specified by:
designationin classAbstractJClassDef
-
_extends
public JClassDef _extends(java.lang.String name)
Description copied from interface:JClassDefAdd anextendstype to this type.- Specified by:
_extendsin interfaceJClassDef- Overrides:
_extendsin classAbstractJClassDef- Parameters:
name- the type name- Returns:
- this type definition
-
_extends
public JClassDef _extends(JType type)
Description copied from interface:JClassDefAdd anextendstype to this type.- Specified by:
_extendsin interfaceJClassDef- Overrides:
_extendsin classAbstractJClassDef- Parameters:
type- the type- Returns:
- this type definition
-
_extends
public JClassDef _extends(java.lang.Class<?> clazz)
Description copied from interface:JClassDefAdd anextendstype to this type.- Specified by:
_extendsin interfaceJClassDef- Overrides:
_extendsin classAbstractJClassDef- Parameters:
clazz- the type- Returns:
- this type definition
-
_implements
public JClassDef _implements(java.lang.String... names)
Description copied from interface:JClassDefAdd one or moreimplementstype(s) to this type.- Specified by:
_implementsin interfaceJClassDef- Overrides:
_implementsin classAbstractJClassDef- Parameters:
names- the type name- Returns:
- this type definition
-
_implements
public JClassDef _implements(JType... types)
Description copied from interface:JClassDefAdd one or moreimplementstype(s) to this type.- Specified by:
_implementsin interfaceJClassDef- Overrides:
_implementsin classAbstractJClassDef- Parameters:
types- the type- Returns:
- this type definition
-
_implements
public JClassDef _implements(java.lang.Class<?>... classes)
Description copied from interface:JClassDefAdd one or moreimplementstype(s) to this type.- Specified by:
_implementsin interfaceJClassDef- Overrides:
_implementsin classAbstractJClassDef- Parameters:
classes- the type- Returns:
- this type definition
-
init
public JBlock init(java.util.ArrayList<ClassContent> content)
- Specified by:
initin interfaceSectionable- Overrides:
initin classAbstractJClassDef
-
methodCanHaveBody
boolean methodCanHaveBody(int mods)
- Overrides:
methodCanHaveBodyin classAbstractJClassDef
-
constructor
public JMethodDef constructor(java.util.ArrayList<ClassContent> content, int mods)
- Specified by:
constructorin interfaceSectionable- Overrides:
constructorin classAbstractJClassDef
-
typeParam
public JTypeParamDef typeParam(java.lang.String name)
Description copied from interface:JGenericDefDefine a type parameter.- Specified by:
typeParamin interfaceJGenericDef- Overrides:
typeParamin classAbstractJClassDef- Parameters:
name- the type parameter name- Returns:
- the type parameter definition
-
method
public JMethodDef method(java.util.ArrayList<ClassContent> content, int mods, JType returnType, java.lang.String name)
- Specified by:
methodin interfaceSectionable- Overrides:
methodin classAbstractJClassDef
-
getItemKind
public JClassItem.Kind getItemKind()
Description copied from interface:JClassItemGet the kind of item.- Specified by:
getItemKindin interfaceJClassItem- Returns:
- the item kind
-
getName
public java.lang.String getName()
Description copied from interface:JClassItemGet the name of this element, if there is one.- Specified by:
getNamein interfaceJClassItem- Overrides:
getNamein classAbstractJClassDef- Returns:
- the name, or
nullif there is none
-
-