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();
}
}
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();
}
}
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)));
}
}
}
use of org.eclipse.jdt.core.dom.Annotation in project eclipse-pmd by acanda.
the class SuppressWarningsQuickFix method createReplacementSuppressWarningsAnnotation.
private Annotation createReplacementSuppressWarningsAnnotation(final Annotation existingAnnotation, final AST ast) {
final Annotation replacement;
if (existingAnnotation == null || existingAnnotation.isMarkerAnnotation()) {
final SingleMemberAnnotation annotation = createAnnotation(ast, SingleMemberAnnotation.class);
annotation.setValue(createPMDLiteralValue(ast));
replacement = annotation;
} else if (existingAnnotation.isSingleMemberAnnotation()) {
final SingleMemberAnnotation existingSingleMemberAnnotation = (SingleMemberAnnotation) existingAnnotation;
final SingleMemberAnnotation annotation = createAnnotation(ast, SingleMemberAnnotation.class);
annotation.setValue(createArrayInitializer(existingSingleMemberAnnotation.getValue()));
replacement = annotation;
} else if (existingAnnotation.isNormalAnnotation()) {
final NormalAnnotation existingNormalAnnotation = (NormalAnnotation) existingAnnotation;
final NormalAnnotation annotation = createAnnotation(ast, NormalAnnotation.class);
createAnnotationValues(existingNormalAnnotation, annotation);
replacement = annotation;
} else {
replacement = existingAnnotation;
}
return replacement;
}
Aggregations