Search in sources :

Example 6 with SingleNameReference

use of org.eclipse.jdt.internal.compiler.ast.SingleNameReference in project lombok by rzwitserloot.

the class HandleGetter method createLazyGetterBody.

public Statement[] createLazyGetterBody(ASTNode source, EclipseNode fieldNode) {
    /*
		java.lang.Object value = this.fieldName.get();
		if (value == null) {
			synchronized (this.fieldName) {
				value = this.fieldName.get();
				if (value == null) {
					final RawValueType actualValue = INITIALIZER_EXPRESSION;
					[IF PRIMITIVE]
					value = actualValue;
					[ELSE]
					value = actualValue == null ? this.fieldName : actualValue;
					[END IF]
					this.fieldName.set(value);
				}
			}
		}
		[IF PRIMITIVE]
		return (BoxedValueType) value;
		[ELSE]
		return (BoxedValueType) (value == this.fieldName ? null : value);
		[END IF]
		*/
    FieldDeclaration field = (FieldDeclaration) fieldNode.get();
    int pS = source.sourceStart, pE = source.sourceEnd;
    long p = (long) pS << 32 | pE;
    TypeReference rawComponentType = copyType(field.type, source);
    TypeReference boxedComponentType = null;
    boolean isPrimitive = false;
    if (field.type instanceof SingleTypeReference && !(field.type instanceof ArrayTypeReference)) {
        char[][] newType = TYPE_MAP.get(new String(((SingleTypeReference) field.type).token));
        if (newType != null) {
            boxedComponentType = new QualifiedTypeReference(newType, poss(source, 3));
            isPrimitive = true;
        }
    }
    if (boxedComponentType == null)
        boxedComponentType = copyType(field.type, source);
    boxedComponentType.sourceStart = pS;
    boxedComponentType.sourceEnd = boxedComponentType.statementEnd = pE;
    Statement[] statements = new Statement[3];
    /* java.lang.Object value = this.fieldName.get(); */
    {
        LocalDeclaration valueDecl = new LocalDeclaration(valueName, pS, pE);
        valueDecl.type = new QualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT, poss(source, 3));
        valueDecl.type.sourceStart = pS;
        valueDecl.type.sourceEnd = valueDecl.type.statementEnd = pE;
        MessageSend getter = new MessageSend();
        getter.sourceStart = pS;
        getter.statementEnd = getter.sourceEnd = pE;
        getter.selector = new char[] { 'g', 'e', 't' };
        getter.receiver = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
        valueDecl.initialization = getter;
        statements[0] = valueDecl;
    }
    /*
		if (value == null) {
			synchronized (this.fieldName) {
				value = this.fieldName.get();
				if (value == null) { 
					final ValueType actualValue = INITIALIZER_EXPRESSION;
					[IF PRIMITIVE]
					value = actualValue;
					[ELSE]
					value = actualValue == null ? this.fieldName : actualValue;
					[END IF]
					this.fieldName.set(value);
				}
			}
		}
		 */
    {
        EqualExpression cond = new EqualExpression(new SingleNameReference(valueName, p), new NullLiteral(pS, pE), BinaryExpression.EQUAL_EQUAL);
        Block then = new Block(0);
        Expression lock = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
        Block inner = new Block(0);
        inner.statements = new Statement[2];
        /* value = this.fieldName.get(); */
        {
            MessageSend getter = new MessageSend();
            getter.sourceStart = pS;
            getter.sourceEnd = getter.statementEnd = pE;
            getter.selector = new char[] { 'g', 'e', 't' };
            getter.receiver = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
            Assignment assign = new Assignment(new SingleNameReference(valueName, p), getter, pE);
            assign.sourceStart = pS;
            assign.statementEnd = assign.sourceEnd = pE;
            inner.statements[0] = assign;
        }
        /* if (value == null) */
        {
            EqualExpression innerCond = new EqualExpression(new SingleNameReference(valueName, p), new NullLiteral(pS, pE), BinaryExpression.EQUAL_EQUAL);
            innerCond.sourceStart = pS;
            innerCond.sourceEnd = innerCond.statementEnd = pE;
            Block innerThen = new Block(0);
            innerThen.statements = new Statement[3];
            /* final ValueType actualValue = INITIALIZER_EXPRESSION */
            {
                LocalDeclaration actualValueDecl = new LocalDeclaration(actualValueName, pS, pE);
                actualValueDecl.type = rawComponentType;
                actualValueDecl.type.sourceStart = pS;
                actualValueDecl.type.sourceEnd = actualValueDecl.type.statementEnd = pE;
                actualValueDecl.initialization = field.initialization;
                actualValueDecl.modifiers = ClassFileConstants.AccFinal;
                innerThen.statements[0] = actualValueDecl;
            }
            /* [IF PRIMITIVE] value = actualValue; */
            {
                if (isPrimitive) {
                    Assignment innerAssign = new Assignment(new SingleNameReference(valueName, p), new SingleNameReference(actualValueName, p), pE);
                    innerAssign.sourceStart = pS;
                    innerAssign.statementEnd = innerAssign.sourceEnd = pE;
                    innerThen.statements[1] = innerAssign;
                }
            }
            /* [ELSE] value = actualValue == null ? this.fieldName : actualValue; */
            {
                if (!isPrimitive) {
                    EqualExpression avIsNull = new EqualExpression(new SingleNameReference(actualValueName, p), new NullLiteral(pS, pE), BinaryExpression.EQUAL_EQUAL);
                    avIsNull.sourceStart = pS;
                    avIsNull.sourceEnd = avIsNull.statementEnd = pE;
                    Expression fieldRef = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
                    ConditionalExpression ternary = new ConditionalExpression(avIsNull, fieldRef, new SingleNameReference(actualValueName, p));
                    ternary.sourceStart = pS;
                    ternary.sourceEnd = ternary.statementEnd = pE;
                    Assignment innerAssign = new Assignment(new SingleNameReference(valueName, p), ternary, pE);
                    innerAssign.sourceStart = pS;
                    innerAssign.statementEnd = innerAssign.sourceEnd = pE;
                    innerThen.statements[1] = innerAssign;
                }
            }
            /* this.fieldName.set(value); */
            {
                MessageSend setter = new MessageSend();
                setter.sourceStart = pS;
                setter.sourceEnd = setter.statementEnd = pE;
                setter.receiver = createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source);
                setter.selector = new char[] { 's', 'e', 't' };
                setter.arguments = new Expression[] { new SingleNameReference(valueName, p) };
                innerThen.statements[2] = setter;
            }
            IfStatement innerIf = new IfStatement(innerCond, innerThen, pS, pE);
            inner.statements[1] = innerIf;
        }
        SynchronizedStatement sync = new SynchronizedStatement(lock, inner, pS, pE);
        then.statements = new Statement[] { sync };
        IfStatement ifStatement = new IfStatement(cond, then, pS, pE);
        statements[1] = ifStatement;
    }
    /* [IF PRIMITIVE] return (BoxedValueType)value; */
    {
        if (isPrimitive) {
            CastExpression cast = makeCastExpression(new SingleNameReference(valueName, p), boxedComponentType, source);
            statements[2] = new ReturnStatement(cast, pS, pE);
        }
    }
    /* [ELSE] return (BoxedValueType)(value == this.fieldName ? null : value); */
    {
        if (!isPrimitive) {
            EqualExpression vIsThisFieldName = new EqualExpression(new SingleNameReference(valueName, p), createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source), BinaryExpression.EQUAL_EQUAL);
            vIsThisFieldName.sourceStart = pS;
            vIsThisFieldName.sourceEnd = vIsThisFieldName.statementEnd = pE;
            ConditionalExpression ternary = new ConditionalExpression(vIsThisFieldName, new NullLiteral(pS, pE), new SingleNameReference(valueName, p));
            ternary.sourceStart = pS;
            ternary.sourceEnd = ternary.statementEnd = pE;
            ternary.bits |= PARENTHESIZED;
            CastExpression cast = makeCastExpression(ternary, boxedComponentType, source);
            statements[2] = new ReturnStatement(cast, pS, pE);
        }
    }
    // update the field type and init last
    /* 	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> fieldName = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>(); */
    {
        TypeReference innerType = new QualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT, poss(source, 3));
        TypeReference[][] typeParams = new TypeReference[5][];
        typeParams[4] = new TypeReference[] { innerType };
        TypeReference type = new ParameterizedQualifiedTypeReference(AR, typeParams, 0, poss(source, 5));
        // Some magic here
        type.sourceStart = -1;
        type.sourceEnd = -2;
        field.type = type;
        AllocationExpression init = new AllocationExpression();
        // Some magic here
        init.sourceStart = field.initialization.sourceStart;
        init.sourceEnd = init.statementEnd = field.initialization.sourceEnd;
        init.type = copyType(type, source);
        field.initialization = init;
    }
    return statements;
}
Also used : EqualExpression(org.eclipse.jdt.internal.compiler.ast.EqualExpression) SynchronizedStatement(org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement) SingleNameReference(org.eclipse.jdt.internal.compiler.ast.SingleNameReference) FieldDeclaration(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) Assignment(org.eclipse.jdt.internal.compiler.ast.Assignment) MessageSend(org.eclipse.jdt.internal.compiler.ast.MessageSend) IfStatement(org.eclipse.jdt.internal.compiler.ast.IfStatement) ParameterizedQualifiedTypeReference(org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference) QualifiedTypeReference(org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) ReturnStatement(org.eclipse.jdt.internal.compiler.ast.ReturnStatement) ArrayTypeReference(org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference) ParameterizedQualifiedTypeReference(org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference) SingleTypeReference(org.eclipse.jdt.internal.compiler.ast.SingleTypeReference) TypeReference(org.eclipse.jdt.internal.compiler.ast.TypeReference) QualifiedTypeReference(org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) ArrayTypeReference(org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference) LocalDeclaration(org.eclipse.jdt.internal.compiler.ast.LocalDeclaration) ReturnStatement(org.eclipse.jdt.internal.compiler.ast.ReturnStatement) Statement(org.eclipse.jdt.internal.compiler.ast.Statement) IfStatement(org.eclipse.jdt.internal.compiler.ast.IfStatement) SynchronizedStatement(org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement) ParameterizedQualifiedTypeReference(org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference) ConditionalExpression(org.eclipse.jdt.internal.compiler.ast.ConditionalExpression) SingleTypeReference(org.eclipse.jdt.internal.compiler.ast.SingleTypeReference) ConditionalExpression(org.eclipse.jdt.internal.compiler.ast.ConditionalExpression) Expression(org.eclipse.jdt.internal.compiler.ast.Expression) AllocationExpression(org.eclipse.jdt.internal.compiler.ast.AllocationExpression) EqualExpression(org.eclipse.jdt.internal.compiler.ast.EqualExpression) BinaryExpression(org.eclipse.jdt.internal.compiler.ast.BinaryExpression) CastExpression(org.eclipse.jdt.internal.compiler.ast.CastExpression) AllocationExpression(org.eclipse.jdt.internal.compiler.ast.AllocationExpression) Block(org.eclipse.jdt.internal.compiler.ast.Block) CastExpression(org.eclipse.jdt.internal.compiler.ast.CastExpression) NullLiteral(org.eclipse.jdt.internal.compiler.ast.NullLiteral)

