ilog.cpl.model
Interface IlpClass

All Superinterfaces:
IlpAttributeGroup
All Known Subinterfaces:
IlpMutableClass
All Known Implementing Classes:
IlpAbstractClass, IlpBeansClass, IlpDefaultClass, IltObjectInfo

public interface IlpClass
extends IlpAttributeGroup

ILOG CPL Business Class interface. Instances of IlpClass represent business classes of the model. They provide access to the class hierarchy, and to the class attributes.

Since:
JTGO 3.0

Method Summary
 Collection getSubClasses()
          Returns the subclasses of this class as a Collection.
 IlpClass getSuperClass()
          Returns the superclass of this class as an IlpClass.
 boolean isAssignableFrom(IlpClass cls)
          Determines if the class represented by this IlpClass object is either the same as, or is a superclass of, the class represented by the specified IlpClass parameter.
 boolean isSubClassOf(IlpClass parent)
          Returns true if the current class is a subclass of parent class.
 IlpObject newInstance(IlpClass ilpClass, Object identifier, boolean initializeAttributeValues)
          Creates an instance of the class.
 IlpObject newInstance(Object identifier, boolean initializeAttributeValues)
          Creates an new instance of the class.
 
Methods inherited from interface ilog.cpl.model.IlpAttributeGroup
addAttributeGroupListener, fireEvent, getAttribute, getAttributes, getDeclaredAttributes, getName, hasAttribute, removeAttributeGroupListener
 

Method Detail

getSuperClass

IlpClass getSuperClass()
Returns the superclass of this class as an IlpClass. This method should return null when this class does not have a superclass.

Returns:
The IlpClass superclass.

getSubClasses

Collection getSubClasses()
Returns the subclasses of this class as a Collection.

Returns:
An unmodifiable collection containing IlpClass instances.

isSubClassOf

boolean isSubClassOf(IlpClass parent)
Returns true if the current class is a subclass of parent class.

Parameters:
parent - The superclass being checked.
Returns:
The boolean value indicating whether this class is a subclass of the parent class.

isAssignableFrom

boolean isAssignableFrom(IlpClass cls)
Determines if the class represented by this IlpClass object is either the same as, or is a superclass of, the class represented by the specified IlpClass parameter. It returns true if so; otherwise it returns false.

Parameters:
cls - The IlpClass object to be checked.
Returns:
The boolean value indicating whether objects of the type cls can be assigned to objects of this class.

newInstance

IlpObject newInstance(Object identifier,
                      boolean initializeAttributeValues)
Creates an new instance of the class.

The new instance will be created with the given identifier. If the argument initializeAttributeValues is set, the new instance will be initialized with the default attribute values. Default attribute values are set in the attribute itself and are retrieved using IlpAttribute.getDefaultValue().

Parameters:
identifier - Object identifier
initializeAttributeValues -
Returns:
An object of this dynamic class, as an instance of the IlpObject interface.
See Also:
IlpObject.getIdentifier(), IlpAttribute.getDefaultValue()

newInstance

IlpObject newInstance(IlpClass ilpClass,
                      Object identifier,
                      boolean initializeAttributeValues)
Creates an instance of the class.

The new instance will be created with the given identifier. If the argument initializeAttributeValues is set, the new instance will be initialized with the default attribute values. Default attribute values are set in the attribute itself and are retrieved using IlpAttribute.getDefaultValue().

Note: This method is supposed to be called by a subclass, the subclass passing itself as the first parameter.

Parameters:
ilpClass - Business class
identifier - Object identifier
initializeAttributeValues -
Returns:
An object of this dynamic class, as an instance of the IlpObject interface.
See Also:
IlpObject.getIdentifier(), IlpAttribute.getDefaultValue()


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.