| Constructor and Description |
|---|
ForgedMethod(String name,
ForgedMethod forgedMethod)
creates a new ForgedMethod with the same arguments but with a new name
|
ForgedMethod(String name,
Type sourceType,
Type targetType,
ExecutableElement positionHintElement)
Creates a new forged method with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
Accessibility |
getAccessibility()
Returns the
Accessibility of this method. |
Type |
getDeclaringMapper()
Returns the mapper type declaring this method if it is not declared by the mapper interface currently processed
but by another mapper imported via
Mapper#users(). |
ExecutableElement |
getExecutable() |
MapperConfiguration |
getMapperConfiguration() |
Parameter |
getMappingTargetParameter()
Returns the parameter designated as mapping target (if present)
MappingTarget |
String |
getName()
Returns then name of the method.
|
List<String> |
getParameterNames() |
List<Parameter> |
getParameters()
In contrast to
Method.getSourceParameters() this method returns all parameters |
Type |
getResultType()
Returns the type of the result.
|
Type |
getReturnType()
Returns the return type of the method
|
List<Parameter> |
getSourceParameters()
returns the list of 'true' source parameters excluding the parameter(s) that is designated as
target by means of the target annotation
Method.getMappingTargetParameter(). |
Parameter |
getTargetTypeParameter()
Returns the parameter designated as target type (if present)
TargetType |
List<Type> |
getThrownTypes()
Returns all exceptions thrown by this method
|
boolean |
isStatic()
Whether this method is static or an instance method
|
boolean |
matches(Type sourceTypes,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
boolean |
overridesMethod()
Whether this method overrides an abstract method.
|
String |
toString() |
public ForgedMethod(String name, Type sourceType, Type targetType, ExecutableElement positionHintElement)
name - the (unique name) for this methodsourceType - the source typetargetType - the target type.positionHintElement - element used to for reference to the position in the source file.public ForgedMethod(String name, ForgedMethod forgedMethod)
name - the new nameforgedMethod - existing forge methodpublic boolean matches(Type sourceTypes, Type targetType)
Methodpublic Type getDeclaringMapper()
MethodMapper#users().getDeclaringMapper in interface Methodpublic String getName()
Methodpublic List<Parameter> getParameters()
MethodMethod.getSourceParameters() this method returns all parametersgetParameters in interface Methodpublic List<Parameter> getSourceParameters()
MethodMethod.getMappingTargetParameter().getSourceParameters in interface Methodpublic Parameter getMappingTargetParameter()
MethodMappingTargetgetMappingTargetParameter in interface Methodpublic Parameter getTargetTypeParameter()
MethodTargetTypegetTargetTypeParameter in interface Methodpublic Accessibility getAccessibility()
MethodAccessibility of this method.getAccessibility in interface MethodAccessibility of this methodpublic Type getReturnType()
MethodgetReturnType in interface Methodpublic List<Type> getThrownTypes()
MethodgetThrownTypes in interface Methodpublic Type getResultType()
MethodMappingTarget,
or in absence the return type.getResultType in interface Methodpublic List<String> getParameterNames()
getParameterNames in interface Methodpublic boolean overridesMethod()
MethodoverridesMethod in interface Methodpublic ExecutableElement getExecutable()
getExecutable in interface Methodpublic boolean isStatic()
Methodpublic MapperConfiguration getMapperConfiguration()
getMapperConfiguration in interface MethodCopyright © 2012-2015. All Rights Reserved.