public class MetadataMethod extends MetadataAnnotatedElement
| Modifier and Type | Field and Description |
|---|---|
protected MetadataClass |
m_metadataClass
Class that the method is defined in.
|
protected MetadataMethod |
m_next
Used to store multiple methods with the same name in a class.
|
protected java.util.List<java.lang.String> |
m_parameters
List of class names of method parameters.
|
protected java.lang.String |
m_returnType
Class name of method return type.
|
protected MetadataMethod |
m_setMethod
Corresponding set method, if the method is an accessor get method.
|
DEFAULT_RAW_CLASSm_factory| Constructor and Description |
|---|
MetadataMethod(MetadataFactory factory,
MetadataClass metadataClass)
Create the method from the class metadata.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(java.lang.String parameter)
INTERNAL:
|
MetadataClass |
getMetadataClass()
INTERNAL:
|
MetadataMethod |
getNext()
INTERNAL:
|
java.util.List<java.lang.String> |
getParameters()
INTERNAL:
|
java.lang.String |
getReturnType()
INTERNAL:
|
MetadataMethod |
getSetMethod()
INTERNAL:
Method to convert a getMethod into a setMethod.
|
MetadataMethod |
getSetMethod(MetadataClass cls)
INTERNAL:
Method to convert a getMethod into a setMethod.
|
java.lang.String |
getSetMethodName()
INTERNAL:
|
boolean |
hasAttributeName()
INTERNAL:
|
boolean |
hasParameters()
INTERNAL:
|
boolean |
hasSetMethod()
INTERNAL:
|
boolean |
isALifeCycleCallbackMethod()
INTERNAL:
Return true if it has a valid name (starts with get or is) and has a
property name (getXyz or isXyz) and does not have parameters and has
an associated set method.
|
protected boolean |
isValidPersistenceMethod()
INTERNAL:
Return true if it has a valid name (starts with 'get' or 'is') and has a
property name (get'Xyz' or is'Xyz') and does not have parameters and has
an associated set method.
|
boolean |
isValidPersistenceMethod(boolean mustBeExplicit,
ClassAccessor classAccessor)
INTERNAL:
Return true is this method is a valid persistence method.
|
boolean |
isValidPersistenceMethod(ClassAccessor classAccessor,
boolean userDecorated)
INTERNAL:
Return true is this method is a valid persistence method.
|
boolean |
isValidPersistenceMethodName()
INTERNAL:
|
void |
setMetadataClass(MetadataClass metadataClass)
INTERNAL:
|
void |
setNext(MetadataMethod next)
INTERNAL:
|
void |
setParameters(java.util.List<java.lang.String> parameters)
INTERNAL:
|
void |
setReturnType(java.lang.String returnType)
INTERNAL:
|
void |
setSetMethod(MetadataMethod method)
INTERNAL:
Method to convert a getMethod into a setMethod.
|
addAnnotation, addGenericType, addMetaAnnotation, areAnnotationsCompatibleWithTransient, equals, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotations, getAttributeName, getDeclaredAnnotationsCount, getGenericType, getMapKeyClass, getModifiers, getName, getPrimitiveType, getRawClass, getRawClassWithGenerics, getReferenceClassFromGeneric, getType, hasDeclaredAnnotations, hashCode, isAnnotationNotPresent, isAnnotationNotPresent, isAnnotationPresent, isAnnotationPresent, isAnnotationPresent, isArray, isBasic, isBasicCollection, isBasicMap, isDerivedId, isDerivedIdClass, isElementCollection, isEmbedded, isEmbeddedId, isGenericCollectionType, isGenericType, isId, isManyToMany, isManyToOne, isOneToMany, isOneToOne, isStructure, isSupportedCollectionClass, isSupportedMapClass, isSupportedToManyCollectionClass, isTransformation, isValidPersistenceElement, isValidPersistenceElement, isVariableOneToOne, isVersion, setAnnotations, setAttributeName, setGenericType, setModifiers, setName, setPrimitiveType, setType, toStringgetLogger, getMetadataClass, getMetadataFactory, setMetadataFactoryprotected MetadataClass m_metadataClass
protected java.lang.String m_returnType
protected java.util.List<java.lang.String> m_parameters
protected MetadataMethod m_setMethod
protected MetadataMethod m_next
public MetadataMethod(MetadataFactory factory, MetadataClass metadataClass)
public void addParameter(java.lang.String parameter)
public MetadataClass getMetadataClass()
public MetadataMethod getNext()
public java.util.List<java.lang.String> getParameters()
public java.lang.String getReturnType()
public MetadataMethod getSetMethod()
public void setSetMethod(MetadataMethod method)
public MetadataMethod getSetMethod(MetadataClass cls)
public java.lang.String getSetMethodName()
public boolean hasAttributeName()
public boolean hasParameters()
public boolean hasSetMethod()
public boolean isALifeCycleCallbackMethod()
protected boolean isValidPersistenceMethod()
public boolean isValidPersistenceMethod(boolean mustBeExplicit,
ClassAccessor classAccessor)
public boolean isValidPersistenceMethod(ClassAccessor classAccessor, boolean userDecorated)
public boolean isValidPersistenceMethodName()
public void setMetadataClass(MetadataClass metadataClass)
public void setNext(MetadataMethod next)
public void setParameters(java.util.List<java.lang.String> parameters)
public void setReturnType(java.lang.String returnType)