Package net.sf.cglib.proxy

Examples of net.sf.cglib.proxy.InterfaceMaker


        return "toString".equals(method.getName()) && method.getParameterTypes().length == 0;
    }

    public Class<?> getMixinInterface() {
        if (mixinInterface == null) {
            InterfaceMaker im = new InterfaceMaker();

            for (Map.Entry<Signature, Method> entry : methods.entrySet()) {
                Signature sig = entry.getKey();
                Method method = entry.getValue();

                Type[] exceptionTypes = new Type[method.getExceptionTypes().length];

                for (int i = 0; i < exceptionTypes.length; i++) {
                    exceptionTypes[i] = Type.getType(method.getExceptionTypes()[i]);
                }

                im.add(sig, exceptionTypes);
            }

            im.setClassLoader(getClassLoader());
            im.setNamingPolicy(new DefaultNamingPolicy() {
                @Override
                public String getClassName(String prefix, String source, Object key, Predicate names) {
                    return super.getClassName(EMPTY_STRING, getSimpleClassName(StaticFunctionDelegatorBuilder.class),
                            key, names);
                }
            });

            mixinInterface = im.create();
        }

        return mixinInterface;
    }
View Full Code Here

TOP

Related Classes of net.sf.cglib.proxy.InterfaceMaker

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.