maj.semant
Class MajCompoundType

java.lang.Object
  extended bymaj.semant.MajType
      extended bymaj.semant.MajCompoundType
All Implemented Interfaces:
MajMember, MajScope

public class MajCompoundType
extends MajType
implements MajMember, MajScope


Field Summary
 
Fields inherited from class maj.semant.MajType
m_nameSpace, m_strName
 
Fields inherited from interface maj.semant.MajMember
CLASS, COMPOUND_STATEMENT, INTERFACE, METHOD, VARIABLE
 
Constructor Summary
MajCompoundType()
           
MajCompoundType(MajScope parentScope, MajModifiers mods, java.lang.String name, MajIdentifier superClass)
           
 
Method Summary
 void addField(MajVariable var)
           
 void addImport(MajImport ip)
           
 void addInnerClass(MajType newtype)
           
 void addMethod(MajMethod method)
           
 MajType getFieldType(java.lang.String id)
           
 MajImport[] getImports()
           
 java.lang.String getMajType()
           
 int getMemberType()
           
 MajMethod getMethod(java.lang.String name)
           
 MajType getMethodReturn(java.lang.String name, MajType[] argTypes)
           
 MajScope getParentScope()
           
 MajType getSuperClass()
           
 MajType getThisType()
           
 MajType getType()
           
 MajTypeEnv getTypeEnv()
           
 MajType getTypeType(MajIdentifier id)
           
 MajType getTypeType(java.lang.String id)
           
 MajVarEnv getVarEnv()
           
 MajVariable getVariable(MajIdentifier id)
           
 MajVariable getVariable(java.lang.String name)
           
 boolean isEqual(MajType argType)
           
 boolean isPrimitiveType()
           
 boolean isSuperOf(MajType argType)
           
 void putMethod(java.lang.String mName, MajMethod m)
           
 void putType(java.lang.String tName, MajType t)
           
 void putVariable(java.lang.String vName, MajVariable v)
           
 void setModifiers(MajModifiers mods)
           
 void setNameSpace(MajNameSpace nameSpace)
           
 java.lang.String toString()
           
 
Methods inherited from class maj.semant.MajType
getFullName, getIdentifier, getLUB, getName, getNameSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface maj.semant.MajMember
getName
 
Methods inherited from interface maj.semant.MajScope
getNameSpace
 

Constructor Detail

MajCompoundType

public MajCompoundType()

MajCompoundType

public MajCompoundType(MajScope parentScope,
                       MajModifiers mods,
                       java.lang.String name,
                       MajIdentifier superClass)
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in interface MajMember
Specified by:
toString in class MajType

getMajType

public java.lang.String getMajType()
Specified by:
getMajType in class MajType

getMemberType

public int getMemberType()
Specified by:
getMemberType in interface MajMember

getType

public MajType getType()

addMethod

public void addMethod(MajMethod method)

addField

public void addField(MajVariable var)

addInnerClass

public void addInnerClass(MajType newtype)

getTypeEnv

public MajTypeEnv getTypeEnv()
Specified by:
getTypeEnv in interface MajScope

getVarEnv

public MajVarEnv getVarEnv()
Specified by:
getVarEnv in interface MajScope

getParentScope

public MajScope getParentScope()
Specified by:
getParentScope in interface MajScope

setNameSpace

public void setNameSpace(MajNameSpace nameSpace)
Specified by:
setNameSpace in interface MajScope

putType

public void putType(java.lang.String tName,
                    MajType t)
Specified by:
putType in interface MajScope

getTypeType

public MajType getTypeType(java.lang.String id)
Specified by:
getTypeType in interface MajScope

getTypeType

public MajType getTypeType(MajIdentifier id)
Specified by:
getTypeType in interface MajScope

getImports

public MajImport[] getImports()
Specified by:
getImports in interface MajScope

addImport

public void addImport(MajImport ip)
Specified by:
addImport in interface MajScope

getVariable

public MajVariable getVariable(java.lang.String name)
Specified by:
getVariable in interface MajScope

getVariable

public MajVariable getVariable(MajIdentifier id)
Specified by:
getVariable in interface MajScope

putVariable

public void putVariable(java.lang.String vName,
                        MajVariable v)
Specified by:
putVariable in interface MajScope

getMethod

public MajMethod getMethod(java.lang.String name)
Specified by:
getMethod in interface MajScope

getMethodReturn

public MajType getMethodReturn(java.lang.String name,
                               MajType[] argTypes)

putMethod

public void putMethod(java.lang.String mName,
                      MajMethod m)
Specified by:
putMethod in interface MajScope

getThisType

public MajType getThisType()
Specified by:
getThisType in interface MajScope

getSuperClass

public MajType getSuperClass()

getFieldType

public MajType getFieldType(java.lang.String id)

setModifiers

public void setModifiers(MajModifiers mods)

isEqual

public boolean isEqual(MajType argType)
Specified by:
isEqual in class MajType

isSuperOf

public boolean isSuperOf(MajType argType)
Specified by:
isSuperOf in class MajType

isPrimitiveType

public boolean isPrimitiveType()
Specified by:
isPrimitiveType in class MajType