public AnnotationEntryGen createFruitAnnotationEntry(final ConstantPoolGen cp,
final String aFruit, final boolean visibility)
{
final SimpleElementValueGen evg = new SimpleElementValueGen(
ElementValueGen.STRING, cp, aFruit);
final ElementValuePairGen nvGen = new ElementValuePairGen("fruit", evg, cp);
final ObjectType t = new ObjectType("SimpleStringAnnotation");
final List<ElementValuePairGen> elements = new ArrayList<>();
elements.add(nvGen);
return new AnnotationEntryGen(t, elements, visibility, cp);
}
|