Package org.eclipse.persistence.internal.libraries.asm

Examples of org.eclipse.persistence.internal.libraries.asm.Handle


            buf.append("Type.getType(\"");
            buf.append(((Type) cst).getDescriptor());
            buf.append("\")");
        } else if (cst instanceof Handle) {
            buf.append("new Handle(");
            Handle h = (Handle) cst;
            buf.append("Opcodes.").append(HANDLE_TAG[h.getTag()])
                    .append(", \"");
            buf.append(h.getOwner()).append("\", \"");
            buf.append(h.getName()).append("\", \"");
            buf.append(h.getDesc()).append("\")");
        } else if (cst instanceof Byte) {
            buf.append("new Byte((byte)").append(cst).append(')');
        } else if (cst instanceof Boolean) {
            buf.append(((Boolean) cst).booleanValue() ? "Boolean.TRUE"
                    : "Boolean.FALSE");
View Full Code Here


                int tag = Integer.parseInt(val.substring(tagIndex + 1,
                        val.length() - 1));
                String owner = val.substring(0, dotIndex);
                String name = val.substring(dotIndex + 1, descIndex);
                String desc = val.substring(descIndex, tagIndex - 1);
                return new Handle(tag, owner, name, desc);

            } catch (RuntimeException e) {
                throw new SAXException("Malformed handle " + val, e);
            }
        }
View Full Code Here

    public Object mapValue(Object value) {
        if (value instanceof Type) {
            return mapType((Type) value);
        }
        if (value instanceof Handle) {
            Handle h = (Handle) value;
            return new Handle(h.getTag(), mapType(h.getOwner()), mapMethodName(
                    h.getOwner(), h.getName(), h.getDesc()),
                    mapMethodDesc(h.getDesc()));
        }
        return value;
    }
View Full Code Here

        }

        @Override
        public final void end(final String element) {
            ArrayList<?> bsmArgs = (ArrayList<?>) pop();
            Handle bsm = (Handle) pop();
            String desc = (String) pop();
            String name = (String) pop();
            getCodeVisitor().visitInvokeDynamicInsn(name, desc, bsm,
                    bsmArgs.toArray());
        }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.libraries.asm.Handle

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.