Search in sources :

Example 26 with Annotation

use of org.eclipse.jdt.core.dom.Annotation in project Main by SpartanRefactoring.

the class ZZZ___Fixture_ModelClass method a31.

@Test
@method
public void a31() {
    for (final Annotation a : annotations()) {
        final SingleMemberAnnotation ¢ = az.singleMemberAnnotation(a);
        if (¢ == null)
            continue;
        final List<SimpleName> ns = annotees.of(¢);
        assert ns != null;
        final SimpleName n = the.firstOf(ns);
        assert n != null;
        if (!"enumConstant1".equals(n + ""))
            continue;
        final List<? extends ASTNode> s = scope.of(n);
        assert s != null : //
        fault.dump() + "\n\t scope = " + //
        s + "\n\t ¢ = " + //
        ¢ + "\n\t n = " + //
        n + "\n\t ns = " + //
        ns + fault.done();
    }
}
Also used : Annotation(org.eclipse.jdt.core.dom.Annotation)

Example 27 with Annotation

use of org.eclipse.jdt.core.dom.Annotation in project Main by SpartanRefactoring.

the class ZZZ___Fixture_ModelClass method a35.

@Test
@method
public void a35() {
    for (final Annotation a : annotations()) {
        final SingleMemberAnnotation x = az.singleMemberAnnotation(a);
        if (x != null && (x.getTypeName() + "").equals(ScopeSize.class.getSimpleName() + "")) {
            final SimpleName n = the.firstOf(annotees.of(x));
            if (!DummyAnnotation.class.getSimpleName().equals(n + ""))
                continue;
            azzert.that(x + ": " + n + "/" + definition.kind(n), scope.of(n).size(), is(value(x)));
        }
    }
}
Also used : Annotation(org.eclipse.jdt.core.dom.Annotation)

Example 28 with Annotation

use of org.eclipse.jdt.core.dom.Annotation in project Main by SpartanRefactoring.

the class ZZZ___Fixture_ModelClass method a30.

@Test
@method
public void a30() {
    for (final Annotation a : annotations()) {
        final SingleMemberAnnotation ¢ = az.singleMemberAnnotation(a);
        if (¢ == null)
            continue;
        final List<SimpleName> ns = annotees.of(¢);
        assert ns != null;
        final SimpleName n = the.firstOf(ns);
        assert n != null;
        if (!"raisin".equals(n + ""))
            continue;
        final List<? extends ASTNode> s = scope.of(n);
        assert s != null : //
        fault.dump() + "\n\t scope = " + //
        s + "\n\t ¢ = " + //
        ¢ + "\n\t n = " + //
        n + "\n\t ns = " + //
        ns + fault.done();
    }
}
Also used : Annotation(org.eclipse.jdt.core.dom.Annotation)

Example 29 with Annotation

use of org.eclipse.jdt.core.dom.Annotation in project Main by SpartanRefactoring.

the class ZZZ___Fixture_ModelClass method a28.

@Test
@method
public void a28() {
    for (final Annotation a : annotations()) {
        final SingleMemberAnnotation ¢ = az.singleMemberAnnotation(a);
        if (¢ == null)
            continue;
        final List<SimpleName> ns = annotees.of(¢);
        assert ns != null;
        final SimpleName n = the.firstOf(ns);
        assert n != null;
        final List<? extends ASTNode> s = scope.of(n);
        assert s != null : //
        fault.dump() + "\n\t scope = " + //
        s + "\n\t ¢ = " + //
        ¢ + "\n\t n = " + //
        n + "\n\t ns = " + //
        ns + fault.done();
    }
}
Also used : Annotation(org.eclipse.jdt.core.dom.Annotation)

Example 30 with Annotation

use of org.eclipse.jdt.core.dom.Annotation in project Main by SpartanRefactoring.

the class ZZZ___Fixture_ModelClass method a37.

@Test
@method
public void a37() {
    for (final Annotation a : annotations()) {
        final SingleMemberAnnotation x = az.singleMemberAnnotation(a);
        if (x != null && (x.getTypeName() + "").equals(ScopeSize.class.getSimpleName() + "")) {
            final SimpleName n = the.firstOf(annotees.of(x));
            if (!DummyInterface.class.getSimpleName().equals(n + ""))
                continue;
            azzert.that(x + ": " + n + "/" + definition.kind(n), scope.of(n).size(), is(value(x)));
        }
    }
}
Also used : Annotation(org.eclipse.jdt.core.dom.Annotation)

Aggregations

Annotation (org.eclipse.jdt.core.dom.Annotation)30 ASTNode (org.eclipse.jdt.core.dom.ASTNode)9 IExtendedModifier (org.eclipse.jdt.core.dom.IExtendedModifier)7 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)7 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)5 ICompilationUnit (org.eclipse.jdt.core.ICompilationUnit)4 ArrayType (org.eclipse.jdt.core.dom.ArrayType)4 Name (org.eclipse.jdt.core.dom.Name)4 ArrayList (java.util.ArrayList)3 CompilationUnit (org.eclipse.jdt.core.dom.CompilationUnit)3 ParameterizedType (org.eclipse.jdt.core.dom.ParameterizedType)3 PrimitiveType (org.eclipse.jdt.core.dom.PrimitiveType)3 Type (org.eclipse.jdt.core.dom.Type)3 HashSet (java.util.HashSet)2 List (java.util.List)2 AST (org.eclipse.jdt.core.dom.AST)2 AbstractTypeDeclaration (org.eclipse.jdt.core.dom.AbstractTypeDeclaration)2 BodyDeclaration (org.eclipse.jdt.core.dom.BodyDeclaration)2 CastExpression (org.eclipse.jdt.core.dom.CastExpression)2 ConditionalExpression (org.eclipse.jdt.core.dom.ConditionalExpression)2