Package org.jboss.jdeparser
Class ImplJAnonymousClassDef
java.lang.Object
org.jboss.jdeparser.AbstractJExpr
org.jboss.jdeparser.AbstractJCall
org.jboss.jdeparser.ImplJAnonymousClassDef
- All Implemented Interfaces:
AllowedStatementExpression
,JAnnotatable
,JAnonymousClassDef
,JCall
,JClassDef
,JClassDefSection
,JCommentable
,JDocCommentable
,JExpr
,JGenericDef
,JSimpleArgs
,Writable
- Direct Known Subclasses:
InnerJAnonymousClassDef
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a nested class to this type.Add a nested enum to this type.Add an enum constant.Add anextends
type to this type.Add anextends
type to this type.Add anextends
type to this type._implements
(Class<?>... classes) Add one or moreimplements
type(s) to this type._implements
(String... names) Add one or moreimplements
type(s) to this type._implements
(JType... types) Add one or moreimplements
type(s) to this type._interface
(int mods, String name) Add a nested interface to this type.annotate
(Class<? extends Annotation> type) Add an annotation.Add an annotation.Add an annotation.annotationInterface
(int mods, String name) Add a nested annotation interface to this type.Add a blank line at this point of the type.Add a block comment.constructor
(int mods) Add a constructor to this type.Mark this program element as deprecated.Get or create the doc comment for this element.Get the erased type corresponding to this type definition.Add a field to this type.Add a field to this type.Add a field to this type.Add a field to this type.Add a field to this type.Add a field to this type.Get a generic type for this type definition, where the type arguments are the same as the type parameters of this type (as defined at the time this method is called).init()
Add a "raw" initialization block to this type definition.Add a line comment.Add a method to this type.Add a method to this type.Add a method to this type.section()
Create a section at this point, into which additional items may be added.Add a static initialization block to this type definition.type()
Define a type parameter.Get all the type parameters defined at the time of invocation.void
write
(SourceFileWriter writer) Methods inherited from class org.jboss.jdeparser.AbstractJCall
arg, arguments, diamond, typeArg, typeArg, typeArg, typeArguments, writeTypeArgs
Methods inherited from class org.jboss.jdeparser.AbstractJExpr
_instanceof, _instanceof, _instanceof, _new, _new, _new, _newAnon, _newAnon, _newAnon, $v, and, band, bor, bxor, call, cast, cast, cast, comp, cond, div, eq, field, ge, gt, idx, idx, le, length, lshr, lt, minus, mod, ne, neg, not, of, or, paren, plus, prec, shl, shr, times
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.JCall
arg, arguments, diamond, typeArg, typeArg, typeArg, typeArguments
Methods inherited from interface org.jboss.jdeparser.JExpr
_instanceof, _instanceof, _instanceof, _new, _new, _new, _newAnon, _newAnon, _newAnon, $v, and, band, bor, bxor, call, cast, cast, cast, comp, cond, div, eq, field, ge, gt, idx, idx, le, length, lshr, lt, minus, mod, ne, neg, not, or, paren, plus, shl, shr, times
-
Field Details
-
classDef
-
type
-
-
Constructor Details
-
ImplJAnonymousClassDef
ImplJAnonymousClassDef(JType type)
-
-
Method Details
-
type
-
write
- Specified by:
write
in interfaceWritable
- Overrides:
write
in classAbstractJCall
- Throws:
IOException
-
section
Description copied from interface:JClassDefSection
Create a section at this point, into which additional items may be added.- Specified by:
section
in interfaceJClassDefSection
- Returns:
- the new section to add
-
_extends
Description copied from interface:JClassDef
Add anextends
type to this type. -
_extends
Description copied from interface:JClassDef
Add anextends
type to this type. -
_extends
Description copied from interface:JClassDef
Add anextends
type to this type. -
_implements
Description copied from interface:JClassDef
Add one or moreimplements
type(s) to this type.- Specified by:
_implements
in interfaceJClassDef
- Parameters:
names
- the type name- Returns:
- this type definition
-
_implements
Description copied from interface:JClassDef
Add one or moreimplements
type(s) to this type.- Specified by:
_implements
in interfaceJClassDef
- Parameters:
types
- the type- Returns:
- this type definition
-
_implements
Description copied from interface:JClassDef
Add one or moreimplements
type(s) to this type.- Specified by:
_implements
in interfaceJClassDef
- Parameters:
classes
- the type- Returns:
- this type definition
-
erasedType
Description copied from interface:JClassDef
Get the erased type corresponding to this type definition.- Specified by:
erasedType
in interfaceJClassDef
- Returns:
- the erased type
-
blankLine
Description copied from interface:JClassDef
Add a blank line at this point of the type.- Specified by:
blankLine
in interfaceJClassDef
- Specified by:
blankLine
in interfaceJClassDefSection
- Returns:
- this type definition
-
genericType
Description copied from interface:JClassDef
Get a generic type for this type definition, where the type arguments are the same as the type parameters of this type (as defined at the time this method is called).- Specified by:
genericType
in interfaceJClassDef
- Returns:
- the generic type
-
typeParam
Description copied from interface:JGenericDef
Define a type parameter.- Specified by:
typeParam
in interfaceJGenericDef
- Parameters:
name
- the type parameter name- Returns:
- the type parameter definition
-
init
Description copied from interface:JClassDefSection
Add a "raw" initialization block to this type definition.- Specified by:
init
in interfaceJClassDefSection
- Returns:
- the initialization block
-
staticInit
Description copied from interface:JClassDefSection
Add a static initialization block to this type definition.- Specified by:
staticInit
in interfaceJClassDefSection
- Returns:
- the static initialization block
-
_enum
Description copied from interface:JClassDef
Add an enum constant. If the class being defined is not an enum, an exception is thrown. -
field
Description copied from interface:JClassDefSection
Add a field to this type.- Specified by:
field
in interfaceJClassDefSection
- Parameters:
mods
- the modifierstype
- the field typename
- the field name- Returns:
- the field declaration
-
field
Description copied from interface:JClassDefSection
Add a field to this type.- Specified by:
field
in interfaceJClassDefSection
- Parameters:
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned value- Returns:
- the field declaration
-
field
Description copied from interface:JClassDefSection
Add a field to this type.- Specified by:
field
in interfaceJClassDefSection
- Parameters:
mods
- the modifierstype
- the field typename
- the field name- Returns:
- the field declaration
-
field
Description copied from interface:JClassDefSection
Add a field to this type.- Specified by:
field
in interfaceJClassDefSection
- Parameters:
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned value- Returns:
- the field declaration
-
field
Description copied from interface:JClassDefSection
Add a field to this type.- Specified by:
field
in interfaceJClassDefSection
- Parameters:
mods
- the modifierstype
- the field typename
- the field name- Returns:
- the field declaration
-
field
Description copied from interface:JClassDefSection
Add a field to this type.- Specified by:
field
in interfaceJClassDefSection
- Parameters:
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned value- Returns:
- the field declaration
-
method
Description copied from interface:JClassDefSection
Add a method to this type.- Specified by:
method
in interfaceJClassDefSection
- Parameters:
mods
- the modifiersreturnType
- the method return typename
- the method name- Returns:
- the method definition
-
method
Description copied from interface:JClassDefSection
Add a method to this type.- Specified by:
method
in interfaceJClassDefSection
- Parameters:
mods
- the modifiersreturnType
- the method return typename
- the method name- Returns:
- the method definition
-
method
Description copied from interface:JClassDefSection
Add a method to this type.- Specified by:
method
in interfaceJClassDefSection
- Parameters:
mods
- the modifiersreturnType
- the method return typename
- the method name- Returns:
- the method definition
-
constructor
Description copied from interface:JClassDefSection
Add a constructor to this type.- Specified by:
constructor
in interfaceJClassDefSection
- Parameters:
mods
- the modifiers- Returns:
- the constructor definition
-
typeParams
Description copied from interface:JGenericDef
Get all the type parameters defined at the time of invocation.- Specified by:
typeParams
in interfaceJGenericDef
- Returns:
- the type parameters
-
annotate
Description copied from interface:JAnnotatable
Add an annotation.- Specified by:
annotate
in interfaceJAnnotatable
- Parameters:
type
- the type of the annotation to add- Returns:
- the new annotation
-
annotate
Description copied from interface:JAnnotatable
Add an annotation.- Specified by:
annotate
in interfaceJAnnotatable
- Parameters:
type
- the type of the annotation to add- Returns:
- the new annotation
-
annotate
Description copied from interface:JAnnotatable
Add an annotation.- Specified by:
annotate
in interfaceJAnnotatable
- Parameters:
type
- the type of the annotation to add- Returns:
- the new annotation
-
docComment
Description copied from interface:JDocCommentable
Get or create the doc comment for this element.- Specified by:
docComment
in interfaceJDocCommentable
- Returns:
- the doc comment body
-
deprecated
Description copied from interface:JDocCommentable
Mark this program element as deprecated.- Specified by:
deprecated
in interfaceJDocCommentable
- Returns:
- the deprecation tag body
-
lineComment
Description copied from interface:JCommentable
Add a line comment.- Specified by:
lineComment
in interfaceJCommentable
- Overrides:
lineComment
in classAbstractJCall
- Returns:
- the line comment body
-
blockComment
Description copied from interface:JCommentable
Add a block comment.- Specified by:
blockComment
in interfaceJCommentable
- Overrides:
blockComment
in classAbstractJCall
- Returns:
- the block comment body
-
_class
Description copied from interface:JClassDefSection
Add a nested class to this type.- Specified by:
_class
in interfaceJClassDefSection
- Parameters:
mods
- the class modifiersname
- the class name- Returns:
- the nested class
-
_enum
Description copied from interface:JClassDefSection
Add a nested enum to this type.- Specified by:
_enum
in interfaceJClassDefSection
- Parameters:
mods
- the enum modifiersname
- the enum name- Returns:
- the nested enum
-
_interface
Description copied from interface:JClassDefSection
Add a nested interface to this type.- Specified by:
_interface
in interfaceJClassDefSection
- Parameters:
mods
- the interface modifiersname
- the interface name- Returns:
- the nested interface
-
annotationInterface
Description copied from interface:JClassDefSection
Add a nested annotation interface to this type.- Specified by:
annotationInterface
in interfaceJClassDefSection
- Parameters:
mods
- the annotation interface modifiersname
- the annotation interface name- Returns:
- the nested annotation interface
-