|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.api.persistence.model.Model
com.sun.jdo.api.persistence.model.RuntimeModel
public class RuntimeModel
| Field Summary |
|---|
| Fields inherited from class com.sun.jdo.api.persistence.model.Model |
|---|
ENHANCER, messageBase, NO_ARGS, RUNTIME |
| Constructor Summary | |
|---|---|
protected |
RuntimeModel()
Creates a new RuntimeModel. |
| Method Summary | |
|---|---|
protected java.io.BufferedOutputStream |
createFile(java.lang.String className,
java.lang.String baseFileName,
java.lang.String extension)
Creates a file with the given base file name and extension parallel to the supplied class (if it does not yet exist). |
protected void |
deleteFile(java.lang.String className,
java.lang.String fileName)
Deletes the file with the given file name which is parallel to the supplied class. |
protected java.lang.ClassLoader |
findClassLoader(java.lang.String className,
java.lang.ClassLoader classLoader)
This method returns the class loader used to find mapping information for the specified className. |
protected java.lang.String |
findPenultimateSuperclass(java.lang.String className)
Returns the name of the second to top (top excluding java.lang.Object) superclass for the given class name. |
java.lang.Object |
getClass(java.lang.String className,
java.lang.ClassLoader classLoader)
Returns the class element with the specified className. |
java.util.Map |
getClassLoaderCache()
Returns an unmodifiable copy of the ClassLoader cache. |
java.lang.Object |
getConstructor(java.lang.String className,
java.lang.String[] argTypeNames)
Returns the constructor element for the specified argument types in the class with the specified name. |
java.lang.String |
getDeclaringClass(java.lang.Object memberElement)
Returns the string representation of declaring class of the specified member element. |
java.lang.Object |
getField(java.lang.String className,
java.lang.String fieldName)
Returns the field element for the specified fieldName in the class with the specified className. |
java.util.List |
getFields(java.lang.String className)
Returns a list of names of all the declared field elements in the class with the specified name. |
protected java.io.File |
getFile(java.lang.String className,
java.lang.String fileName)
Returns a file with the given file name which is parallel to the supplied class. |
protected java.io.BufferedInputStream |
getInputStreamForResource(java.lang.String className,
java.lang.ClassLoader classLoader,
java.lang.String resourceName)
Returns the input stream with the supplied resource name found with the supplied class name. |
MappingClassElement |
getMappingClass(java.lang.String className,
java.lang.ClassLoader classLoader)
Returns the MappingClassElement created for the specified class name. |
java.lang.Object |
getMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String[] argTypeNames)
Returns the method element for the specified method name and argument types in the class with the specified name. |
int |
getModifiers(java.lang.Object memberElement)
Returns the modifier mask for the specified member element. |
protected java.lang.String |
getSuperclass(java.lang.String className)
Returns the name of the superclass for the given class name. |
java.lang.String |
getType(java.lang.Object element)
Returns the string representation of type of the specified element. |
protected java.lang.Class |
getTypeObject(java.lang.Object element)
Returns the Class type of the specified element. |
boolean |
hasConstructor(java.lang.String className)
Determines if the class with the specified name declares a constructor. |
boolean |
implementsInterface(java.lang.Object classElement,
java.lang.String interfaceName)
Determines if the specified class implements the specified interface. |
boolean |
isArray(java.lang.String className,
java.lang.String fieldName)
Determines if a field with the specified fieldName in the class with the specified className is an array. |
boolean |
isInterface(java.lang.String className)
Determines if the specified className represents an interface type. |
boolean |
isSerializable(java.lang.Object fieldElement)
Determines if the specified field element has a serializable type. |
void |
removeResourcesFromCaches(java.lang.ClassLoader classLoader)
Removes the classes cached with the specified class loader from all caches. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RuntimeModel()
Model.RUNTIME| Method Detail |
|---|
public boolean isInterface(java.lang.String className)
isInterface in class ModelclassName - the fully qualified name of the class to be checked
true if this class name represents an interface;
false otherwise.
protected java.io.BufferedInputStream getInputStreamForResource(java.lang.String className,
java.lang.ClassLoader classLoader,
java.lang.String resourceName)
getInputStreamForResource in class ModelclassName - the fully qualified name of the class which will
be used as a base to find the resourceclassLoader - the class loader used to find mapping informationresourceName - the name of the resource to be found
null
if an error occurs or none existsprotected java.lang.String findPenultimateSuperclass(java.lang.String className)
findPenultimateSuperclass in class ModelclassName - the fully qualified name of the class to be checked
className if an error occurs or none existsprotected java.lang.String getSuperclass(java.lang.String className)
getSuperclass in class ModelclassName - the fully qualified name of the class to be checked
null if an error
occurs or none exists
public MappingClassElement getMappingClass(java.lang.String className,
java.lang.ClassLoader classLoader)
getMappingClass in class ModelclassName - the fully qualified name of the mapping classclassLoader - the class loader used to find mapping information
null if an error occurs or none existsMappingClassElementImpl.forName(String, Model)public java.util.Map getClassLoaderCache()
getClassLoaderCache in class Modelpublic void removeResourcesFromCaches(java.lang.ClassLoader classLoader)
removeResourcesFromCaches in class ModelclassLoader - used to determine the classes to be removed
protected java.io.BufferedOutputStream createFile(java.lang.String className,
java.lang.String baseFileName,
java.lang.String extension)
throws java.io.IOException
createFile in class ModelclassName - the fully qualified name of the classbaseFileName - the name of the base fileextension - the file extension
null
if an error occurs or none exists
java.io.IOException - if there is some error creating the file
protected void deleteFile(java.lang.String className,
java.lang.String fileName)
throws java.io.IOException
deleteFile in class ModelclassName - the fully qualified name of the classfileName - the name of the file
java.io.IOException - if there is some error deleting the file
protected java.io.File getFile(java.lang.String className,
java.lang.String fileName)
throws java.io.IOException
className - the fully qualified name of the classfileName - the name of the file
null
if an error occurs
java.io.IOException - if there is some error getting the file
public java.lang.Object getClass(java.lang.String className,
java.lang.ClassLoader classLoader)
Class.forName.
getClass in class ModelclassName - the fully qualified name of the class to be checkedclassLoader - the class loader used to find mapping information
null
if an error occurs or none exists
protected java.lang.ClassLoader findClassLoader(java.lang.String className,
java.lang.ClassLoader classLoader)
throws java.lang.IllegalArgumentException
className - the fully qualified name of the class to be checkedclassLoader - the class loader used to find mapping information
java.lang.IllegalArgumentException - if there is class loader problem
public boolean implementsInterface(java.lang.Object classElement,
java.lang.String interfaceName)
implementsInterface in class ModelclassElement - the class element to be checkedinterfaceName - the fully qualified name of the interface to
be checked
true if the class implements the interface;
false otherwise.getClass(java.lang.String, java.lang.ClassLoader)public boolean hasConstructor(java.lang.String className)
hasConstructor in class ModelclassName - the name of the class to be checked
true if the class declares a constructor;
false otherwise.getClass(java.lang.String, java.lang.ClassLoader)
public java.lang.Object getConstructor(java.lang.String className,
java.lang.String[] argTypeNames)
getConstructor in class ModelclassName - the name of the class which contains the constructor
to be checkedargTypeNames - the fully qualified names of the argument types
getClass(java.lang.String, java.lang.ClassLoader)
public java.lang.Object getMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String[] argTypeNames)
getMethod in class ModelclassName - the name of the class which contains the method
to be checkedmethodName - the name of the method to be checkedargTypeNames - the fully qualified names of the argument types
getClass(java.lang.String, java.lang.ClassLoader)public java.lang.String getType(java.lang.Object element)
getType in class Modelelement - the element to be checked
getField(java.lang.String, java.lang.String),
getMethod(java.lang.String, java.lang.String, java.lang.String[])public java.util.List getFields(java.lang.String className)
getFields in class ModelclassName - the fully qualified name of the class to be checked
public java.lang.Object getField(java.lang.String className,
java.lang.String fieldName)
getField in class ModelclassName - the fully qualified name of the class which contains
the field to be checkedfieldName - the name of the field to be checked
public boolean isSerializable(java.lang.Object fieldElement)
isSerializable in class ModelfieldElement - the field element to be checked
true if the field element has a serializable type;
false otherwise.getField(java.lang.String, java.lang.String)
public boolean isArray(java.lang.String className,
java.lang.String fieldName)
isArray in class ModelclassName - the fully qualified name of the class which contains
the field to be checkedfieldName - the name of the field to be checked
true if this field name represents a java array
field; false otherwise.Model.getFieldType(java.lang.String, java.lang.String)public java.lang.String getDeclaringClass(java.lang.Object memberElement)
getDeclaringClass in class ModelmemberElement - the member element to be checked
getClass(java.lang.String, java.lang.ClassLoader),
getField(java.lang.String, java.lang.String),
getConstructor(java.lang.String, java.lang.String[]),
getMethod(java.lang.String, java.lang.String, java.lang.String[])public int getModifiers(java.lang.Object memberElement)
getModifiers in class ModelmemberElement - the member element to be checked
Modifier,
getClass(java.lang.String, java.lang.ClassLoader),
getField(java.lang.String, java.lang.String),
getConstructor(java.lang.String, java.lang.String[]),
getMethod(java.lang.String, java.lang.String, java.lang.String[])protected java.lang.Class getTypeObject(java.lang.Object element)
element - the element to be checked
getField(java.lang.String, java.lang.String),
getMethod(java.lang.String, java.lang.String, java.lang.String[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||