public abstract class IlpAbstractClass extends Object implements IlpClass
IlpClass
represent classes of the model.
This class provides a basic implementation that should be subclassed
in order to create the user model classes.Modifier | Constructor and Description |
---|---|
protected |
IlpAbstractClass(String name,
IlpClass superClass,
List<IlpClass> subClasses)
Creates an
IlpAbstractClass . |
Modifier and Type | Method and Description |
---|---|
void |
addSubClass(IlpClass subClass)
Adds a subclass to the list.
|
String |
getName()
Returns the name of the class.
|
Collection<IlpClass> |
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 whether this
IlpClass
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
the parent . |
void |
removeSubClass(IlpClass subClass)
Removes a class from the subclasses list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newInstance, newInstance
addAttributeGroupListener, fireEvent, getAttribute, getAttributes, getDeclaredAttributes, hasAttribute, removeAttributeGroupListener
public String getName()
getName
in interface IlpAttributeGroup
public IlpClass getSuperClass()
IlpClass
.
This method should return null
when this class
has no superclass.getSuperClass
in interface IlpClass
IlpClass
superclass.public Collection<IlpClass> getSubClasses()
Collection
.
If the subclass collection is empty, this method returns
Collections.EMPTY_LIST
.getSubClasses
in interface IlpClass
IlpClass
instances.public boolean isSubClassOf(IlpClass parent)
true
if the current class is a subclass of
the parent
.isSubClassOf
in interface IlpClass
parent
- The superclass being checked.parent
class.public boolean isAssignableFrom(IlpClass cls)
IlpClass
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
.isAssignableFrom
in interface IlpClass
cls
- The IlpClass
object to be checked.cls
can be assigned to objects of this class.public void addSubClass(IlpClass subClass)
This methods adds the given class as a subclass of this instance.
This method does not update the superclass information in the
argument class. To do this, use the method setSuperClass
.
public void removeSubClass(IlpClass subClass)
This methods removes the given class as subclass of this instance.
This method does not update the superclass information in the
argument class. To do this, use the method setSuperClass
.
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.