public class RuntimeJavaModelFactory
extends org.apache.jdo.impl.model.java.reflection.ReflectionJavaModelFactory
java.lang.Class and
java.lang.reflect.Field instances to get Java related
metadata about types and fields. This implementation caches JavaModel
instance sper ClassLoader.
RuntimeJavaModelFactory implements the singleton pattern; method
getInstance() provides access to the singleton factory
instance. This method also registers a model listener at the
JDOImplHelper to handle the runtime metadata as generated by the
enhancer.
| Modifier | Constructor and Description |
|---|---|
protected |
RuntimeJavaModelFactory()
Creates a new RuntimeJavaModelFactory.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkPermission()
This method checks that the caller is authorized for
JDOPermission("getMetadata"), and if not, throws
ModelFatalException wrapping the SecurityException. |
static RuntimeJavaModelFactory |
getInstance()
Returns the singleton instance of RuntimeJavaModelFactory.
|
protected org.apache.jdo.model.java.JavaModel |
newJavaModelInstance(java.lang.ClassLoader classLoader)
Creates a new instance of the JavaModel implementation class.
|
protected void |
registerFactory()
Registers this JavaModelFactory instance at the JDOImplHelper.
|
createJavaModel, forNamePrivileged, getClassLoaderPrivileged, getJavaClass, getJavaTypeprotected RuntimeJavaModelFactory()
getInstance() should be used.public static RuntimeJavaModelFactory getInstance() throws org.apache.jdo.model.ModelFatalException
JDOPermission("getMetadata"), and if not, throws
ModelFatalException wrapping the SecurityException.org.apache.jdo.model.ModelFatalException - if the caller does not have the
getMetadata permission.protected static void checkPermission()
throws org.apache.jdo.model.ModelFatalException
JDOPermission("getMetadata"), and if not, throws
ModelFatalException wrapping the SecurityException.org.apache.jdo.model.ModelFatalException - if the caller does not have the
getMetadata permission.protected void registerFactory()
protected org.apache.jdo.model.java.JavaModel newJavaModelInstance(java.lang.ClassLoader classLoader)
This implementation returns a RuntimeJavaModel instance.
newJavaModelInstance in class org.apache.jdo.impl.model.java.reflection.ReflectionJavaModelFactoryCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.