class MethodJMethodDef extends AbstractJMethodDef implements JClassItem
JClassItem.Kind
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
private JType |
returnType |
SMART_NAME_SORT
Constructor and Description |
---|
MethodJMethodDef(AbstractJClassDef clazz,
int mods,
JType returnType,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
JClassItem.Kind |
getItemKind()
Get the kind of item.
|
int |
getModifiers()
Get the modifiers of this item.
|
java.lang.String |
getName()
Get the name of this element, if there is one.
|
(package private) JType |
getReturnType() |
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) |
_default, _default, _throws, _throws, _throws, body, clazz, param, param, param, param, param, param, params, returnsDoc, varargParam, varargParam, varargParam, varargParam, varargParam, varargParam, writeBody, writePostfix
typeParam, typeParams, typeParamsToArgs, writeTypeParams
annotate, annotate, annotate, writeAnnotations
deprecated, docComment, writeDocComments
blockComment, lineComment, writeComments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
typeParam, typeParams
annotate, annotate, annotate
deprecated, docComment
blockComment, lineComment
private final JType returnType
private final java.lang.String name
MethodJMethodDef(AbstractJClassDef clazz, int mods, JType returnType, java.lang.String name)
JType getReturnType()
public void write(SourceFileWriter writer) throws java.io.IOException
write
in interface Writable
write
in class AbstractJMethodDef
java.io.IOException
public java.lang.String getName()
JClassItem
getName
in interface JClassItem
null
if there is nonepublic int getModifiers()
JClassItem
getModifiers
in interface JClassItem
getModifiers
in class AbstractJMethodDef
JMod
public JClassItem.Kind getItemKind()
JClassItem
getItemKind
in interface JClassItem
public boolean hasAllModifiers(int mods)
JClassItem
hasAllModifiers
in interface JClassItem
mods
- the modifier(s)true
if all of the modifiers are present, false
otherwisepublic boolean hasAnyModifier(int mods)
JClassItem
hasAnyModifier
in interface JClassItem
mods
- the modifier(s)true
if any if the modifiers are present, false
otherwise