public class Method extends DefinitionBase
Modifier and Type | Field and Description |
---|---|
protected Type |
declaringType |
protected ImplementationInfo |
implementationInfo |
protected String |
javaDoc |
protected EnumSet<Modifier> |
modifiers |
protected Optional<Method> |
overriddenByMethod |
protected Optional<Method> |
overridesMethod |
protected List<Parameter> |
parameters |
protected Type |
returnType |
protected String |
templateName |
protected List<Type> |
thrownTypes |
annotations, clazz, declaredModifiers, name
MAX_RECURSIVE_LEVEL, NO_DETAILS_LEVEL
Constructor and Description |
---|
Method(BasicClazz clazz,
Type declaringType,
String methodName,
Type returnType,
List<Parameter> parameters,
List<Type> thrownTypes,
String javaDoc,
EnumSet<Modifier> declaredModifiers,
EnumSet<Modifier> modifiers,
List<Annotation> annotations,
ImplementationInfo implementationInfo,
TemplateKind templateKind) |
Method(BasicClazz clazz,
Type declaringType,
String methodName,
Type returnType,
List<Parameter> parameters,
List<Type> thrownTypes,
String javaDoc,
EnumSet<Modifier> declaredModifiers,
List<Annotation> annotations,
ImplementationInfo implementationInfo,
TemplateKind templateKind) |
Modifier and Type | Method and Description |
---|---|
private static EnumSet<Modifier> |
defaultModifiers(Configuration cfg,
EnumSet<Modifier> declaredModifiers) |
Type |
getDeclaringType() |
ImplementationInfo |
getImplementationInfo() |
String |
getJavaDoc() |
EnumSet<Modifier> |
getModifiers()
Get modifiers as they should be used generated code when defining something.
|
String |
getOverloadName()
Return The name of the method with unqualified type names in parenthesis.
|
static String |
getOverloadName(String methodName,
List<Parameter> parameters) |
Optional<Method> |
getOverriddenByMethod() |
Optional<Method> |
getOverridesMethod() |
String |
getPackageName()
The package that the output belongs to.
|
List<Parameter> |
getParameters() |
String |
getQualifiedName() |
Type |
getReturnType() |
String |
getTemplateName()
Return The name of the method followed by underscore seperated unqualified type names in parenthesis.
|
List<Type> |
getThrownTypes() |
boolean |
isConstructor()
Checks if the method is a constructor method.
|
boolean |
isDeclared() |
boolean |
isDelegating() |
boolean |
isFactoryMethod()
Checks if the method is a static factory method.
|
boolean |
isOverridden() |
boolean |
isPrimary()
Checks if the method is the most complete creation method and thus the one to use for construction .
|
boolean |
isThisReturnType() |
void |
print(IndentedPrintWriter writer,
int detailLevel)
Helper method for printing out the model nicely without getting into problems with its circular references.
|
void |
setImplementationInfo(ImplementationInfo implementationInfo) |
void |
setOverriddenByMethod(Method overriddenByMethod) |
getAnnotations, getClazz, getConfiguration, getDeclaredModifiers, getName
printExtraBottom, printExtraTop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isAbstract, isFinal, isPrivate, isProtected, isPublic, isStatic, isTransient
getGeneratedClazz, getVariablesPrefix, isInDefaultPackage
protected final Type declaringType
protected final String javaDoc
protected final Type returnType
protected final String templateName
protected ImplementationInfo implementationInfo
public Method(BasicClazz clazz, Type declaringType, String methodName, Type returnType, List<Parameter> parameters, List<Type> thrownTypes, String javaDoc, EnumSet<Modifier> declaredModifiers, List<Annotation> annotations, ImplementationInfo implementationInfo, TemplateKind templateKind)
public Method(BasicClazz clazz, Type declaringType, String methodName, Type returnType, List<Parameter> parameters, List<Type> thrownTypes, String javaDoc, EnumSet<Modifier> declaredModifiers, EnumSet<Modifier> modifiers, List<Annotation> annotations, ImplementationInfo implementationInfo, TemplateKind templateKind)
private static EnumSet<Modifier> defaultModifiers(Configuration cfg, EnumSet<Modifier> declaredModifiers)
public String getPackageName()
Model
public ImplementationInfo getImplementationInfo()
public void setImplementationInfo(ImplementationInfo implementationInfo)
public void setOverriddenByMethod(Method overriddenByMethod)
public final boolean isOverridden()
public boolean isFactoryMethod()
public boolean isConstructor()
public boolean isPrimary()
public boolean isThisReturnType()
public Type getReturnType()
public boolean isDeclared()
public Type getDeclaringType()
public EnumSet<Modifier> getModifiers()
Definition
public String getQualifiedName()
public String getOverloadName()
public static final String getOverloadName(String methodName, List<Parameter> parameters)
public final String getTemplateName()
public String getJavaDoc()
public boolean isDelegating()
public void print(IndentedPrintWriter writer, int detailLevel)
Model
Version 2.0.0 generated on 2014-11-22 at 09:45 - (C) 41concepts Aps. Refer to project homepage valjogen.41concepts.com for more information.