Examples of createClass()


Examples of net.sf.cglib.proxy.Enhancer.createClass()

                }
            }
            enhancer.setClassLoader(classLoader);
            enhancer.setCallbackType(MethodInterceptor.class);
            enhancer.setUseFactory(false);
            proxyType = enhancer.createClass();
            fastClass = FastClass.create(proxyType);
        }

        public Object createProxy(AbstractName target) {
            assert target != null: "target is null";
View Full Code Here

Examples of net.sf.cglib.proxy.Enhancer.createClass()

        enhancer.setCallbackFilter(new NoOverrideCallbackFilter(GenericServiceEndpointWrapper.class));
        enhancer.setCallbackTypes(new Class[]{NoOp.class, MethodInterceptor.class});
        enhancer.setUseFactory(false);
        enhancer.setUseCache(false);

        return enhancer.createClass();
    }
    public Remote createServiceEndpoint() throws ServiceException {
        //TODO figure out why this can't be called in readResolve!
//        synchronized (this) {
//            if (!initialized) {
View Full Code Here

Examples of net.sf.cglib.proxy.Enhancer.createClass()

        enhancer.setInterfaces(new Class[]{serviceInterface});
        enhancer.setCallbackFilter(new NoOverrideCallbackFilter(Service.class));
        enhancer.setCallbackTypes(new Class[]{NoOp.class, MethodInterceptor.class});
        enhancer.setUseFactory(false);
        enhancer.setUseCache(false);
        Class serviceClass = enhancer.createClass();

        Enhancer.registerCallbacks(serviceClass, methodInterceptors);
        FastConstructor constructor = FastClass.create(serviceClass).getConstructor(SERVICE_CONSTRUCTOR_TYPES);
        try {
            return constructor.newInstance(new Object[]{seiPortNameToFactoryMap, seiClassNameToFactoryMap});
View Full Code Here

Examples of net.sf.rej.java.ClassFactory.createClass()

      IReferenceType rt = sf.location().declaringType();
      String superClass = null;
      if (!"java.lang.Object".equals(rt.name())) {
        superClass = rt.getSuperClassName();
      }
      ClassFile cf = factory.createClass(rt.name(), superClass);
      ConstantPool cp = cf.getPool();
      FieldFactory fieldFactory = new FieldFactory();
      for (IField field : rt.visibleFields()) {
        AccessFlags flags = new AccessFlags(field.modifiers());
        Field fieldToAdd = fieldFactory.createField(cf, flags, cp.optionalAddUtf8(field.name()), cp.optionalAddUtf8(field.signature()));
View Full Code Here

Examples of org.apache.hivemind.service.ClassFab.createClass()

        classFab.addMethod(Modifier.PRIVATE, new MethodSignature(serviceInterface, "_getInner",
                null, null), builder.toString());

        proxyBuilder.addServiceMethods("_getInner()");

        return classFab.createClass();
    }

    private Class createInnerProxyClass(Class deferredProxyClass)
    {
        ServicePoint servicePoint = getServicePoint();
View Full Code Here

Examples of org.apache.hivemind.service.ClassFab.createClass()

        classFab.addMethod(Modifier.PUBLIC | Modifier.FINAL, new MethodSignature(void.class,
                "_instantiateServiceImplementation", null, null), body.toString());

        classFab.addInterface(SingletonInnerProxy.class);

        return classFab.createClass();
    }

    public void instantiateService()
    {
        // Ensure that the outer and inner proxies have been created
View Full Code Here

Examples of org.apache.hivemind.service.ClassFab.createClass()

        cf.addConstructor(new Class[]
        { serviceType }, null, "{ super(); _service = $1; }");

        builder.addServiceMethods("_service");

        return cf.createClass();
    }

    protected ShutdownCoordinator getShutdownCoordinatorService()
    {
        return ( ( ShutdownCoordinator )getServicePoint().getModule().getService( ShutdownCoordinator.class ) );
View Full Code Here

Examples of org.apache.hivemind.service.ClassFab.createClass()

        addServiceMethods(classFab, serviceInterface, serviceId, jndiName);

        addConstructor(classFab);

        Class proxyClass = classFab.createClass();

        return invokeConstructor(proxyClass, proxyParameters.getNameLookup(_nameLookup));
    }

    private void addClearCachedMethod(ClassFab classFab)
View Full Code Here

Examples of org.apache.hivemind.service.ClassFab.createClass()

        if (!toString)
            ClassFabUtils.addToStringMethod(
                cf,
                ImplMessages.defaultImplementationDescription(interfaceType));

        return cf.createClass();
    }

    private void addMethod(ClassFab cf, Method m)
    {
        StringBuffer body = new StringBuffer("{ ");
View Full Code Here

Examples of org.apache.hivemind.service.ClassFab.createClass()

            classFab.addMethod(Modifier.PUBLIC, new MethodSignature(m), builder.toString());

        }

        Class interceptorClass = classFab.createClass();

        Log log = LogFactory.getLog(stack.getServiceExtensionPointId());

        Object interceptor = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.