@Override public String toString() { return super.toString() + " type name: " + typeName + " constant name: " + constantName; }
elements = new ArrayList<AnnotationElement>(); for (AnnotationElem ae : at.getElems()) { if (ae.getName() == null || ae.getName().isEmpty()) { throw new RuntimeException("Null or empty annotation name encountered"); if (!alreadyWritten.add(ae.getName())) { throw new RuntimeException("Duplicate annotation attribute: " + ae.getName()); ImmutableAnnotationElement element = new ImmutableAnnotationElement(ae.getName(), value); elements.add(element);
private String getElemAttr(AnnotationElem elem) { StringBuffer result = new StringBuffer(".elem "); switch (elem.getKind()) { case 'Z': { result.append(".bool_kind "); result.append("\"" + elem.getName() + "\" "); if (elem instanceof AnnotationIntElem) { result.append(((AnnotationIntElem) elem).getValue()); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationLongElem) elem).getValue()); result.append("\n"); result.append("\"" + elem.getName() + "\" ");
defaults.put(aelem.getName(), aelem); e.setName("default"); AnnotationDefaultTag d = new AnnotationDefaultTag(e); sm.addTag(d); AnnotationElem element = leftOverEntry.getValue(); if (found != null) { element.setName("default"); AnnotationDefaultTag d = new AnnotationDefaultTag(element); found.addTag(d);
elem.apply(sw);
AnnotationDefaultTag tag = (AnnotationDefaultTag) method.getTag("AnnotationDefaultTag"); if (tag != null) { tag.getDefaultVal().setName(method.getName()); defaults.add(tag.getDefaultVal());
switch (elem.getKind()) { case 'Z': { if (elem instanceof AnnotationIntElem) { elements = new ArrayList<AnnotationElement>(); for (AnnotationElem ae : e.getValue().getElems()) { if (!alreadyWritten.add(ae.getName())) { throw new RuntimeException("Duplicate annotation attribute: " + ae.getName()); AnnotationElement element = new ImmutableAnnotationElement(ae.getName(), buildEncodedValueForAnnotation(ae)); elements.add(element); throw new RuntimeException("Unknown Elem Attr Kind: " + elem.getKind());
@Override public void caseAnnotationArrayElem(AnnotationArrayElem v) { /* * for arrays, apply a new AnnotationElemSwitch to every array element and collect the results. Note that the component * type of the result is unknown here, s.t. object has to be used. */ Object[] result = new Object[v.getNumValues()]; int i = 0; for (AnnotationElem elem : v.getValues()) { AnnotationElemSwitch sw = new AnnotationElemSwitch(); elem.apply(sw); result[i] = ((AnnotationElemResult<?>) sw.getResult()).getValue(); i++; } setResult(new AnnotationElemResult<Object[]>(v.getName(), result)); }
public String toString() { return super.toString() + " value: " + value; }
elements = new ArrayList<AnnotationElement>(); for (AnnotationElem ae : at.getElems()) { if (ae.getName() == null || ae.getName().isEmpty()) { throw new RuntimeException("Null or empty annotation name encountered"); if (!alreadyWritten.add(ae.getName())) { throw new RuntimeException("Duplicate annotation attribute: " + ae.getName()); ImmutableAnnotationElement element = new ImmutableAnnotationElement(ae.getName(), value); elements.add(element);
public String toString() { return super.toString() + " decription: " + desc; }
public String toString() { return super.toString() + " value: " + value; }
av.visit(elem.getName(), val); } else { av.visit(null, val);
public String toString() { return super.toString() + " value: " + value; }
public String toString() { return super.toString() + " value: " + value; }
public String toString() { return super.toString() + " value: " + value; }
public String toString() { return super.toString() + " value: " + value; }
public String toString() { return super.toString() + " values: " + values.toString(); }