Search in sources :

Example 1 with ImmutableTypeVariable2

use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2 in project che by eclipse.

the class InferTypeArgumentsConstraintCreator method endVisit.

@Override
public void endVisit(ParenthesizedExpression node) {
    if (node.resolveBoxing()) {
        ImmutableTypeVariable2 boxed = fTCModel.makeImmutableTypeVariable(node.resolveTypeBinding(), node);
        setConstraintVariable(node, boxed);
        return;
    }
    ConstraintVariable2 expressionCv = getConstraintVariable(node.getExpression());
    setConstraintVariable(node, expressionCv);
}
Also used : ImmutableTypeVariable2(org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2) ConstraintVariable2(org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ConstraintVariable2)

Example 2 with ImmutableTypeVariable2

use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2 in project che by eclipse.

the class InferTypeArgumentsConstraintCreator method endVisit.

@Override
public void endVisit(ThisExpression node) {
    ITypeBinding typeBinding = node.resolveTypeBinding();
    ImmutableTypeVariable2 cv = fTCModel.makeImmutableTypeVariable(typeBinding, /*no boxing*/
    null);
    setConstraintVariable(node, cv);
}
Also used : ImmutableTypeVariable2(org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding)

Example 3 with ImmutableTypeVariable2

use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2 in project che by eclipse.

the class InferTypeArgumentsConstraintCreator method endVisit.

@Override
public void endVisit(BooleanLiteral node) {
    ITypeBinding typeBinding = node.resolveTypeBinding();
    ImmutableTypeVariable2 cv = fTCModel.makeImmutableTypeVariable(typeBinding, node);
    setConstraintVariable(node, cv);
}
Also used : ImmutableTypeVariable2(org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2) ITypeBinding(org.eclipse.jdt.core.dom.ITypeBinding)

Example 4 with ImmutableTypeVariable2

use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2 in project che by eclipse.

the class InferTypeArgumentsTCModel method makeImmutableTypeVariable.

public ImmutableTypeVariable2 makeImmutableTypeVariable(TType type) {
    ImmutableTypeVariable2 cv = new ImmutableTypeVariable2(type);
    ImmutableTypeVariable2 storedCv = (ImmutableTypeVariable2) storedCv(cv);
    if (cv == storedCv) {
        makeFixedElementVariables(storedCv, type);
        makeArrayElementVariable(storedCv);
    }
    return storedCv;
}
Also used : ImmutableTypeVariable2(org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2)

Example 5 with ImmutableTypeVariable2

use of org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2 in project che by eclipse.

the class InferTypeArgumentsConstraintCreator method endVisit.

@Override
public void endVisit(QualifiedName node) {
    if (node.resolveBoxing()) {
        ImmutableTypeVariable2 boxed = fTCModel.makeImmutableTypeVariable(node.resolveTypeBinding(), node);
        setConstraintVariable(node, boxed);
        return;
    }
    ConstraintVariable2 cv = getConstraintVariable(node.getName());
    setConstraintVariable(node, cv);
}
Also used : ImmutableTypeVariable2(org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2) ConstraintVariable2(org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ConstraintVariable2)

Aggregations

ImmutableTypeVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ImmutableTypeVariable2)19 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)11 ConstraintVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ConstraintVariable2)10 CastExpression (org.eclipse.jdt.core.dom.CastExpression)5 ConditionalExpression (org.eclipse.jdt.core.dom.ConditionalExpression)5 Expression (org.eclipse.jdt.core.dom.Expression)5 ParenthesizedExpression (org.eclipse.jdt.core.dom.ParenthesizedExpression)5 ThisExpression (org.eclipse.jdt.core.dom.ThisExpression)5 VariableDeclarationExpression (org.eclipse.jdt.core.dom.VariableDeclarationExpression)5 TType (org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.TType)4 IndependentTypeVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.IndependentTypeVariable2)3 ParameterTypeVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ParameterTypeVariable2)3 ParameterizedTypeVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ParameterizedTypeVariable2)3 ReturnTypeVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ReturnTypeVariable2)3 ArrayType (org.eclipse.jdt.core.dom.ArrayType)2 WildcardType (org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.WildcardType)2 ArrayElementVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.ArrayElementVariable2)2 CollectionElementVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.CollectionElementVariable2)2 TypeVariable2 (org.eclipse.jdt.internal.corext.refactoring.typeconstraints2.TypeVariable2)2 HashMap (java.util.HashMap)1