Class MethodDescriptor
java.lang.Object
com.univocity.parsers.annotations.helpers.MethodDescriptor
A very basic descriptor or getter/setter methods
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
MethodDescriptor
(String name, Class<?> parameterType, Class<?> returnType) private
MethodDescriptor
(String prefix, String name, Class<?> parameterType, Class<?> returnType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
private String
getName()
Returns the method name, without the prefixClass<?>
Returns the parameter type associated with a method, if availableReturns the prefix: a dot separated string denoting a path of nested object names (e.g.Returns full path to a method, (e.g.Class<?>
Returns the return type associated with a method, if availablestatic MethodDescriptor
Creates a descriptor for a getter method(package private) static MethodDescriptor
Creates a descriptor for a getter methodint
hashCode()
static MethodDescriptor
Creates a descriptor for a setter method(package private) static MethodDescriptor
Creates a descriptor for a setter methodtoString()
-
Field Details
-
prefixedName
-
name
-
prefix
-
parameterType
-
returnType
-
string
-
-
Constructor Details
-
MethodDescriptor
-
MethodDescriptor
-
-
Method Details
-
generateString
-
setter
Creates a descriptor for a setter method- Parameters:
name
- name of the setter methodparameterType
- the parameter type accepted by the given setter method- Returns:
- a "setter" method descriptor
-
getter
Creates a descriptor for a getter method- Parameters:
name
- name of the getter methodreturnType
- the return type of the given getter method- Returns:
- a "getter" method descriptor
-
setter
Creates a descriptor for a setter method- Parameters:
prefix
- a dot separated string denoting a path of nested object namesmethod
- a actual class method to be associated with this prefix- Returns:
- a "setter" method descriptor
-
getter
Creates a descriptor for a getter method- Parameters:
prefix
- a dot separated string denoting a path of nested object namesmethod
- a actual class method to be associated with this prefix- Returns:
- a "getter" method descriptor
-
getName
Returns the method name, without the prefix- Returns:
- the method name
-
getPrefix
Returns the prefix: a dot separated string denoting a path of nested object names (e.g. customer.contact).- Returns:
- the object nesting path associated with a method.
-
getParameterType
Returns the parameter type associated with a method, if available- Returns:
- the type of parameter accepted by this method if it is a setter, or
null
if a getter is being represented.
-
getReturnType
Returns the return type associated with a method, if available- Returns:
- the return type of this method if it is a getter, or
null
if a setter is being represented.
-
getPrefixedName
Returns full path to a method, (e.g.getName
orperson.getName
- Returns:
- the path to the given method.
-
toString
-
equals
-
hashCode
public int hashCode()
-