public class MethodModel extends MemberModel
isProperty| Modifier and Type | Field and Description |
|---|---|
static List<ParamModel> |
NO_PARAMS |
INTERNAL, PRIVATE, PROTECTED, PUBLIC| Constructor and Description |
|---|
MethodModel() |
MethodModel(MethodType methodType,
String name,
String type) |
MethodModel(String name,
String returnType) |
MethodModel(String name,
String returnType,
List<ParamModel> params) |
MethodModel(String name,
String returnType,
ParamModel... params) |
| Modifier and Type | Method and Description |
|---|---|
void |
addParam(ParamModel paramModel)
Add a parameter.
|
MethodModel |
duplicate() |
boolean |
equals(Object o) |
String |
getBody() |
MethodType |
getMethodType() |
List<ParamModel> |
getParams() |
ReturnModel |
getReturnModel() |
int |
hashCode() |
boolean |
isAccessor() |
boolean |
isFinal() |
boolean |
isGetter() |
boolean |
isMethod() |
boolean |
isOverride() |
boolean |
isReadable() |
boolean |
isSetter() |
boolean |
isWritable() |
void |
setBody(String body) |
void |
setFinal(boolean aFinal) |
void |
setMethodType(MethodType methodType) |
void |
setOverride(boolean override) |
void |
setParams(List<ParamModel> params) |
void |
visit(ModelVisitor visitor) |
getNamespace, getType, isField, isProperty, isStatic, setNamespace, setStatic, setTypeaddAnnotation, getAnnotations, getAnnotations, setAnnotationsgetAsdoc, setAsdocgetName, setNamepublic static final List<ParamModel> NO_PARAMS
public MethodModel()
public MethodModel(MethodType methodType, String name, String type)
public MethodModel(String name, String returnType, ParamModel... params)
public MethodModel(String name, String returnType, List<ParamModel> params)
public boolean isReadable()
isReadable in class MemberModelpublic boolean isWritable()
isWritable in class MemberModelpublic boolean isMethod()
isMethod in class MemberModelpublic boolean isAccessor()
isAccessor in class MemberModelpublic boolean isGetter()
isGetter in class MemberModelpublic boolean isSetter()
isSetter in class MemberModelpublic boolean isOverride()
public void setOverride(boolean override)
public boolean isFinal()
public void setFinal(boolean aFinal)
public MethodType getMethodType()
public void setMethodType(MethodType methodType)
public List<ParamModel> getParams()
public void setParams(List<ParamModel> params)
public String getBody()
public void setBody(String body)
public void addParam(ParamModel paramModel)
paramModel - must be "frozen"!public ReturnModel getReturnModel()
public void visit(ModelVisitor visitor)
public MethodModel duplicate()
public boolean equals(Object o)
equals in class MemberModelpublic int hashCode()
hashCode in class MemberModelCopyright © 2002–2017 CoreMedia AG. All rights reserved.