public InferTypeArgumentsTCModel() { fTypeConstraints= new HashMap(); fConstraintVariables= new LinkedHashMap(); // make iteration independent of hashCode() implementation fCastVariables= new ArrayList(); fCuScopedConstraintVariables= new HashSet(); fTypeEnvironment= new TypeEnvironment(true); }
public InferTypeArgumentsTCModel() { fTypeConstraints= new HashMap<>(); fConstraintVariables= new LinkedHashMap<>(); // make iteration independent of hashCode() implementation fCastVariables= new ArrayList<>(); fCuScopedConstraintVariables= new HashSet<>(); fTypeEnvironment= new TypeEnvironment(true); }
public InferTypeArgumentsTCModel() { fTypeConstraints= new HashMap<>(); fConstraintVariables= new LinkedHashMap<>(); // make iteration independent of hashCode() implementation fCastVariables= new ArrayList<>(); fCuScopedConstraintVariables= new HashSet<>(); fTypeEnvironment= new TypeEnvironment(true); }
/** * Tests if two types are assign compatible. Void types are never compatible. * * @param typeToAssign The binding of the type to assign * @param definedType The type of the object that is assigned * @return <code>true</code> iff definedType = typeToAssign is a valid assignment */ public static boolean canAssign(ITypeBinding typeToAssign, ITypeBinding definedType) { TypeEnvironment typeEnvironment= new TypeEnvironment(false, true); TType defined= typeEnvironment.create(definedType); TType toAssign= typeEnvironment.create(typeToAssign); return toAssign.canAssignTo(defined); }
/** * Tests if two types are assign compatible. Void types are never compatible. * * @param typeToAssign The binding of the type to assign * @param definedType The type of the object that is assigned * @return <code>true</code> iff definedType = typeToAssign is a valid assignment */ public static boolean canAssign(ITypeBinding typeToAssign, ITypeBinding definedType) { TypeEnvironment typeEnvironment= new TypeEnvironment(false, true); TType defined= typeEnvironment.create(definedType); TType toAssign= typeEnvironment.create(typeToAssign); return toAssign.canAssignTo(defined); }
public CallInliner(ICompilationUnit unit, CompilationUnit targetAstRoot, SourceProvider provider) throws CoreException { super(); fCUnit= unit; fBuffer= RefactoringFileBuffers.acquire(fCUnit); fSourceProvider= provider; fImportRewrite= StubUtility.createImportRewrite(targetAstRoot, true); fLocals= new ArrayList(3); fRewrite= ASTRewrite.create(targetAstRoot.getAST()); fRewrite.setTargetSourceRangeComputer(new NoCommentSourceRangeComputer()); fTypeEnvironment= new TypeEnvironment(); }
public CallInliner(ICompilationUnit unit, CompilationUnit targetAstRoot, SourceProvider provider) throws CoreException { super(); fCUnit= unit; fBuffer= RefactoringFileBuffers.acquire(fCUnit); fSourceProvider= provider; fImportRewrite= StubUtility.createImportRewrite(targetAstRoot, true); fLocals= new ArrayList<>(3); fRewrite= ASTRewrite.create(targetAstRoot.getAST()); fRewrite.setTargetSourceRangeComputer(new NoCommentSourceRangeComputer()); fTypeEnvironment= new TypeEnvironment(); }
public CallInliner(ICompilationUnit unit, CompilationUnit targetAstRoot, SourceProvider provider) throws CoreException { super(); fCUnit= unit; fBuffer= RefactoringFileBuffers.acquire(fCUnit); fSourceProvider= provider; fImportRewrite= StubUtility.createImportRewrite(targetAstRoot, true); fLocals= new ArrayList<>(3); fRewrite= ASTRewrite.create(targetAstRoot.getAST()); fRewrite.setTargetSourceRangeComputer(new NoCommentSourceRangeComputer()); fTypeEnvironment= new TypeEnvironment(); }
Assert.isNotNull(status); int level= 3; TypeEnvironment environment= new TypeEnvironment(); final SuperTypeConstraintsModel model= new SuperTypeConstraintsModel(environment, environment.create(subBinding), environment.create(superBinding)); final SuperTypeConstraintsCreator creator= new SuperTypeConstraintsCreator(model, fInstanceOf);
Assert.isNotNull(status); int level= 3; TypeEnvironment environment= new TypeEnvironment(); final SuperTypeConstraintsModel model= new SuperTypeConstraintsModel(environment, environment.create(subBinding), environment.create(superBinding)); final SuperTypeConstraintsCreator creator= new SuperTypeConstraintsCreator(model, fInstanceOf);
Assert.isNotNull(status); int level= 3; TypeEnvironment environment= new TypeEnvironment(); final SuperTypeConstraintsModel model= new SuperTypeConstraintsModel(environment, environment.create(subBinding), environment.create(superBinding)); final SuperTypeConstraintsCreator creator= new SuperTypeConstraintsCreator(model, fInstanceOf);