Class MethodDescriptor
- java.lang.Object
-
- com.univocity.parsers.annotations.helpers.MethodDescriptor
-
public final class MethodDescriptor extends java.lang.ObjectA very basic descriptor or getter/setter methods
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetName()Returns the method name, without the prefixjava.lang.Class<?>getParameterType()Returns the parameter type associated with a method, if availablejava.lang.StringgetPrefix()Returns the prefix: a dot separated string denoting a path of nested object names (e.g.java.lang.StringgetPrefixedName()Returns full path to a method, (e.g.java.lang.Class<?>getReturnType()Returns the return type associated with a method, if availablestatic MethodDescriptorgetter(java.lang.String name, java.lang.Class<?> returnType)Creates a descriptor for a getter methodinthashCode()static MethodDescriptorsetter(java.lang.String name, java.lang.Class<?> parameterType)Creates a descriptor for a setter methodjava.lang.StringtoString()
-
-
-
Method Detail
-
setter
public static MethodDescriptor setter(java.lang.String name, java.lang.Class<?> parameterType)
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
public static MethodDescriptor getter(java.lang.String name, java.lang.Class<?> returnType)
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
-
getName
public java.lang.String getName()
Returns the method name, without the prefix- Returns:
- the method name
-
getPrefix
public java.lang.String 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
public java.lang.Class<?> 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
nullif a getter is being represented.
-
getReturnType
public java.lang.Class<?> getReturnType()
Returns the return type associated with a method, if available- Returns:
- the return type of this method if it is a getter, or
nullif a setter is being represented.
-
getPrefixedName
public java.lang.String getPrefixedName()
Returns full path to a method, (e.g.getNameorperson.getName- Returns:
- the path to the given method.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-