org.objectweb.jorm.metainfo.api

Interface Package

All Superinterfaces:
MetaObject, Serializable

public interface Package
extends MetaObject

Package object defines an object able to gather a set of classes. It is a similar approach to the package keyword from java.

Author:
X. Spengler

Method Summary

void
addClass(Class aClass)
Adds an existing Class to the current Package
void
addCompositeName(CompositeName composite)
Adds an existing CompositeName to the current Package
Class
createClass(String className)
Returns a new Class created with a class name.
CompositeName
createCompositeName(String CN_Name)
Returns a new compositename identified by its name.
Class
getClass(String className)
Returns a Class created with a class name.
Collection
getClasses()
Allows to know all the registered classes into the current schema.
CompositeName
getCompositeName(String cn_Name)
Returns a compositename identified with its name.
Collection
getCompositeNames()
Allows to know all the registered classes into the current schema.
String
getName()
Returns the name of the schema.
Iterator
iterateCompositeName()
Allows to know all the registered compositename into the current schema.

Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject

getParent, setParent

Method Details

addClass

public void addClass(Class aClass)
Adds an existing Class to the current Package

Parameters:
aClass - the Class object to add


addCompositeName

public void addCompositeName(CompositeName composite)
Adds an existing CompositeName to the current Package

Parameters:
composite - the CompositeName object to add


createClass

public Class createClass(String className)
Returns a new Class created with a class name. The MetaObject is added to the list of classes managed by the current schema. An isAbstract boolean is defined to know if the current class is an abstract class or not.

Parameters:
className - the string representation of the class name

Returns:
a Class corresponding to the created class and registered, or an existing one if already defined


createCompositeName

public CompositeName createCompositeName(String CN_Name)
Returns a new compositename identified by its name. The MetaObject is added to the list of compositename classes managed by the current schema. If the compositename already exists, it is returned.

Parameters:
CN_Name - the string representation of the name of the compositename

Returns:
a compositename corresponding to the created compositename and registered, or an existing one if already defined


getClass

public Class getClass(String className)
Returns a Class created with a class name.

Parameters:
className - the string representation of the class name

Returns:
a Class corresponding to its name. If the Class does not exist, null is returned.


getClasses

public Collection getClasses()
Allows to know all the registered classes into the current schema. This method returns an iterator on Class object.

Returns:
an iterator for Class object. If there is no class, an empty iterator is returned.


getCompositeName

public CompositeName getCompositeName(String cn_Name)
Returns a compositename identified with its name.

Parameters:
cn_Name - the string representation of the name of the composite name.

Returns:
a compositename corresponding to its name. If the compositename does not exist, null is returned.


getCompositeNames

public Collection getCompositeNames()
Allows to know all the registered classes into the current schema. This method returns an iterator on Class object.

Returns:
an iterator for Class object. If there is no class, an empty iterator is returned.


getName

public String getName()
Returns the name of the schema.

Returns:
the string representation of the name of the schema. Null is returned if there is no schema name else a not empty dotted string.


iterateCompositeName

public Iterator iterateCompositeName()
Allows to know all the registered compositename into the current schema. This method returns an iterator on compositename object.

Returns:
an iterator for compositename object. If there is no class, an empty iterator is returned.