|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.util.compiler.Phylum
org.multijava.mjc.JPhylum
org.multijava.mjc.JLocalVariable
org.multijava.mjc.JFormalParameter
This class represents a parameter declaration in the syntax tree
| Field Summary | |
static JFormalParameter[] |
EMPTY
|
private boolean |
interfaceChecked
|
private String |
metaDebugKey
A string to be used as a key for meta-debugging the Debug operations. |
private CType |
overriddenType
|
private CSpecializedType |
specializedType
|
| Fields inherited from class org.multijava.mjc.JLocalVariable |
DES_CATCH_PARAMETER, DES_GENERATED, DES_LOCAL_VAR, DES_PARAMETER, expr, modifiers, name, type |
| Fields inherited from class org.multijava.util.compiler.Phylum |
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
JFormalParameter(TokenReference where,
int desc,
CSpecializedType type,
String ident,
boolean isFinal)
Constructs a formal parameter node in the parsing tree. |
|
JFormalParameter(TokenReference where,
long modifiers,
int desc,
CSpecializedType type,
String ident)
Constructs a formal parameter node in the parsing tree. |
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor |
CSpecializedType |
checkInterface(CContextType context)
Checks the basic interfaces to make sure things generally look OK. |
CType |
dynamicType()
Returns the dynamic type part of this formal parameter type. |
CType |
getType()
|
boolean |
isSpecialized()
|
private static boolean |
isValidSpecializerClassType(CType type)
Indicates whether the given type can ever appear as an explicit class specializer. |
private static boolean |
isValidSpecializerValueType(CType type)
Indicates whether the given type can ever appear as an explicit value specializer. |
String |
modifiersAsString()
Returns any parameter modifiers as a String; if the String is not empty, it will have a trailing space. |
String |
modToString()
|
String |
paramToString()
|
void |
resolveSpecializer(CFlowControlContextType context)
Compute the value of a specializer expression used to dispatch on a compile-time constant. |
CSpecializedType |
specializedType()
Returns the overridden and dynamic types for this formal. |
static String |
specializerString(JFormalParameter[] parms)
Creates from an array of formal parameters a String of the dynamic types of the parameters. |
CType |
staticType()
Returns the static type part of this formal parameter type. |
String |
toString()
|
void |
typecheck(CFlowControlContextType context)
Typechecks the parameter and mutates the context to record information gathered during typechecking. |
String |
typeToString()
|
| Methods inherited from class org.multijava.mjc.JLocalVariable |
equals, expr, genLoad, genStore, getDescription, getPosition, getValue, hashCode, ident, index, isAssigned, isConstant, isDeclaredNonNull, isFinal, isGenerated, isLoopVariable, isNonNull, isStatic, isUsed, modifiers, setAssigned, setIdent, setIndex, setIsLoopVariable, setModifiers, setNonNull, setPosition, setUsed, setValue, unsetIsLoopVariable |
| Methods inherited from class org.multijava.mjc.JPhylum |
check, check, check, check, fail, fail, fail, warn, warn, warn, warn |
| Methods inherited from class org.multijava.util.compiler.Phylum |
getTokenReference, setTokenReference |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final JFormalParameter[] EMPTY
private CType overriddenType
private boolean interfaceChecked
private CSpecializedType specializedType
private String metaDebugKey
| Constructor Detail |
public JFormalParameter(TokenReference where,
long modifiers,
int desc,
CSpecializedType type,
String ident)
where - the line of this node in the source codemodifiers - the modifiers on this parameterdesc - the sort of variable that this is, see
constants in JLocalVariabletype - the static and dynamic types of this formalident - the name of this variable
public JFormalParameter(TokenReference where,
int desc,
CSpecializedType type,
String ident,
boolean isFinal)
where - the line of this node in the source codedesc - the sort of variable that this is, see
constants in JLocalVariabletype - the static and dynamic types of this formalident - the name of this variableisFinal - a flag indicating whether this is declared
final| Method Detail |
public CType getType()
getType in class JLocalVariablepublic CType staticType()
public CType dynamicType()
public CSpecializedType specializedType()
public boolean isSpecialized()
public String toString()
toString in class JLocalVariablepublic String modToString()
public String typeToString()
public String paramToString()
public String modifiersAsString()
public CSpecializedType checkInterface(CContextType context)
throws PositionedError
context - the context in which this appears
PositionedError - if the check fails
public void resolveSpecializer(CFlowControlContextType context)
throws PositionedError
context - the context in which this class
declaration appears
PositionedError - if the check fails
public void typecheck(CFlowControlContextType context)
throws PositionedError
typecheck in class JLocalVariablecontext - the context in which this expression appears
PositionedError - if the check fails public void accept(MjcVisitor p)
p - the visitorpublic static String specializerString(JFormalParameter[] parms)
private static boolean isValidSpecializerClassType(CType type)
private static boolean isValidSpecializerValueType(CType type)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||