Package jdk.internal.org.objectweb.asm

Examples of jdk.internal.org.objectweb.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);
        StringBuffer s = new StringBuffer("(");
        for (int i = 0; i < args.length; i++) {
            s.append(mapDesc(args[i].getDescriptor()));
        }
        Type returnType = Type.getReturnType(desc);
        if (returnType == Type.VOID_TYPE) {
            s.append(")V");
            return s.toString();
        }
        s.append(')').append(mapDesc(returnType.getDescriptor()));
        return s.toString();
    }
View Full Code Here

* @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);
        StringBuffer s = new StringBuffer("(");
        for (int i = 0; i < args.length; i++) {
            s.append(mapDesc(args[i].getDescriptor()));
        }
        Type returnType = Type.getReturnType(desc);
        if (returnType == Type.VOID_TYPE) {
            s.append(")V");
            return s.toString();
        }
        s.append(')').append(mapDesc(returnType.getDescriptor()));
        return s.toString();
    }
View Full Code Here

                    constructor = false;
                }
                break;
            }

            Type returnType = Type.getReturnType(desc);
            if (returnType != Type.VOID_TYPE) {
                pushValue(OTHER);
                if (returnType.getSize() == 2) {
                    pushValue(OTHER);
                }
            }
        }
    }
View Full Code Here

                if (types[i].getSize() == 2) {
                    popValue();
                }
            }

            Type returnType = Type.getReturnType(desc);
            if (returnType != Type.VOID_TYPE) {
                pushValue(OTHER);
                if (returnType.getSize() == 2) {
                    pushValue(OTHER);
                }
            }
        }
    }
View Full Code Here

                    constructor = false;
                }
                break;
            }

            Type returnType = Type.getReturnType(desc);
            if (returnType != Type.VOID_TYPE) {
                pushValue(OTHER);
                if (returnType.getSize() == 2) {
                    pushValue(OTHER);
                }
            }
        }
    }
View Full Code Here

                if (types[i].getSize() == 2) {
                    popValue();
                }
            }

            Type returnType = Type.getReturnType(desc);
            if (returnType != Type.VOID_TYPE) {
                pushValue(OTHER);
                if (returnType.getSize() == 2) {
                    pushValue(OTHER);
                }
            }
        }
    }
View Full Code Here

            double val = ((Double) cst).doubleValue();
            return newDouble(val);
        } else if (cst instanceof String) {
            return newString((String) cst);
        } else if (cst instanceof Type) {
            Type t = (Type) cst;
            int s = t.getSort();
            if (s == Type.OBJECT) {
                return newClass(t.getInternalName());
            } else if (s == Type.METHOD) {
                return newMethodType(t.getDescriptor());
            } else { // s == primitive type or array
                return newClass(t.getDescriptor());
            }
        } else if (cst instanceof Handle) {
            Handle h = (Handle) cst;
            return newHandle(h.getTag(), h.getOwner(), h.getName(), h.getDesc());
        } else {
View Full Code Here

            double val = ((Double) cst).doubleValue();
            return newDouble(val);
        } else if (cst instanceof String) {
            return newString((String) cst);
        } else if (cst instanceof Type) {
            Type t = (Type) cst;
            int s = t.getSort();
            if (s == Type.OBJECT) {
                return newClass(t.getInternalName());
            } else if (s == Type.METHOD) {
                return newMethodType(t.getDescriptor());
            } else { // s == primitive type or array
                return newClass(t.getDescriptor());
            }
        } else if (cst instanceof Handle) {
            Handle h = (Handle) cst;
            return newHandle(h.getTag(), h.getOwner(), h.getName(), h.getDesc());
        } else {
View Full Code Here

TOP

Related Classes of jdk.internal.org.objectweb.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.