Example 7 with SingleNameReference

use of org.eclipse.jdt.internal.compiler.ast.SingleNameReference in project lombok by rzwitserloot.

the class HandleEqualsAndHashCode method createResultCalculation.

public Expression createResultCalculation(ASTNode source, Expression ex) {
    /* result = result * PRIME + (ex); */
    int pS = source.sourceStart, pE = source.sourceEnd;
    long p = (long) pS << 32 | pE;
    SingleNameReference resultRef = new SingleNameReference(RESULT, p);
    setGeneratedBy(resultRef, source);
    SingleNameReference primeRef = new SingleNameReference(PRIME, p);
    setGeneratedBy(primeRef, source);
    BinaryExpression multiplyByPrime = new BinaryExpression(resultRef, primeRef, OperatorIds.MULTIPLY);
    multiplyByPrime.sourceStart = pS;
    multiplyByPrime.sourceEnd = pE;
    setGeneratedBy(multiplyByPrime, source);
    BinaryExpression addItem = new BinaryExpression(multiplyByPrime, ex, OperatorIds.PLUS);
    addItem.sourceStart = pS;
    addItem.sourceEnd = pE;
    setGeneratedBy(addItem, source);
    resultRef = new SingleNameReference(RESULT, p);
    setGeneratedBy(resultRef, source);
    Assignment assignment = new Assignment(resultRef, addItem, pE);
    assignment.sourceStart = pS;
    assignment.sourceEnd = assignment.statementEnd = pE;
    setGeneratedBy(assignment, source);
    return assignment;
}
Also used : Assignment(org.eclipse.jdt.internal.compiler.ast.Assignment) BinaryExpression(org.eclipse.jdt.internal.compiler.ast.BinaryExpression) SingleNameReference(org.eclipse.jdt.internal.compiler.ast.SingleNameReference)

