Package org.datanucleus.enhancer.methods
Class IsXXX
java.lang.Object
org.datanucleus.enhancer.ClassMethod
org.datanucleus.enhancer.methods.IsXXX
- Direct Known Subclasses:
IsDeleted
,IsNew
,IsPersistent
,IsTransactional
Base method to use for dnIsXXX methods providing the majority of the enhancement.
-
Field Summary
Fields inherited from class org.datanucleus.enhancer.ClassMethod
access, argNames, argTypes, enhancer, exceptions, methodName, returnType, visitor
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.datanucleus.enhancer.ClassMethod
close, equals, getAccess, getClassEnhancer, getDescriptor, getMethodAdditionMessage, getName, getNamer, hashCode, initialise, initialise
-
Constructor Details
-
IsXXX
public IsXXX(ClassEnhancer enhancer, String name, int access, Object returnType, Object[] argTypes, String[] argNames) Constructor.- Parameters:
enhancer
- ClassEnhancername
- Name of methodaccess
- Access typereturnType
- Return typeargTypes
- Argument typesargNames
- Argument names
-
-
Method Details
-
getStateManagerIsMethod
Method returning the name of the method on the StateManager that gives the return info.- Returns:
- Name of the StateManager method (isNew, isPersistent, isDeleted etc)
-
execute
public void execute()Method to add the contents of the class method. Creates the method as followsreturn dnStateManager != null ? dnStateManager.isXXX(this) : false;
where "isXXX" is replaced by the output of "getStateManagerIsMethod"- Specified by:
execute
in classClassMethod
-