Package org.rsbot.loader.asm

Examples of org.rsbot.loader.asm.Type


* @author Eugene Kuleshov
*/
public abstract class Remapper {

  public String mapDesc(String desc) {
    Type t = Type.getType(desc);
    switch (t.getSort()) {
      case Type.ARRAY:
        String s = mapDesc(t.getElementType().getDescriptor());
        for (int i = 0; i < t.getDimensions(); ++i) {
          s = '[' + s;
        }
        return s;
      case Type.OBJECT:
        String newType = map(t.getInternalName());
        if (newType != null) {
          return 'L' + newType + ';';
        }
    }
    return desc;
View Full Code Here


    Type[] args = Type.getArgumentTypes(desc);
    String s = "(";
    for (int i = 0; i < args.length; i++) {
      s += mapDesc(args[i].getDescriptor());
    }
    Type returnType = Type.getReturnType(desc);
    if (returnType == Type.VOID_TYPE) {
      return s + ")V";
    }
    return s + ')' + mapDesc(returnType.getDescriptor());
  }
View Full Code Here

TOP

Related Classes of org.rsbot.loader.asm.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.