- java.lang.Object
-
- org.datanucleus.enhancer.ClassMethod
-
- org.datanucleus.enhancer.methods.IsXXX
-
- Direct Known Subclasses:
IsDeleted
,IsNew
,IsPersistent
,IsTransactional
public abstract class IsXXX extends ClassMethod
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
execute()
Method to add the contents of the class method.protected abstract String
getStateManagerIsMethod()
Method returning the name of the method on the StateManager that gives the return info.-
Methods inherited from class org.datanucleus.enhancer.ClassMethod
close, equals, getAccess, getClassEnhancer, getDescriptor, getMethodAdditionMessage, getName, getNamer, hashCode, initialise, initialise
-
-
-
-
Constructor Detail
-
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 Detail
-
getStateManagerIsMethod
protected abstract String 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
-
-