public AnnotationElem getAnnotationElement(String name, Object value) { AnnotationElem elem; if (value instanceof Byte) { elem = new AnnotationIntElem((Byte) value, 'B', name); } else if (value instanceof Boolean) { elem = new AnnotationIntElem(((Boolean) value) ? 1 : 0, 'Z', name); } else if (value instanceof Character) { elem = new AnnotationIntElem((Character) value, 'C', name); } else if (value instanceof Short) { elem = new AnnotationIntElem((Short) value, 'S', name); } else if (value instanceof Integer) { elem = new AnnotationIntElem((Integer) value, 'I', name); } else if (value instanceof Long) { elem = new AnnotationLongElem((Long) value, 'J', name);
result.append("\"" + elem.getName() + "\" "); if (elem instanceof AnnotationIntElem) { result.append(((AnnotationIntElem) elem).getValue()); } else { if (((AnnotationBooleanElem) elem).getValue()) { result.append(".short_kind "); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); break; result.append(".byte_kind "); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); break; result.append(".char_kind "); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); break; result.append(".int_kind "); result.append("\"" + elem.getName() + "\" "); result.append(((AnnotationIntElem) elem).getValue()); result.append("\n"); break;
if (elem instanceof AnnotationIntElem) { AnnotationIntElem e = (AnnotationIntElem) elem; if (e.getValue() == 0) { return ImmutableBooleanEncodedValue.FALSE_VALUE; } else if (e.getValue() == 1) { return ImmutableBooleanEncodedValue.TRUE_VALUE; } else { return new ImmutableShortEncodedValue((short) e.getValue()); return new ImmutableByteEncodedValue((byte) e.getValue()); return new ImmutableCharEncodedValue((char) e.getValue()); return new ImmutableIntEncodedValue(e.getValue());
cp_info cval = coffiClass.constant_pool[cev.constant_value_index]; int constant_val = (int) ((CONSTANT_Integer_info) cval).bytes; AnnotationIntElem elem = new AnnotationIntElem(constant_val, kind, elemName); list.add(elem); } else if (kind == 'D') {
accessFlags = ((AnnotationIntElem) ele).getValue(); } else if (ele instanceof AnnotationStringElem && ele.getName().equals("name")) { name = ((AnnotationStringElem) ele).getValue();
list.add(new soot.tagkit.AnnotationStringElem(getExpr().constant().stringValue(), kind, name)); else if(type.isIntegralType()) list.add(new soot.tagkit.AnnotationIntElem(getExpr().constant().intValue(), kind, name)); else if(type().isBoolean()) list.add(new soot.tagkit.AnnotationBooleanElem(getExpr().constant().booleanValue(), kind, name));
elem = new AnnotationIntElem(v.getValue(), 'B', ae.getName()); break; elem = new AnnotationIntElem(v.getValue(), 'S', ae.getName()); break; elem = new AnnotationIntElem(v.getValue(), 'C', ae.getName()); break; elem = new AnnotationIntElem(v.getValue(), 'I', ae.getName()); break;
cp_info cval = coffiClass.constant_pool[cev.constant_value_index]; int constant_val = (int)((CONSTANT_Integer_info)cval).bytes; AnnotationIntElem elem = new AnnotationIntElem(constant_val, kind, elemName); list.add(elem);
cp_info cval = coffiClass.constant_pool[cev.constant_value_index]; int constant_val = (int)((CONSTANT_Integer_info)cval).bytes; AnnotationIntElem elem = new AnnotationIntElem(constant_val, kind, elemName); list.add(elem);