neosim.implementation
Class NeosimClassImpl
java.lang.Object
|
+--neosim.implementation.NeosimClassImpl
- Direct Known Subclasses:
- EntityClassImpl, EventClassImpl
- public class NeosimClassImpl
- extends java.lang.Object
- implements NeosimClass
This stores the name, parent and ID of a class.
The method isAssignableFrom() provides
basic type checking - classes are asssignable from
other identical classes or derived classes.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
NeosimClassImpl
public NeosimClassImpl()
NeosimClassImpl
public NeosimClassImpl(NeosimClass parent,
java.lang.String name,
java.lang.String pkg,
ClassID id)
getParent
public NeosimClass getParent()
- Return the parent class from which this one is derived
- Specified by:
- getParent in interface NeosimClass
- Returns:
- the parent class, or null if no parent
getClassID
public ClassID getClassID()
- Return the integer class ID
- Specified by:
- getClassID in interface NeosimClass
- Returns:
- the class id
isAssignableFrom
public boolean isAssignableFrom(NeosimClass ec)
- Check if this class is assignable from another class.
A class is assignable from another if the other
class is the same, or derived from this class.
e.g. event.isAssignableFrom( myKindOfEvent ) returns true
- Returns:
- true if ec is a sub class of this one
getName
public java.lang.String getName()
- Return the name of this class
- Specified by:
- getName in interface NeosimClass
- Tags copied from interface: NeosimClass
- Returns:
- true if ec is a sub class of this one
public boolean isAssignableFrom( NeosimClass ec );
/** Return the name of this class
getPackage
public java.lang.String getPackage()
- Return the package of this class.
- Specified by:
- getPackage in interface NeosimClass