getRootClasses()
Returns the root classes of the model in a collection of
IlpClass
instances. Root classes are classes that do not inherit from
another class.
getClass(String name)
Returns the class called
name
or
null
if this class does not exist.
getClasses()
Returns the classes of the model as a collection.
hasClass(IlpClass aClass)
Returns
true
if the given class belongs to this model.
hasClass(String name)
Returns whether a class with the given
name
is registered in the manager.
IlpContext context = IltSystem.GetDefaultContext(); IlpClassManager classMgr = context.getClassManager(); IlpClass bclass = classMgr.getClass("ilog.tgo.model.IltNetworkElement");
<classManager>
.
classManager
scope are loaded in the default class manager implementation, and
are therefore recognized as business classes within the
application context.
<installdir>/samples/table/customClasses/deploy.xml
and illustrates how you can customize your class manager in the
deployment descriptor file:
<classManager> <!-- Register custom classes --> <file>customClasses.xml</file> </classManager>
<file>
is the business class file that will be loaded in the class
manager at initialization time.
IlpDefaultContext context = ...; // Create a new class manager instance IltDefaultClassManager classMgr = new IltDefaultClassManager(); // Set the new service in the context context.addService(IlpClassManager.class, classMgr);
// Load a model file in the class manager. To do this, the class manager // needs to use two services: type converter, URL access service - which can // be retrieved from the context try { classMgr.parse("model.xml", context.getTypeConverter(), context.getURLAccessService()); }