Examples of PrototypeGenerator


Examples of com.bubblegumproject.proton.api.PrototypeGenerator

    private ApplicationContext applicationContext;
   
    @Override
    public Object invoke(MethodInvocation arg0) throws Throwable {       
        PrototypeGenerator generator = arg0.getMethod().getAnnotation(PrototypeGenerator.class);
        if (generator != null) {
            if (generator.name() !=  null && !generator.name().isEmpty()) {
                return applicationContext.getBean(generator.name(), arg0.getArguments());
            } else {
                Class<?> retType = arg0.getMethod().getReturnType();
                String[] beanNames = applicationContext.getBeanNamesForType(retType);
                if (beanNames.length == 0) {
                    throw new IllegalStateException(this + " found no beans of type " + retType);
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.