Save This Page
Home » jdo2-model-2.3-ea-src » org.apache.jdo.model.java » [javadoc | source]
org.apache.jdo.model.java
public interface: JavaModel [javadoc | source]

All Known Implementing Classes:
    ReflectionJavaModel, AbstractJavaModel

A JavaModel instance bundles a number of JavaType instances and provides methods to retrieve JavaType instance by their name. A type name must be unique must be unique within a JavaModel instance. If the JavaType represents a class or an interface its type name is the fully qualified name. The model supports multiple classes or interfaces having the same fully qualified name by different JavaModel instances.
Method from org.apache.jdo.model.java.JavaModel Summary:
getChildren,   getInputStreamForResource,   getJDOModel,   getJavaType,   getJavaType,   getParent,   setJDOModel,   setParent
Method from org.apache.jdo.model.java.JavaModel Detail:
 public JavaModel[] getChildren()
    Returns a collection of child JavaModel instances in the form of an array. All instances from the returned array have this JavaModel instance as parent.
 public InputStream getInputStreamForResource(String resourceName)
    Finds a resource with a given name. A resource is some data that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a "/"-separated path name that identifies the resource. The method method opens the resource for reading and returns an InputStream. It returns null if no resource with this name is found or if the caller doesn't have adequate privileges to get the resource.
 public JDOModel getJDOModel()
    Returns the corresponding JDOModel instance.
 public JavaType getJavaType(String name)
    The method returns the JavaType instance for the specified type name. A type name is unique within one JavaModel instance. The method returns null if this model instance does not know a type with the specified name.
 public JavaType getJavaType(Class clazz)
    The method returns the JavaType instance for the type name of the specified class object. This is a convenience method for getJavaType(clazz.getName()). The major difference between this method and getJavaType taking a type name is that this method is supposed to return a non-null value. The specified class object describes an existing type.
 public JavaModel getParent()
    Returns the parent JavaModel instance of this JavaModel.
 public  void setJDOModel(JDOModel jdoModel) throws ModelException
    Sets the corresponding JDOModel instance.
 public  void setParent(JavaModel parent) throws ModelException
    Set the parent JavaModel for this JavaModel. The method automatically adds this JavaModel to the collection of children of the specified parent JavaModel.