|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.dynamicjava.symbol.type.TypeVisitorLambda<Type>
edu.rice.cs.dynamicjava.symbol.type.TypeUpdateVisitor
public abstract class TypeUpdateVisitor
A depth-first visitor that makes an updated copy as it visits (by default). The type of the result is generally the same as that of the argument; where automatic recursion on a field of type T occurs, this must be true for T. Where no changes are made to a node, a new copy is not allocated. This visitor implements the visitor interface with methods that first update the children, and then call forCASEOnly(), passing in the values of the updated children. (CASE is replaced by the case name.) Override forCASE or forCASEOnly if you want to transform an AST subtree. There is no automatic delegation to more general cases, because each concrete case has a default implementation.
| Constructor Summary | |
|---|---|
TypeUpdateVisitor()
|
|
| Method Summary | |
|---|---|
Type |
forBooleanType(BooleanType that)
Methods to recur on each child. |
Type |
forBooleanTypeOnly(BooleanType that)
|
Type |
forBottomType(BottomType that)
Process an instance of BottomType. |
Type |
forBottomTypeOnly(BottomType that)
|
Type |
forByteType(ByteType that)
Process an instance of ByteType. |
Type |
forByteTypeOnly(ByteType that)
|
Type |
forCharType(CharType that)
Process an instance of CharType. |
Type |
forCharTypeOnly(CharType that)
|
Type |
forDoubleType(DoubleType that)
Process an instance of DoubleType. |
Type |
forDoubleTypeOnly(DoubleType that)
|
Type |
forFloatType(FloatType that)
Process an instance of FloatType. |
Type |
forFloatTypeOnly(FloatType that)
|
Type |
forIntersectionType(IntersectionType that)
Process an instance of IntersectionType. |
Type |
forIntersectionTypeOnly(IntersectionType that,
java.lang.Iterable<? extends Type> ofTypes_result)
|
Type |
forIntType(IntType that)
Process an instance of IntType. |
Type |
forIntTypeOnly(IntType that)
|
Type |
forLongType(LongType that)
Process an instance of LongType. |
Type |
forLongTypeOnly(LongType that)
|
Type |
forNullType(NullType that)
Process an instance of NullType. |
Type |
forNullTypeOnly(NullType that)
|
Type |
forParameterizedClassType(ParameterizedClassType that)
Process an instance of ParameterizedClassType. |
Type |
forParameterizedClassTypeOnly(ParameterizedClassType that,
java.lang.Iterable<? extends Type> typeArguments_result)
|
Type |
forRawClassType(RawClassType that)
Process an instance of RawClassType. |
Type |
forRawClassTypeOnly(RawClassType that)
|
Type |
forShortType(ShortType that)
Process an instance of ShortType. |
Type |
forShortTypeOnly(ShortType that)
|
Type |
forSimpleArrayType(SimpleArrayType that)
Process an instance of SimpleArrayType. |
Type |
forSimpleArrayTypeOnly(SimpleArrayType that,
Type ofType_result)
|
Type |
forSimpleClassType(SimpleClassType that)
Process an instance of SimpleClassType. |
Type |
forSimpleClassTypeOnly(SimpleClassType that)
|
Type |
forTopType(TopType that)
Process an instance of TopType. |
Type |
forTopTypeOnly(TopType that)
|
Type |
forUnionType(UnionType that)
Process an instance of UnionType. |
Type |
forUnionTypeOnly(UnionType that,
java.lang.Iterable<? extends Type> ofTypes_result)
|
Type |
forVarargArrayType(VarargArrayType that)
Process an instance of VarargArrayType. |
Type |
forVarargArrayTypeOnly(VarargArrayType that,
Type ofType_result)
|
Type |
forVariableType(VariableType that)
Process an instance of VariableType. |
Type |
forVariableTypeOnly(VariableType that)
|
Type |
forVoidType(VoidType that)
Process an instance of VoidType. |
Type |
forVoidTypeOnly(VoidType that)
|
Type |
forWildcard(Wildcard that)
Process an instance of Wildcard. |
Type |
forWildcardOnly(Wildcard that)
|
Type |
recur(Type that)
|
java.lang.Iterable<? extends Type> |
recurOnIterableOfWildcardExtendsType(java.lang.Iterable<? extends Type> that)
|
| Methods inherited from class edu.rice.cs.dynamicjava.symbol.type.TypeVisitorLambda |
|---|
value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypeUpdateVisitor()
| Method Detail |
|---|
public Type forBooleanTypeOnly(BooleanType that)
public Type forCharTypeOnly(CharType that)
public Type forByteTypeOnly(ByteType that)
public Type forShortTypeOnly(ShortType that)
public Type forIntTypeOnly(IntType that)
public Type forLongTypeOnly(LongType that)
public Type forFloatTypeOnly(FloatType that)
public Type forDoubleTypeOnly(DoubleType that)
public Type forNullTypeOnly(NullType that)
public Type forSimpleArrayTypeOnly(SimpleArrayType that,
Type ofType_result)
public Type forVarargArrayTypeOnly(VarargArrayType that,
Type ofType_result)
public Type forSimpleClassTypeOnly(SimpleClassType that)
public Type forRawClassTypeOnly(RawClassType that)
public Type forParameterizedClassTypeOnly(ParameterizedClassType that,
java.lang.Iterable<? extends Type> typeArguments_result)
public Type forIntersectionTypeOnly(IntersectionType that,
java.lang.Iterable<? extends Type> ofTypes_result)
public Type forUnionTypeOnly(UnionType that,
java.lang.Iterable<? extends Type> ofTypes_result)
public Type forVariableTypeOnly(VariableType that)
public Type forTopTypeOnly(TopType that)
public Type forBottomTypeOnly(BottomType that)
public Type forVoidTypeOnly(VoidType that)
public Type forWildcardOnly(Wildcard that)
public Type forBooleanType(BooleanType that)
forBooleanType in interface TypeVisitor<Type>forBooleanType in class TypeVisitorLambda<Type>public Type forCharType(CharType that)
TypeVisitorLambda
forCharType in interface TypeVisitor<Type>forCharType in class TypeVisitorLambda<Type>public Type forByteType(ByteType that)
TypeVisitorLambda
forByteType in interface TypeVisitor<Type>forByteType in class TypeVisitorLambda<Type>public Type forShortType(ShortType that)
TypeVisitorLambda
forShortType in interface TypeVisitor<Type>forShortType in class TypeVisitorLambda<Type>public Type forIntType(IntType that)
TypeVisitorLambda
forIntType in interface TypeVisitor<Type>forIntType in class TypeVisitorLambda<Type>public Type forLongType(LongType that)
TypeVisitorLambda
forLongType in interface TypeVisitor<Type>forLongType in class TypeVisitorLambda<Type>public Type forFloatType(FloatType that)
TypeVisitorLambda
forFloatType in interface TypeVisitor<Type>forFloatType in class TypeVisitorLambda<Type>public Type forDoubleType(DoubleType that)
TypeVisitorLambda
forDoubleType in interface TypeVisitor<Type>forDoubleType in class TypeVisitorLambda<Type>public Type forNullType(NullType that)
TypeVisitorLambda
forNullType in interface TypeVisitor<Type>forNullType in class TypeVisitorLambda<Type>public Type forSimpleArrayType(SimpleArrayType that)
TypeVisitorLambda
forSimpleArrayType in interface TypeVisitor<Type>forSimpleArrayType in class TypeVisitorLambda<Type>public Type forVarargArrayType(VarargArrayType that)
TypeVisitorLambda
forVarargArrayType in interface TypeVisitor<Type>forVarargArrayType in class TypeVisitorLambda<Type>public Type forSimpleClassType(SimpleClassType that)
TypeVisitorLambda
forSimpleClassType in interface TypeVisitor<Type>forSimpleClassType in class TypeVisitorLambda<Type>public Type forRawClassType(RawClassType that)
TypeVisitorLambda
forRawClassType in interface TypeVisitor<Type>forRawClassType in class TypeVisitorLambda<Type>public Type forParameterizedClassType(ParameterizedClassType that)
TypeVisitorLambda
forParameterizedClassType in interface TypeVisitor<Type>forParameterizedClassType in class TypeVisitorLambda<Type>public Type forIntersectionType(IntersectionType that)
TypeVisitorLambda
forIntersectionType in interface TypeVisitor<Type>forIntersectionType in class TypeVisitorLambda<Type>public Type forUnionType(UnionType that)
TypeVisitorLambda
forUnionType in interface TypeVisitor<Type>forUnionType in class TypeVisitorLambda<Type>public Type forVariableType(VariableType that)
TypeVisitorLambda
forVariableType in interface TypeVisitor<Type>forVariableType in class TypeVisitorLambda<Type>public Type forTopType(TopType that)
TypeVisitorLambda
forTopType in interface TypeVisitor<Type>forTopType in class TypeVisitorLambda<Type>public Type forBottomType(BottomType that)
TypeVisitorLambda
forBottomType in interface TypeVisitor<Type>forBottomType in class TypeVisitorLambda<Type>public Type forVoidType(VoidType that)
TypeVisitorLambda
forVoidType in interface TypeVisitor<Type>forVoidType in class TypeVisitorLambda<Type>public Type forWildcard(Wildcard that)
TypeVisitorLambda
forWildcard in interface TypeVisitor<Type>forWildcard in class TypeVisitorLambda<Type>public Type recur(Type that)
public java.lang.Iterable<? extends Type> recurOnIterableOfWildcardExtendsType(java.lang.Iterable<? extends Type> that)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||