Package org.jboss.jdeparser
Class MethodJMethodDef
- All Implemented Interfaces:
ClassContent
,JAnnotatable
,JClassItem
,JCommentable
,JDocCommentable
,JGenericDef
,JMethodDef
,Writable
- Direct Known Subclasses:
AnnotationJMethodDef
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.jdeparser.JClassItem
JClassItem.Kind
-
Field Summary
FieldsFields inherited from interface org.jboss.jdeparser.JClassItem
SMART_NAME_SORT
-
Constructor Summary
ConstructorsConstructorDescriptionMethodJMethodDef
(AbstractJClassDef clazz, int mods, JType returnType, String name) -
Method Summary
Modifier and TypeMethodDescriptionGet the kind of item.int
Get the modifiers of this item.getName()
Get the name of this element, if there is one.(package private) JType
boolean
hasAllModifiers
(int mods) Determine whether this item has all of the modifiers specified by the given bitwise-OR-joined argument.boolean
hasAnyModifier
(int mods) Determine whether this item has any of the modifiers specified by the given bitwise-OR-joined argument.void
write
(SourceFileWriter writer) Methods inherited from class org.jboss.jdeparser.AbstractJMethodDef
_default, _default, _throws, _throws, _throws, body, clazz, param, param, param, param, param, param, params, returnsDoc, varargParam, varargParam, varargParam, varargParam, varargParam, varargParam, writeBody, writePostfix
Methods inherited from class org.jboss.jdeparser.AbstractJGeneric
typeParam, 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
blockComment, lineComment, 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.JCommentable
blockComment, lineComment
Methods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docComment
Methods inherited from interface org.jboss.jdeparser.JGenericDef
typeParam, typeParams
-
Field Details
-
returnType
-
name
-
-
Constructor Details
-
MethodJMethodDef
MethodJMethodDef(AbstractJClassDef clazz, int mods, JType returnType, String name)
-
-
Method Details
-
getReturnType
JType getReturnType() -
write
- Specified by:
write
in interfaceWritable
- Overrides:
write
in classAbstractJMethodDef
- Throws:
IOException
-
getName
Description copied from interface:JClassItem
Get the name of this element, if there is one.- Specified by:
getName
in interfaceJClassItem
- Returns:
- the name, or
null
if there is none
-
getModifiers
public int getModifiers()Description copied from interface:JClassItem
Get the modifiers of this item.- Specified by:
getModifiers
in interfaceJClassItem
- Overrides:
getModifiers
in classAbstractJMethodDef
- Returns:
- the modifiers
- See Also:
-
getItemKind
Description copied from interface:JClassItem
Get the kind of item.- Specified by:
getItemKind
in interfaceJClassItem
- Returns:
- the item kind
-
hasAllModifiers
public boolean hasAllModifiers(int mods) Description copied from interface:JClassItem
Determine whether this item has all of the modifiers specified by the given bitwise-OR-joined argument.- Specified by:
hasAllModifiers
in interfaceJClassItem
- Parameters:
mods
- the modifier(s)- Returns:
true
if all of the modifiers are present,false
otherwise
-
hasAnyModifier
public boolean hasAnyModifier(int mods) Description copied from interface:JClassItem
Determine whether this item has any of the modifiers specified by the given bitwise-OR-joined argument.- Specified by:
hasAnyModifier
in interfaceJClassItem
- Parameters:
mods
- the modifier(s)- Returns:
true
if any if the modifiers are present,false
otherwise
-