org.apache.jdo.impl.enhancer.meta.model
Class EnhancerJavaModel

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.enhancer.meta.model.EnhancerJavaModel
All Implemented Interfaces:
JavaModel

public class EnhancerJavaModel
extends ReflectionJavaModel

Provides some basic Java type information based on JVM descriptors.

Author:
Michael Bouschen, Martin Zaun

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
EnhancerJavaModel(java.lang.ClassLoader classLoader, ResourceLocator locator)
          Creates an instance.
 
Method Summary
protected static void affirm(boolean condition, java.lang.String msg)
           
protected  JavaType createJavaType(java.lang.Class clazz)
          Creates a new JavaType instance for the specified Class object.
 java.io.InputStream getInputStreamForResource(java.lang.String resourceName)
          Finds a resource with a given name.
 java.lang.String getTypeName(java.lang.String sig)
          Returns the fully qualified name of the specified type representation.
 
Methods inherited from class org.apache.jdo.impl.model.java.reflection.ReflectionJavaModel
getClassLoader, getDeclaringJavaModelFactory, getJavaType, getJavaType, getJavaTypeInternal
 
Methods inherited from class org.apache.jdo.impl.model.java.AbstractJavaModel
getChildren, getJDOModel, getParent, setJDOModel, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancerJavaModel

public EnhancerJavaModel(java.lang.ClassLoader classLoader,
                         ResourceLocator locator)
Creates an instance.

Method Detail

getInputStreamForResource

public java.io.InputStream getInputStreamForResource(java.lang.String resourceName)
Finds a resource with a given name. This method returns null if no resource with this name is found. The name of a resource is a "/"-separated path name.

Specified by:
getInputStreamForResource in interface JavaModel
Overrides:
getInputStreamForResource in class ReflectionJavaModel
Parameters:
resourceName - the resource name
Returns:
an input stream for reading the resource, or null if the resource could not be found or if the caller doesn't have adequate privileges to get the resource.

createJavaType

protected JavaType createJavaType(java.lang.Class clazz)
Creates a new JavaType instance for the specified Class object.

This implementation returns a EnhancerJavaType instance.

Specified by:
createJavaType in class ReflectionJavaModel
Parameters:
clazz - the Class instance representing the type
Returns:
a new JavaType instance

getTypeName

public java.lang.String getTypeName(java.lang.String sig)
Returns the fully qualified name of the specified type representation.


affirm

protected static final void affirm(boolean condition,
                                   java.lang.String msg)


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