Example 8 with SingleNameReference

use of org.eclipse.jdt.internal.compiler.ast.SingleNameReference in project lombok by rzwitserloot.

the class HandleEqualsAndHashCode method generateQualifiedNameRef.

public NameReference generateQualifiedNameRef(ASTNode source, char[]... varNames) {
    int pS = source.sourceStart, pE = source.sourceEnd;
    long p = (long) pS << 32 | pE;
    NameReference ref;
    if (varNames.length > 1)
        ref = new QualifiedNameReference(varNames, new long[varNames.length], pS, pE);
    else
        ref = new SingleNameReference(varNames[0], p);
    setGeneratedBy(ref, source);
    return ref;
}
Also used : QualifiedNameReference(org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference) NameReference(org.eclipse.jdt.internal.compiler.ast.NameReference) SingleNameReference(org.eclipse.jdt.internal.compiler.ast.SingleNameReference) SingleNameReference(org.eclipse.jdt.internal.compiler.ast.SingleNameReference) QualifiedNameReference(org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference)

Example 9 with SingleNameReference

use of org.eclipse.jdt.internal.compiler.ast.SingleNameReference in project lombok by rzwitserloot.

the class HandleWither method createWither.

public MethodDeclaration createWither(TypeDeclaration parent, EclipseNode fieldNode, String name, int modifier, EclipseNode sourceNode, List<Annotation> onMethod, List<Annotation> onParam, boolean makeAbstract) {
    ASTNode source = sourceNode.get();
    if (name == null)
        return null;
    FieldDeclaration field = (FieldDeclaration) fieldNode.get();
    int pS = source.sourceStart, pE = source.sourceEnd;
    long p = (long) pS << 32 | pE;
    MethodDeclaration method = new MethodDeclaration(parent.compilationResult);
    if (makeAbstract)
        modifier = modifier | ClassFileConstants.AccAbstract | ExtraCompilerModifiers.AccSemicolonBody;
    method.modifiers = modifier;
    method.returnType = cloneSelfType(fieldNode, source);
    if (method.returnType == null)
        return null;
    Annotation[] deprecated = null;
    if (isFieldDeprecated(fieldNode)) {
        deprecated = new Annotation[] { generateDeprecatedAnnotation(source) };
    }
    method.annotations = copyAnnotations(source, onMethod.toArray(new Annotation[0]), deprecated);
    Argument param = new Argument(field.name, p, copyType(field.type, source), ClassFileConstants.AccFinal);
    param.sourceStart = pS;
    param.sourceEnd = pE;
    method.arguments = new Argument[] { param };
    method.selector = name.toCharArray();
    method.binding = null;
    method.thrownExceptions = null;
    method.typeParameters = null;
    method.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG;
    Annotation[] nonNulls = findAnnotations(field, NON_NULL_PATTERN);
    Annotation[] nullables = findAnnotations(field, NULLABLE_PATTERN);
    if (!makeAbstract) {
        List<Expression> args = new ArrayList<Expression>();
        for (EclipseNode child : fieldNode.up().down()) {
            if (child.getKind() != Kind.FIELD)
                continue;
            FieldDeclaration childDecl = (FieldDeclaration) child.get();
            // Skip fields that start with $
            if (childDecl.name != null && childDecl.name.length > 0 && childDecl.name[0] == '$')
                continue;
            long fieldFlags = childDecl.modifiers;
            // Skip static fields.
            if ((fieldFlags & ClassFileConstants.AccStatic) != 0)
                continue;
            // Skip initialized final fields.
            if (((fieldFlags & ClassFileConstants.AccFinal) != 0) && childDecl.initialization != null)
                continue;
            if (child.get() == fieldNode.get()) {
                args.add(new SingleNameReference(field.name, p));
            } else {
                args.add(createFieldAccessor(child, FieldAccess.ALWAYS_FIELD, source));
            }
        }
        AllocationExpression constructorCall = new AllocationExpression();
        constructorCall.arguments = args.toArray(new Expression[0]);
        constructorCall.type = cloneSelfType(fieldNode, source);
        Expression identityCheck = new EqualExpression(createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source), new SingleNameReference(field.name, p), OperatorIds.EQUAL_EQUAL);
        ThisReference thisRef = new ThisReference(pS, pE);
        Expression conditional = new ConditionalExpression(identityCheck, thisRef, constructorCall);
        Statement returnStatement = new ReturnStatement(conditional, pS, pE);
        method.bodyStart = method.declarationSourceStart = method.sourceStart = source.sourceStart;
        method.bodyEnd = method.declarationSourceEnd = method.sourceEnd = source.sourceEnd;
        List<Statement> statements = new ArrayList<Statement>(5);
        if (nonNulls.length > 0) {
            Statement nullCheck = generateNullCheck(field, sourceNode);
            if (nullCheck != null)
                statements.add(nullCheck);
        }
        statements.add(returnStatement);
        method.statements = statements.toArray(new Statement[0]);
    }
    param.annotations = copyAnnotations(source, nonNulls, nullables, onParam.toArray(new Annotation[0]));
    method.traverse(new SetGeneratedByVisitor(source), parent.scope);
    return method;
}
Also used : Argument(org.eclipse.jdt.internal.compiler.ast.Argument) MethodDeclaration(org.eclipse.jdt.internal.compiler.ast.MethodDeclaration) ReturnStatement(org.eclipse.jdt.internal.compiler.ast.ReturnStatement) Statement(org.eclipse.jdt.internal.compiler.ast.Statement) ConditionalExpression(org.eclipse.jdt.internal.compiler.ast.ConditionalExpression) ArrayList(java.util.ArrayList) EqualExpression(org.eclipse.jdt.internal.compiler.ast.EqualExpression) ThisReference(org.eclipse.jdt.internal.compiler.ast.ThisReference) SingleNameReference(org.eclipse.jdt.internal.compiler.ast.SingleNameReference) FieldDeclaration(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) Annotation(org.eclipse.jdt.internal.compiler.ast.Annotation) ConditionalExpression(org.eclipse.jdt.internal.compiler.ast.ConditionalExpression) Expression(org.eclipse.jdt.internal.compiler.ast.Expression) AllocationExpression(org.eclipse.jdt.internal.compiler.ast.AllocationExpression) EqualExpression(org.eclipse.jdt.internal.compiler.ast.EqualExpression) AllocationExpression(org.eclipse.jdt.internal.compiler.ast.AllocationExpression) ASTNode(org.eclipse.jdt.internal.compiler.ast.ASTNode) ReturnStatement(org.eclipse.jdt.internal.compiler.ast.ReturnStatement) EclipseNode(lombok.eclipse.EclipseNode)

