Package org.ow2.asm

Examples of org.ow2.asm.Type


        }
    }

    @Override
    public void visitTypeInsn(final int opcode, final String type) {
        Type t = Type.getObjectType(type);
        switch (opcode) {
            case Opcodes.NEW:
                anew(t);
                break;
            case Opcodes.ANEWARRAY:
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

            public synchronized void handle(final IEvent event) {
                if (EZBEventBeanInvocationBegin.class.isAssignableFrom(event.getClass())) {
                    EZBEventBeanInvocationBegin e = (EZBEventBeanInvocationBegin) event;
                    MeanCallTimeStatistic.this.pendingCall.put(Long.valueOf(e.getInvocationNumber()), e);
                } else {
                    EZBEventBeanInvocation eventEnd = (EZBEventBeanInvocation) event;
                    EZBEventBeanInvocation eventBegin =
                        MeanCallTimeStatistic.this.pendingCall.remove(Long.valueOf(eventEnd.getInvocationNumber()));

                    MeanCallTimeStatistic.this.count++;
                    MeanCallTimeStatistic.this.total += eventEnd.getTime() - eventBegin.getTime();
                    setLastSampleTime(System.currentTimeMillis());
                }
            }
View Full Code Here

     * @param methodVisitor the given visitor on which annotation are replayed.
     */
    @Override
    public void replay(final MethodVisitor methodVisitor) {
        // Build a new annotation visitor for the given method
        AnnotationVisitor annotationVisitor = methodVisitor.visitParameterAnnotation(this.index, getName(), getVisible());
        getLogger().debug("AnnotationVisitor annotationVisitor = methodVisitor.visitParameterAnnotation({0}, {1}, {2});",
                Integer.valueOf(this.index), getName(), Boolean.valueOf(getVisible()));

        // Replay
        replayInner(annotationVisitor);

        // End of visit
        annotationVisitor.visitEnd();
        getLogger().debug("annotationVisitor.visitEnd();");
    }
View Full Code Here

        } else {
            throw new EZBContainerException("unknown session type for: " + sessionBean);
        }

        // Build runtime information
        SessionBeanInfo sessionBeanInfo = new SessionBeanInfo();
        sessionBeanInfo.setTransactionManagementType(sessionBean.getTransactionManagementType());
        sessionBeanInfo.setApplicationExceptions(sessionBean.getEjbJarDeployableMetadata().getApplicationExceptions());
        // Only for singleton
        if (sessionBean.isSingleton()) {
            sessionBeanInfo.setStartup(sessionBean.isStartup());
        }

        sessionFactory.setSessionBeanInfo(sessionBeanInfo);

        // Build WS deploy/time info
        if (sessionBean.getWebServiceMarker() != null) {
            // Bean is annotated with @WebService or @WebServiceprovider
            IWebServiceInfo info = createWebServiceInfo(sessionBean, factoryName);
            sessionBeanInfo.setWebServiceInfo(info);
        } // else this bean is not webservices annotated

        // get interfaces of bean
        IJLocal localItfs = sessionBean.getLocalInterfaces();
        IJRemote remoteItfs = sessionBean.getRemoteInterfaces();

        if (localItfs != null) {
            sessionBeanInfo.setLocalInterfaces(localItfs.getInterfaces());
            for (String itf : localItfs.getInterfaces()) {
                this.bindingReferences.add(createLocalItfRef(itf,
                                                             getEmbedded().getID(),
                                                             getId(),
                                                             factoryName,
                                                             sessionBean,
                                                             sessionFactory));
            }
        }
        if (remoteItfs != null) {
            sessionBeanInfo.setRemoteInterfaces(remoteItfs.getInterfaces());
            for (String itf : remoteItfs.getInterfaces()) {
                this.bindingReferences.add(createRemoteItfRef(itf,
                                                              getId(),
                                                              factoryName,
                                                              sessionBean,
View Full Code Here

        mv.visitMaxs(0, 0);
        mv.visitEnd();

        // add method in the class metadata
        JMethod method = new JMethod(ACC_PUBLIC, generatedMethodName, "()V", null, null);
        EasyBeansEjbJarMethodMetadata generatedMetadata = new EasyBeansEjbJarMethodMetadata(method, classMetaData);

        // Set value
        switch (interceptorType) {
            case POST_CONSTRUCT:
                generatedMetadata.setPostConstruct(true);
                break;
            case PRE_DESTROY:
                generatedMetadata.setPreDestroy(true);
                break;
            case PRE_PASSIVATE:
                generatedMetadata.setPrePassivate(true);
                break;
            case POST_ACTIVATE:
                generatedMetadata.setPostActivate(true);
                break;
            default:
                    throw new RuntimeException("No generated method name found for interceptorType '" + interceptorType + "'");
        }
View Full Code Here

        if (remoteHome == null && localHome == null) {
            return;
        }

        // EJB-JAR
        EjbJarArchiveMetadata ejbJarAnnotationMetadata = bean.getEjbJarDeployableMetadata();
        // List of interfaces found in remote home interfaces.
        List<String> interfacesList = new ArrayList<String>();

        // Get List of Interfaces from remote home
        if (remoteHome != null) {
View Full Code Here

TOP

Related Classes of org.ow2.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.