|
antlraux package v0.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlraux.context.types.CommonType | +--antlraux.context.types.DeclaredType | +--antlraux.context.types.ClassType
This class represents a Type that modelizes the type of a class, this is, a set of data and a set of methods.
It implements ModifiedType
, so it can deal with
modifiers like "public", "protected", etc.
It supports simple inheritance thanks to the implementation
of SimpleInheritanceType
.
Since it also implements ScopedType
, it contains
a referente to an instance of Scope
. It
is in that instance of scope that the represented class'
attributes (data, not methods) are stored. It is in this
scope where all methods and attributes should be.
Field Summary | |
protected Scope |
scope
The scope where attribute definitions will be stored |
protected ClassType |
superType
The Type of this Type's class super class :) |
Fields inherited from class antlraux.context.types.DeclaredType |
modifiers |
Fields inherited from class antlraux.context.types.CommonType |
name, tag |
Fields inherited from interface antlraux.context.types.Type |
DEFAULT_NAME, DEFAULT_TAG |
Constructor Summary | |
ClassType(int tag,
java.lang.String typeName,
ClassType superType,
Scope s)
|
Method Summary | |
void |
addSuperClassAttributes(int attributesTag)
|
void |
addSuperClassMethods(int methodTag)
|
Scope |
getScope()
Accessor for scope |
SimpleInheritanceType |
getSuperType()
Accessor for superType |
boolean |
isA(HeritableType superType)
|
Declaration |
searchCompatibleMethod(int methodTag,
MethodType mt)
|
void |
setScope(Scope s)
Accessor for scope |
void |
setSuperType(SimpleInheritanceType superType)
Accessor for superType |
java.lang.String |
toString()
|
Methods inherited from class antlraux.context.types.DeclaredType |
addModifier, clearModifiers, compareModifiers, equals, hasModifier, modifiers, modifiersSet |
Methods inherited from class antlraux.context.types.CommonType |
getName, getTag, setName, setTag |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface antlraux.context.types.ModifiedType |
addModifier, clearModifiers, compareModifiers, hasModifier, modifiers, modifiersSet |
Methods inherited from interface antlraux.context.types.Type |
equals, getName, getTag, setName, setTag |
Field Detail |
protected ClassType superType
protected Scope scope
Constructor Detail |
public ClassType(int tag, java.lang.String typeName, ClassType superType, Scope s)
Method Detail |
public SimpleInheritanceType getSuperType()
superType
getSuperType
in interface SimpleInheritanceType
public void setSuperType(SimpleInheritanceType superType) throws TypeException
superType
setSuperType
in interface SimpleInheritanceType
superType
- the new super class
TypeException
- if (superType!=null and is not an
instance of ClassType
) or if
superType.isA(this)HeritableType.isA(HeritableType)
public Scope getScope()
scope
getScope
in interface ScopedType
public void setScope(Scope s)
scope
setScope
in interface ScopedType
public boolean isA(HeritableType superType)
isA
in interface HeritableType
public java.lang.String toString()
toString
in interface Type
toString
in class DeclaredType
public void addSuperClassAttributes(int attributesTag) throws ContextException
ContextException
public void addSuperClassMethods(int methodTag) throws ContextException
ContextException
public Declaration searchCompatibleMethod(int methodTag, MethodType mt)
|
antlraux package v0.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |