| java.lang.Object nice.tools.code.Types
Types | final public class Types (Code) | | Conversion between Nice and bytecode types.
version: $Date: 2005/01/14 18:53:53 $ author: Daniel Bonniot |
Inner Class :public static class ParametricClassException extends Exception | |
Inner Class :public static class NotIntroducedClassException extends Exception | |
Method Summary | |
public static Type | componentType(ArrayType type, int rank) | public static Type | equivalentObjectType(Type t) | public static Type | get(TypeConstructor tc) | public static Type | get(Monotype m) | public static Type | javaType(TypeConstructor tc) | public static Type | javaType(Monotype m) Return the bytecode type used to represent objects of this type. | public static Type[] | javaType(Monotype[] ms) | public static Type | javaType(Polytype t) | public static boolean | legalAccess(TypeConstructor tc, String packageName) | public static Type | lowestCommonSupertype(Monotype[] types) | static Type | lowestCommonSupertype(Type[] types) | public static Type | lowestUpperBound(Expression[] exps) | public static Monotype[] | monotype(Type[] javaTypes, TypeVariable[] typeVariables, TypeSymbol[] niceTypeVariables) | public static Monotype | monotype(Type javaType, boolean sure) | public static Monotype | monotype(Type javaType, boolean sure, TypeVariable[] typeVariables, TypeSymbol[] niceTypeVariables) Special version for use in Import.java,
it always checks whether nullness info may be added. | public static void | reset() Reset the state for a new compilation. | public static void | set(TypeConstructor tc, Type type) | public static void | setBytecodeType(Monotype m) Prepare m to be given a precise bytecode type if possible. | public static void | setBytecodeType(Monotype[] ms) Iter setBytecodeType. | final public static gnu.bytecode.Type | type(bossa.syntax.LocatedString name) | final public static gnu.bytecode.Type | type(String s, bossa.util.Location loc) | public static TypeConstructor | typeConstructor(Type javaType) Converting a bytecode type (coming from reflection for instance)
into a Nice type. | final public static gnu.bytecode.Type | typeRepresentationToBytecode(String type, bossa.util.Location loc) The type is not necessarily fully qualified. |
equivalentObjectType | public static Type equivalentObjectType(Type t)(Code) | | Manipulating bytecode types
|
legalAccess | public static boolean legalAccess(TypeConstructor tc, String packageName)(Code) | | Test if use of a TypeConstructor is legal within a given package
|
lowestCommonSupertype | public static Type lowestCommonSupertype(Monotype[] types)(Code) | | the most precise bytecode type able to store values of the givenNice types |
lowestCommonSupertype | static Type lowestCommonSupertype(Type[] types)(Code) | | |
monotype | public static Monotype monotype(Type javaType, boolean sure) throws ParametricClassException, NotIntroducedClassException(Code) | | |
monotype | public static Monotype monotype(Type javaType, boolean sure, TypeVariable[] typeVariables, TypeSymbol[] niceTypeVariables) throws ParametricClassException, NotIntroducedClassException(Code) | | Special version for use in Import.java,
it always checks whether nullness info may be added.
|
reset | public static void reset()(Code) | | Reset the state for a new compilation.
|
setBytecodeType | public static void setBytecodeType(Monotype m)(Code) | | Prepare m to be given a precise bytecode type if possible.
Be careful:
Type components of m must be valid.
That is, englobing constraints must be asserted.
|
setBytecodeType | public static void setBytecodeType(Monotype[] ms)(Code) | | Iter setBytecodeType.
|
typeConstructor | public static TypeConstructor typeConstructor(Type javaType) throws NotIntroducedClassException(Code) | | Converting a bytecode type (coming from reflection for instance)
into a Nice type.
Used for automatic declaration of java methods.
|
|
|