org.apache.jdo.impl.model.java.runtime.jdk5
Class JDK5RuntimeJavaModel

java.lang.Object
  extended by org.apache.jdo.impl.model.java.AbstractJavaModel
      extended by org.apache.jdo.impl.model.java.reflection.ReflectionJavaModel
          extended by org.apache.jdo.impl.model.java.runtime.RuntimeJavaModel
              extended by org.apache.jdo.impl.model.java.runtime.jdk5.JDK5RuntimeJavaModel
All Implemented Interfaces:
org.apache.jdo.model.java.JavaModel

public class JDK5RuntimeJavaModel
extends RuntimeJavaModel

A reflection based JavaModel implementation used at runtime in a J2SE5.0 environment. The implementation takes java.lang.Class and java.lang.reflect.Field instances to get Java related metadata about types and fields.

The RuntimeJavaModelFactory caches JavaModel instances per ClassLoader. The RuntimeJavaModel implementation will use this ClassLoader to lookup any type by name. This makes sure that the type name is unique.

Since:
JDO 2.0
Author:
Michael Bouschen

Field Summary
 
Fields inherited from class org.apache.jdo.impl.model.java.reflection.ReflectionJavaModel
declaringJavaModelFactory
 
Fields inherited from class org.apache.jdo.impl.model.java.AbstractJavaModel
children, jdoModel, parent, types
 
Constructor Summary
JDK5RuntimeJavaModel(java.lang.ClassLoader classLoader, JDK5RuntimeJavaModelFactory declaringJavaModelFactory)
          Constructor.
 
Method Summary
protected  org.apache.jdo.model.java.JavaType newJavaTypeInstance(java.lang.Class clazz)
          Creates a new instance of the JavaType implementation class.
 
Methods inherited from class org.apache.jdo.impl.model.java.runtime.RuntimeJavaModel
getJavaType, getJavaType
 
Methods inherited from class org.apache.jdo.impl.model.java.reflection.ReflectionJavaModel
getClassLoader, getDeclaringJavaModelFactory, getInputStreamForResource, getJavaTypeInternal, getJDOModel
 
Methods inherited from class org.apache.jdo.impl.model.java.AbstractJavaModel
getChildren, getParent, setJDOModel, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDK5RuntimeJavaModel

public JDK5RuntimeJavaModel(java.lang.ClassLoader classLoader,
                            JDK5RuntimeJavaModelFactory declaringJavaModelFactory)
Constructor.

Method Detail

newJavaTypeInstance

protected org.apache.jdo.model.java.JavaType newJavaTypeInstance(java.lang.Class clazz)
Creates a new instance of the JavaType implementation class.

This implementation returns a RuntimeJavaType instance.

Overrides:
newJavaTypeInstance in class RuntimeJavaModel
Parameters:
clazz - the Class instance representing the type
Returns:
a new JavaType instance


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.