Example 10 with SingleNameReference

use of org.eclipse.jdt.internal.compiler.ast.SingleNameReference in project lombok by rzwitserloot.

the class HandleConstructor method createStaticConstructor.

public MethodDeclaration createStaticConstructor(AccessLevel level, String name, EclipseNode type, Collection<EclipseNode> fields, ASTNode source) {
    int pS = source.sourceStart, pE = source.sourceEnd;
    long p = (long) pS << 32 | pE;
    MethodDeclaration constructor = new MethodDeclaration(((CompilationUnitDeclaration) type.top().get()).compilationResult);
    constructor.modifiers = toEclipseModifier(level) | ClassFileConstants.AccStatic;
    TypeDeclaration typeDecl = (TypeDeclaration) type.get();
    constructor.returnType = EclipseHandlerUtil.namePlusTypeParamsToTypeReference(typeDecl.name, typeDecl.typeParameters, p);
    constructor.annotations = null;
    constructor.selector = name.toCharArray();
    constructor.thrownExceptions = null;
    constructor.typeParameters = copyTypeParams(((TypeDeclaration) type.get()).typeParameters, source);
    constructor.bits |= ECLIPSE_DO_NOT_TOUCH_FLAG;
    constructor.bodyStart = constructor.declarationSourceStart = constructor.sourceStart = source.sourceStart;
    constructor.bodyEnd = constructor.declarationSourceEnd = constructor.sourceEnd = source.sourceEnd;
    List<Argument> params = new ArrayList<Argument>();
    List<Expression> assigns = new ArrayList<Expression>();
    AllocationExpression statement = new AllocationExpression();
    statement.sourceStart = pS;
    statement.sourceEnd = pE;
    statement.type = copyType(constructor.returnType, source);
    for (EclipseNode fieldNode : fields) {
        FieldDeclaration field = (FieldDeclaration) fieldNode.get();
        long fieldPos = (((long) field.sourceStart) << 32) | field.sourceEnd;
        SingleNameReference nameRef = new SingleNameReference(field.name, fieldPos);
        assigns.add(nameRef);
        Argument parameter = new Argument(field.name, fieldPos, copyType(field.type, source), Modifier.FINAL);
        parameter.annotations = copyAnnotations(source, findAnnotations(field, NON_NULL_PATTERN), findAnnotations(field, NULLABLE_PATTERN));
        params.add(parameter);
    }
    statement.arguments = assigns.isEmpty() ? null : assigns.toArray(new Expression[assigns.size()]);
    constructor.arguments = params.isEmpty() ? null : params.toArray(new Argument[params.size()]);
    constructor.statements = new Statement[] { new ReturnStatement(statement, (int) (p >> 32), (int) p) };
    constructor.traverse(new SetGeneratedByVisitor(source), typeDecl.scope);
    return constructor;
}
Also used : Argument(org.eclipse.jdt.internal.compiler.ast.Argument) MethodDeclaration(org.eclipse.jdt.internal.compiler.ast.MethodDeclaration) ArrayList(java.util.ArrayList) SingleNameReference(org.eclipse.jdt.internal.compiler.ast.SingleNameReference) FieldDeclaration(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) Expression(org.eclipse.jdt.internal.compiler.ast.Expression) AllocationExpression(org.eclipse.jdt.internal.compiler.ast.AllocationExpression) AllocationExpression(org.eclipse.jdt.internal.compiler.ast.AllocationExpression) ReturnStatement(org.eclipse.jdt.internal.compiler.ast.ReturnStatement) EclipseNode(lombok.eclipse.EclipseNode) TypeDeclaration(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration)

