public abstract class BuiltInMethod extends java.lang.Object implements Method
SimpleConversion doesn't suffice, e.g. as several lines of source code or a
try/catch block are required.| Constructor and Description |
|---|
BuiltInMethod() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doTypeVarsMatch(Type parameter,
Type returnType)
Analyzes the Java Generic type variables in the parameter do match the type variables in the build in method
same goes for the returnType.
|
boolean |
equals(java.lang.Object obj)
equals based on class
|
Accessibility |
getAccessibility()
Returns the
Accessibility of this method. |
java.lang.String |
getContextParameter(ConversionContext conversionContext)
the conversion context is used to format an auxiliary parameter in the method call
with context specific information such as a date format.
|
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(). |
java.util.Set<Type> |
getImportTypes()
Returns the types used by this method for which import statements need to be generated.
|
java.lang.String |
getName()
Returns then name of the method.
|
abstract Parameter |
getParameter()
There's currently only one parameter foreseen instead of a list of parameter
|
java.util.List<Parameter> |
getParameters()
In contrast to
Method.getSourceParameters() this method returns all parameters |
java.util.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.getTargetParameter(). |
Parameter |
getTargetParameter()
target parameter mechanism not supported for built-in methods
|
java.util.List<Type> |
getThrownTypes()
Returns all exceptions thrown by this method
|
int |
hashCode()
hashCode based on class
|
boolean |
matches(java.util.List<Type> sourceTypes,
Type targetType)
Checks whether the provided sourceType and provided targetType match with the parameter respectively return type
of the method.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetReturnTypepublic java.lang.String getName()
public java.util.Set<Type> getImportTypes()
public boolean matches(java.util.List<Type> sourceTypes, Type targetType)
Default the targetType should be assignable to the returnType and the sourceType to the parameter, excluding generic type variables. When the implementor sees a need for this, this method can be overridden.
public java.util.List<Parameter> getSourceParameters()
MethodMethod.getTargetParameter().getSourceParameters in interface Methodpublic final Type getDeclaringMapper()
Mapper#users().
For built-in methods, the declaring mapper is always null as they will be added as private methods to the
generated mapper.
getDeclaringMapper in interface Methodnullpublic java.util.List<Parameter> getParameters()
MethodMethod.getSourceParameters() this method returns all parametersgetParameters in interface Methodpublic Parameter getTargetParameter()
getTargetParameter in interface Methodnullpublic java.lang.String getContextParameter(ConversionContext conversionContext)
conversionContext - public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - other classpublic boolean doTypeVarsMatch(Type parameter, Type returnType)
parameter - sourcereturnType - targetpublic abstract Parameter getParameter()
public Accessibility getAccessibility()
MethodAccessibility of this method.getAccessibility in interface MethodAccessibility of this methodpublic java.util.List<Type> getThrownTypes()
MethodgetThrownTypes in interface MethodCopyright © 2012-2014. All Rights Reserved.