private IllegalArgumentException invalidConversion (TypeDesc from, TypeDesc to) { throw new IllegalArgumentException ("Invalid conversion: " + from.getFullName() + " to " + to.getFullName()); }
@Override public String toString() { return getType().getFullName(); } }
ArrayType(String desc, TypeDesc component) { super(desc, component.getRootName()); mComponent = component; mFullName = component.getFullName().concat("[]"); }
private void disassemble(TypeDesc type) { print(type.getFullName()); }
public String toString() { return "CONSTANT_Class_info: ".concat(getType().getFullName()); } }
public String toString() { String modStr = mModifiers.toString(); String typeStr; if (modStr.length() == 0) { return mType.getFullName() + ' ' + getName(); } else { return modStr + ' ' + mType.getFullName() + ' ' + getName(); } }
/** * Returns this in Java method signature syntax. * * @param name method name * @param varargs request that the last argument, if it is an array, to * be formatted in varargs syntax. */ public String toMethodSignature(String name, boolean varargs) { StringBuffer buf = new StringBuffer(); buf.append(mRetType.getFullName()); buf.append(' '); buf.append(name); buf.append('('); TypeDesc[] params = mParams; for (int i=0; i<params.length; i++) { if (i > 0) { buf.append(", "); } TypeDesc param = params[i]; if (varargs && param.isArray() && i == (params.length - 1)) { buf.append(param.getComponentType().getFullName()); buf.append("..."); } else { buf.append(param.getFullName()); } } return buf.append(')').toString(); }
public String toString() { StringBuffer buf = new StringBuffer("CONSTANT_Methodref_info: "); buf.append(getParentClass().getType().getFullName()); ConstantNameAndTypeInfo cnati = getNameAndType(); buf.append(' '); buf.append(cnati.getName()); buf.append(' '); buf.append(cnati.getType()); return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer("CONSTANT_Fieldref_info: "); buf.append(getParentClass().getType().getFullName()); ConstantNameAndTypeInfo cnati = getNameAndType(); buf.append(' '); buf.append(cnati.getName()); buf.append(' '); buf.append(cnati.getType()); return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer("CONSTANT_InterfaceMethodref_info: "); buf.append(getParentClass().getType().getFullName()); ConstantNameAndTypeInfo cnati = getNameAndType(); buf.append(' '); buf.append(cnati.getName()); buf.append(' '); buf.append(cnati.getType()); return buf.toString(); } }
private void disassemble(String indent, Annotation ann) { print("@"); print(ann.getType().getFullName()); Map mvMap = ann.getMemberValues(); if (mvMap.size() == 0) { return; } print("("); Iterator it = mvMap.entrySet().iterator(); int ordinal = 0; while (it.hasNext()) { if (ordinal++ > 0) { print(", "); } Map.Entry entry = (Map.Entry)it.next(); String name = (String)entry.getKey(); if (!"value".equals(name)) { print(name); print("="); } disassemble(indent, (Annotation.MemberValue)entry.getValue()); } print(")"); }
private void print(TypeDesc type) { if (type == null || type == TypeDesc.VOID) { print("null"); return; } if (type.isPrimitive()) { print("TypeDesc.".concat(type.getFullName().toUpperCase())); return; } else if (type == TypeDesc.OBJECT) { print("TypeDesc.OBJECT"); return; } else if (type == TypeDesc.STRING) { print("TypeDesc.STRING"); return; } TypeDesc componentType = type.getComponentType(); if (componentType != null) { print(componentType); print(".toArrayType()"); } else { print("TypeDesc.forClass(\""); print(escape(type.getRootName())); print("\")"); } }
private IllegalArgumentException invalidConversion (TypeDesc from, TypeDesc to) { throw new IllegalArgumentException ("Invalid conversion: " + from.getFullName() + " to " + to.getFullName()); }
private void locateLabel() { int labelKey = mAddress; Object labelValue = mLabels.get(labelKey); if (labelValue != null) { if (labelValue instanceof Label) { ((Label)labelValue).setLocation(); } else { labelValue = mAssembler.createLabel().setLocation(); mLabels.put(labelKey, labelValue); } } List<ExceptionHandler> handlers = mCatchLocations.get(labelKey); if (handlers != null) { for (int i=0; i<handlers.size(); i++) { ExceptionHandler handler = handlers.get(i); Label start = getLabel(handler.getStartLocation().getLocation()); Label end = getLabel(handler.getEndLocation().getLocation()); String catchClassName; if (handler.getCatchType() == null) { catchClassName = null; } else { catchClassName = handler.getCatchType().getType().getFullName(); } mAssembler.exceptionHandler(start, end, catchClassName); } } }
public String toString() { String modStr = mModifiers.toString(); String typeStr; if (modStr.length() == 0) { return mType.getFullName() + ' ' + getName(); } else { return modStr + ' ' + mType.getFullName() + ' ' + getName(); } }
public void appendTo(Appendable app) throws IOException { app.append("StorableProperty {name="); app.append(getName()); app.append(", type="); app.append(TypeDesc.forClass(getType()).getFullName()); app.append(", enclosing="); app.append(getEnclosingType().getName()); app.append('}'); }
print(TypeDesc.forDescriptor(ecv.getTypeName().getValue()).getFullName()); print("."); print(ecv.getConstName().getValue());
print(field.getParentClass().getType().getFullName()); print("."); print(field.getNameAndType().getName()); (ConstantInterfaceMethodInfo)constant; className = method.getParentClass().getType().getFullName(); nameAndType = method.getNameAndType(); } else if (opcode == Opcode.INVOKEDYNAMIC) { method.getParentClass().getType().getFullName(); nameAndType = method.getNameAndType();
print(indent + " ", " "); print(exceptions[i].getFullName());
String className = field.getParentClass().getType().getFullName(); if (mEnclosingClassName.equals(className)) { className = null; className = method.getParentClass().getType().getFullName(); nameAndType = method.getNameAndType(); } else if (opcode == Opcode.INVOKEDYNAMIC) { className = method.getParentClass().getType().getFullName(); nameAndType = method.getNameAndType(); System.out.println(nameAndType); className = method.getParentClass().getType().getFullName(); if (mEnclosingClassName.equals(className)) { className = null;