| java.lang.Object xtc.type.AST xtc.type.JavaAST
JavaAST | public class JavaAST extends AST (Code) | | Common type operations for Java ASTs.
author: Robert Grimm version: $Revision: 1.6 $ |
Constructor Summary | |
public | JavaAST() Create a new Java AST instance. |
KEYWORDS | final public static Set<String> KEYWORDS(Code) | | The set of Java keywords besides primitive types, modifiers, and void.
|
MODIFIERS | final public static Set<String> MODIFIERS(Code) | | The set of Java modifiers.
|
PRIMITIVES | final public static Set<String> PRIMITIVES(Code) | | The set of Java primitive types.
|
resolvedTypes | protected Map<String, Class<?>> resolvedTypes(Code) | | The map from Java class names to their classes.
|
JavaAST | public JavaAST()(Code) | | Create a new Java AST instance.
|
endOfType | protected int endOfType(String args, int start)(Code) | | Determine the last index (exclusive) of the generic type argument
starting at the specified index.
Parameters: args - The generic type arguments. Parameters: start - The start index. The end index (exclusive). |
hasLocationUser | protected FuzzyBoolean hasLocationUser(Type type)(Code) | | |
initialize | public void initialize(boolean hasNode, boolean hasToken, boolean hasFormatting, boolean hasAction)(Code) | | |
resolve | public Class> resolve(String name)(Code) | | Resolve the specified type name to its class. This method relies
on the
JavaAST.importedTypes and
JavaAST.importedModules data
structures to map incomplete type names to fully qualified type
names. It caches results in the
JavaAST.resolvedTypes data
structure to speed up future resolutions.
Parameters: name - The type name. The corresponding class or null if the namecannot be resolved. |
Methods inherited from xtc.type.AST | public static Type actionOf(Type element)(Code)(Java Doc) public void add(TupleT tuple, VariantT variant)(Code)(Java Doc) public Type combine(TupleT tuple1, TupleT tuple2, boolean flatten, boolean strict)(Code)(Java Doc) public Type concretize(Type type, Type concrete)(Code)(Java Doc) public void concretizeTuples(VariantT variant, Type concrete)(Code)(Java Doc) public String extern(Type type)(Code)(Java Doc) abstract protected String externAction(Type type)(Code)(Java Doc) abstract protected String externList(Type type)(Code)(Java Doc) abstract protected String externUser(Type type)(Code)(Java Doc) public Type flatten(TupleT tuple, boolean strict)(Code)(Java Doc) public static Type getArgument(Type type)(Code)(Java Doc) public MetaData getMetaData(VariantT variant)(Code)(Java Doc) public FuzzyBoolean hasLocation(Type type)(Code)(Java Doc) abstract protected FuzzyBoolean hasLocationUser(Type type)(Code)(Java Doc) public boolean hasTuple(String name)(Code)(Java Doc) public boolean hasVariant(String name)(Code)(Java Doc) public void importModule(String module)(Code)(Java Doc) public void importType(String qualified, String simple)(Code)(Java Doc) abstract public void initialize(boolean hasNode, boolean hasToken, boolean hasFormatting, boolean hasAction)(Code)(Java Doc) public Type intern(String s)(Code)(Java Doc) abstract protected Type internAction(String s)(Code)(Java Doc) abstract protected Type internList(String s)(Code)(Java Doc) abstract protected Type internUser(String s)(Code)(Java Doc) public static boolean isAction(Type type)(Code)(Java Doc) public static boolean isAny(Type type)(Code)(Java Doc) public static boolean isChar(Type type)(Code)(Java Doc) public static boolean isDynamicNode(Type type)(Code)(Java Doc) public static boolean isFormatting(Type type)(Code)(Java Doc) abstract public boolean isGenericNode(String s)(Code)(Java Doc) public static boolean isGenericNode(Type type)(Code)(Java Doc) public static boolean isList(Type type)(Code)(Java Doc) public boolean isMonomorphic(String name)(Code)(Java Doc) public static boolean isNode(Type type)(Code)(Java Doc) public static boolean isNullNode(Type type)(Code)(Java Doc) public static boolean isOptional(Type type)(Code)(Java Doc) public static boolean isStaticNode(Type type)(Code)(Java Doc) public static boolean isString(Type type)(Code)(Java Doc) public static boolean isToken(Type type)(Code)(Java Doc) public static boolean isUser(Type type)(Code)(Java Doc) public static boolean isVariable(Type type)(Code)(Java Doc) abstract public boolean isVoid(String s)(Code)(Java Doc) public static boolean isVoid(Type type)(Code)(Java Doc) public static Type listOf(Type element)(Code)(Java Doc) public static Type markOptional(Type type)(Code)(Java Doc) public static Type markVariable(Type type)(Code)(Java Doc) public boolean overlap(VariantT v1, VariantT v2)(Code)(Java Doc) public void print(Type type, Printer printer, boolean refIsDecl, boolean qualified, String module)(Code)(Java Doc) public String toOriginal(VariantT variant)(Code)(Java Doc) public TupleT toTuple(String name)(Code)(Java Doc) public TupleT toTuple(VariantT variant)(Code)(Java Doc) public VariantT toVariant(String name, boolean poly)(Code)(Java Doc) public String toVariantName(String name)(Code)(Java Doc) public List<VariantT> toVariants(TupleT tuple)(Code)(Java Doc) public Type unify(Type t1, Type t2, boolean strict)(Code)(Java Doc) protected Type unify(VariantT v1, VariantT v2)(Code)(Java Doc) abstract protected Type unifyUser(Type t1, Type t2, boolean strict)(Code)(Java Doc)
|
|
|