Class ClassControl
- java.lang.Object
-
- com.sun.jdo.api.persistence.enhancer.util.Assertion
-
- com.sun.jdo.api.persistence.enhancer.util.Support
-
- com.sun.jdo.api.persistence.enhancer.impl.ClassControl
-
public final class ClassControl extends Support
ClassControl acts as the primary handle for a class within the filter tool. ClassControl instances are typically accessed through various methods on Environment.
-
-
Field Summary
Fields Modifier and Type Field Description static int
PersistAware
static int
PersistCapable
static int
PersistUnknown
static int
TransientOnly
static int
UpdateNew
static int
UpdateNewer
static int
UpdateNotNeeded
static int
UpdateUnknown
-
Constructor Summary
Constructors Constructor Description ClassControl(ClassFileSource theSource, ClassFile theFile, Environment env)
ConstructorClassControl(ClassFileSource theSource, Environment env)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.sun.jdo.api.persistence.enhancer.impl.ClassAction
action()
Get the ClassAction for this classvoid
annotate()
perform necessary annotation actions on the classboolean
annotateable()
Return true if the class is one which should be a candidate for annotation.void
augment()
Reparent class if neededClassFile
classFile()
Get the ClassFile data structure for the classString
className()
Return the class name in VM formboolean
filterRequired()
Return true if filtering of the class is required.void
noteUpdate()
Record a modification of the classstatic String
packageOf(String vmName)
Return the vm package name for the vm class nameint
persistType()
Return the persistence type for this classString
pkg()
Return the vm package name for this classvoid
requireUpdate()
Mark the class as requiring update.void
scan1()
Note the class characteristicsClassFileSource
source()
Return the source of the classString
sourceName()
Return the name of the class sourceboolean
updated()
Return true if the classfile has been updatedstatic String
userClassFromVMClass(String vmName)
Return the class name in user ('.' delimited) formString
userClassName()
Return the class name in user ('.' delimited) formstatic String
vmClassFromUserClass(String userName)
Return the class name in VM ('/' delimited) formvoid
write(File destFile)
Write the file.-
Methods inherited from class com.sun.jdo.api.persistence.enhancer.util.Support
getI18N, getI18N, getI18N, getI18N, getI18N, getI18N
-
-
-
-
Field Detail
-
TransientOnly
public static final int TransientOnly
- See Also:
- Constant Field Values
-
PersistUnknown
public static final int PersistUnknown
- See Also:
- Constant Field Values
-
PersistAware
public static final int PersistAware
- See Also:
- Constant Field Values
-
PersistCapable
public static final int PersistCapable
- See Also:
- Constant Field Values
-
UpdateNotNeeded
public static final int UpdateNotNeeded
- See Also:
- Constant Field Values
-
UpdateUnknown
public static final int UpdateUnknown
- See Also:
- Constant Field Values
-
UpdateNew
public static final int UpdateNew
- See Also:
- Constant Field Values
-
UpdateNewer
public static final int UpdateNewer
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClassControl
public ClassControl(ClassFileSource theSource, Environment env)
Constructor
-
ClassControl
public ClassControl(ClassFileSource theSource, ClassFile theFile, Environment env)
Constructor
-
-
Method Detail
-
updated
public boolean updated()
Return true if the classfile has been updated
-
noteUpdate
public void noteUpdate()
Record a modification of the class
-
classFile
public ClassFile classFile()
Get the ClassFile data structure for the class
-
persistType
public int persistType()
Return the persistence type for this class
-
filterRequired
public boolean filterRequired()
Return true if filtering of the class is required. This checks only whether the filtered version of the class is up to date w.r.t. its input class.
-
requireUpdate
public void requireUpdate()
Mark the class as requiring update.
-
annotateable
public boolean annotateable()
Return true if the class is one which should be a candidate for annotation.
-
action
public com.sun.jdo.api.persistence.enhancer.impl.ClassAction action()
Get the ClassAction for this class
-
scan1
public void scan1()
Note the class characteristics
-
augment
public void augment()
Reparent class if needed
-
annotate
public void annotate()
perform necessary annotation actions on the class
-
className
public String className()
Return the class name in VM form
-
userClassName
public String userClassName()
Return the class name in user ('.' delimited) form
-
userClassFromVMClass
public static String userClassFromVMClass(String vmName)
Return the class name in user ('.' delimited) form
-
vmClassFromUserClass
public static String vmClassFromUserClass(String userName)
Return the class name in VM ('/' delimited) form
-
pkg
public String pkg()
Return the vm package name for this class
-
packageOf
public static String packageOf(String vmName)
Return the vm package name for the vm class name
-
sourceName
public String sourceName()
Return the name of the class source
-
source
public ClassFileSource source()
Return the source of the class
-
write
public void write(File destFile) throws IOException, FileNotFoundException
Write the file. If destination directory is non-null, write the file relative to that directory, else write it relative to its original location.- Throws:
IOException
FileNotFoundException
-
-