Search in sources :

Example 51 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.headOf(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 52 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.headOf(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 53 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.headOf(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 54 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.headOf(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)

Example 55 with Annotation

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

the class ZZZ___Fixture_ModelClass method a34.

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

Aggregations

Annotation (org.eclipse.jdt.core.dom.Annotation)56 ASTNode (org.eclipse.jdt.core.dom.ASTNode)20 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)19 IExtendedModifier (org.eclipse.jdt.core.dom.IExtendedModifier)14 SingleMemberAnnotation (org.eclipse.jdt.core.dom.SingleMemberAnnotation)14 NormalAnnotation (org.eclipse.jdt.core.dom.NormalAnnotation)13 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)11 ArrayList (java.util.ArrayList)10 CompilationUnit (org.eclipse.jdt.core.dom.CompilationUnit)10 ICompilationUnit (org.eclipse.jdt.core.ICompilationUnit)8 List (java.util.List)7 AST (org.eclipse.jdt.core.dom.AST)7 TypeDeclaration (org.eclipse.jdt.core.dom.TypeDeclaration)6 ArrayType (org.eclipse.jdt.core.dom.ArrayType)5 IAnnotationBinding (org.eclipse.jdt.core.dom.IAnnotationBinding)5 IMethodBinding (org.eclipse.jdt.core.dom.IMethodBinding)5 MemberValuePair (org.eclipse.jdt.core.dom.MemberValuePair)5 Name (org.eclipse.jdt.core.dom.Name)5 Type (org.eclipse.jdt.core.dom.Type)5 BodyDeclaration (org.eclipse.jdt.core.dom.BodyDeclaration)4