Aggregations

SingleNameReference (org.eclipse.jdt.internal.compiler.ast.SingleNameReference)32 Statement (org.eclipse.jdt.internal.compiler.ast.Statement)21 MessageSend (org.eclipse.jdt.internal.compiler.ast.MessageSend)20 ArrayList (java.util.ArrayList)18 ReturnStatement (org.eclipse.jdt.internal.compiler.ast.ReturnStatement)18 ThisReference (org.eclipse.jdt.internal.compiler.ast.ThisReference)18 Expression (org.eclipse.jdt.internal.compiler.ast.Expression)17 MethodDeclaration (org.eclipse.jdt.internal.compiler.ast.MethodDeclaration)17 QualifiedTypeReference (org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference)16 Argument (org.eclipse.jdt.internal.compiler.ast.Argument)15 AllocationExpression (org.eclipse.jdt.internal.compiler.ast.AllocationExpression)14 IfStatement (org.eclipse.jdt.internal.compiler.ast.IfStatement)14 TypeReference (org.eclipse.jdt.internal.compiler.ast.TypeReference)14 FieldReference (org.eclipse.jdt.internal.compiler.ast.FieldReference)13 EqualExpression (org.eclipse.jdt.internal.compiler.ast.EqualExpression)11 Annotation (org.eclipse.jdt.internal.compiler.ast.Annotation)10 QualifiedNameReference (org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference)10 Assignment (org.eclipse.jdt.internal.compiler.ast.Assignment)9 LocalDeclaration (org.eclipse.jdt.internal.compiler.ast.LocalDeclaration)9 SingleTypeReference (org.eclipse.jdt.internal.compiler.ast.SingleTypeReference)9