|
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.mjc.CType
org.multijava.mjc.CClassType
org.multijava.mjc.CClassNameType
This class represents a class type when the class name first appears as a forward reference. The internal structure must be filled in later when enough information is available to find the corresponding class declaration.
CType| Nested Class Summary |
| Nested classes inherited from class org.multijava.mjc.CType |
CType.MethodSignature, CType.MethodSignatureParser, CType.StringBuffers, CType.TupleCollection |
| Field Summary | |
private String |
ident
|
(package private) static boolean |
ignoredJavaAlready
|
protected String |
maybeQualifiedName
|
private String |
originalQualifiedName
|
| Fields inherited from class org.multijava.mjc.CClassType |
arguments, EMPTY, EMPTY_ARG, index, universe |
| Fields inherited from class org.multijava.mjc.CType |
instance, isMethodTypeVariable, isTypeVariable, type |
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
(package private) |
CClassNameType(String maybeQualifiedName)
Construct a class type. |
(package private) |
CClassNameType(String maybeQualifiedName,
CUniverse univ,
CClassType[][] arguments)
Construct a class type. |
| Method Summary | |
void |
appendGenericSignature(FastStringBuffer buff)
|
CType |
checkType(CContextType context)
Checks that this type is valid, throwing an exception if it is not. |
(package private) void |
forgetChecking()
|
CClassType[][] |
getAllArguments()
return the arguments of this type |
CClassType[] |
getArguments()
|
CClass |
getCClass()
Returns the class object associated with this type. |
String |
getIdent()
|
boolean |
isGenericType()
check to see whether this class type is Generic or Not |
boolean |
isMethodTypeVariable()
|
boolean |
isTypeVariable()
Check if a type is a type variable |
String |
originalQualifiedName()
|
String |
printArgs()
Print the type arguments of this class type |
String |
qualifiedName()
|
protected void |
registerAsVisibleIn(CContextType context)
Registers the type represented by this as being visible in the given context. |
void |
setAllArguments(CClassType[][] args)
|
protected void |
setClass(CClass clazz)
Sets the CClass singleton that goes with this class type and registers that this name type has been checked. |
protected void |
setClassFromNameOrDieTrying()
Attempts to associate this type with a CClass
singleton having the name given by maybeQualifiedName. |
void |
setIdent(String id)
|
String |
toString()
Transforms this type to a string |
| 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 |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
static boolean ignoredJavaAlready
private String ident
protected String maybeQualifiedName
private final String originalQualifiedName
| Constructor Detail |
CClassNameType(String maybeQualifiedName)
CClassNameType(String maybeQualifiedName,
CUniverse univ,
CClassType[][] arguments)
maybeQualifiedName - the name of the class, perhaps just
partially qualified or not qualified at all, but with '/' not
'.' separators if any separators are presentCClassType#lookup(String,boolean)| Method Detail |
public String toString()
toString in class CClassTypepublic String printArgs()
printArgs in class CClassTypepublic void appendGenericSignature(FastStringBuffer buff)
appendGenericSignature in interface CTypeSignatureAppenderappendGenericSignature in class CTypepublic String qualifiedName()
qualifiedName in class CClassTypepublic String originalQualifiedName()
originalQualifiedName in class CClassTypepublic CClass getCClass()
getCClass in class CClassType
public CType checkType(CContextType context)
throws UnpositionedError
checkType in class CClassTypecontext - the context in which this type was
declared
UnpositionedError - this unpositioned error
should be positioned
by the calling node of
the AST, typically by
calling the
addPosition method of
UnpositionedError
protected final void registerAsVisibleIn(CContextType context)
throws UnpositionedError
requires maybeQualifiedName == null;
UnpositionedError
protected void setClassFromNameOrDieTrying()
throws UnpositionedError
CClass
singleton having the name given by maybeQualifiedName.
Called after all other options for finding the class have been
exhausted.
UnpositionedError - if singleton cannot be found maybeQualifiedName,
CTopLevel.loadClass(String)protected void setClass(CClass clazz)
setClass in class CClassTypeclazz - the CClass singleton that goes with this class type void forgetChecking()
public boolean isGenericType()
isGenericType in class CTypepublic CClassType[] getArguments()
getArguments in class CClassTypepublic CClassType[][] getAllArguments()
CClassType
getAllArguments in class CClassTypepublic void setAllArguments(CClassType[][] args)
setAllArguments in class CClassTypepublic boolean isTypeVariable()
CType
isTypeVariable in class CTypepublic boolean isMethodTypeVariable()
isMethodTypeVariable in class CTypepublic String getIdent()
getIdent in class CTypepublic void setIdent(String id)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||