@Test public void deepCloneTest(){ assertTrue(teVoid.deepClone() instanceof SymTypeVoid); assertEquals(teVoid.getTypeInfo().getName(),teVoid.deepClone().getTypeInfo().getName()); assertEquals(teVoid.print(),teVoid.deepClone().print()); assertTrue(teNull.deepClone() instanceof SymTypeOfNull); assertEquals(teNull.getTypeInfo().getName(),teNull.deepClone().getTypeInfo().getName()); assertEquals(teNull.print(),teNull.deepClone().print()); assertTrue(teVarA.deepClone() instanceof SymTypeVariable); assertFalse(teVarA.deepClone().isTypeConstant()); assertTrue(teVarA.deepClone().isTypeVariable()); assertEquals(teVarA.print(),teVarA.deepClone().print()); assertTrue(teInt.deepClone() instanceof SymTypeConstant); assertEquals(teInt.getTypeInfo().getName(), teInt.deepClone().getTypeInfo().getName()); assertTrue(teInt.deepClone().isTypeConstant()); assertEquals(teInt.print(),teInt.deepClone().print()); assertTrue(teH.deepClone() instanceof SymTypeOfObject); assertEquals(teH.print(),teH.deepClone().print()); assertTrue(teArr1.deepClone() instanceof SymTypeArray); assertEquals(teArr1.print(),teArr1.deepClone().print()); assertEquals(((SymTypeArray)teArr1).getDim(),((SymTypeArray)teArr1.deepClone()).getDim()); assertEquals(((SymTypeArray)teArr1).getArgument().print(),((SymTypeArray)teArr1.deepClone()).getArgument().print()); assertTrue(teDeep1.deepClone() instanceof SymTypeOfGenerics); assertTrue(teDeep1.deepClone().isGenericType()); assertEquals(teDeep1.print(),teDeep1.deepClone().print()); assertTrue(teUpperBound.deepClone() instanceof SymTypeOfWildcard); assertEquals(((SymTypeOfWildcard) teUpperBound).getBound().print(), ((SymTypeOfWildcard) teUpperBound.deepClone()).getBound().print()); assertEquals(teUpperBound.print(), teUpperBound.deepClone().print()); }
public abstract SymTypeExpression deepClone();
SymTypeExpression { public abstract SymTypeExpression deepClone(); }
SymTypeExpression { public abstract SymTypeExpression deepClone();  }
SymTypeExpression { public abstract SymTypeExpression deepClone();  abstract String print(); boolean isTypeConstant(); boolean isGenericType(); boolean isTypeVariable(); boolean isArrayType(); boolean isVoidType(); boolean isNullType(); boolean isObjectType(); abstract SymTypeExpression deepClone(); abstract boolean deepEquals(SymTypeExpression sym); List<FunctionSymbol> getMethodList(String methodname); List<FunctionSymbol> getMethodList(String methodName, boolean outerIsType); List<VariableSymbol> getFieldList(String fieldName); List<VariableSymbol> getFieldList(String fieldName, boolean outerIsType); TypeSymbol getTypeInfo(); List<TypeSymbol> getInnerTypeList(String name); }
SymTypeExpression { public abstract SymTypeExpression deepClone();  abstract String print(); boolean isTypeConstant(); boolean isGenericType(); boolean isTypeVariable(); boolean isArrayType(); boolean isVoidType(); boolean isNullType(); boolean isObjectType(); abstract SymTypeExpression deepClone(); abstract boolean deepEquals(SymTypeExpression sym); List<FunctionSymbol> getMethodList(String methodname); List<FunctionSymbol> getMethodList(String methodName, boolean outerIsType); List<VariableSymbol> getFieldList(String fieldName); List<VariableSymbol> getFieldList(String fieldName, boolean outerIsType); TypeSymbol getTypeInfo(); List<TypeSymbol> getInnerTypeList(String name);  }