Package org.jboss.as.pojo.service

Examples of org.jboss.as.pojo.service.BeanInfo


        }
    }

    @SuppressWarnings({"unchecked"})
    protected BeanInfo getBeanInfo(Object bean) {
        BeanInfo bi = beanInfo.getOptionalValue();
        if (bi == null) {
            bi = getTempBeanInfo(bean.getClass());
        }
        return bi;
    }
View Full Code Here


        ValueConfig vc = (ValueConfig) previous;
        if (factoryClass != null) {
            if (factoryMethod == null)
                throw PojoMessages.MESSAGES.nullFactoryMethod();

            BeanInfo beanInfo = getTempBeanInfo(visitor, factoryClass);
            Method m = beanInfo.findMethod(factoryMethod, Configurator.getTypes(parameters));
            return m.getParameterTypes()[vc.getIndex()];
        } else {
            BeanInfo beanInfo = visitor.getBeanInfo();
            if (beanInfo == null)
                throw PojoMessages.MESSAGES.nullBeanInfo();
            Constructor ctor = beanInfo.findConstructor(Configurator.getTypes(parameters));
            return ctor.getParameterTypes()[vc.getIndex()];
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public Object create() throws Throwable {
        Module module = bmd.getModule().getInjectedModule().getValue();
        Class<?> beanClass = module.getClassLoader().loadClass(bmd.getBeanClass());
        DeploymentReflectionIndex index = DeploymentReflectionIndex.create();
        BeanInfo beanInfo = new DefaultBeanInfo(index, beanClass);
        Object result = BeanUtils.instantiateBean(bmd, beanInfo, index, module);
        BeanUtils.configure(bmd, beanInfo, module, result, false);
        BeanUtils.dispatchLifecycleJoinpoint(beanInfo, result, bmd.getCreate(), "create");
        BeanUtils.dispatchLifecycleJoinpoint(beanInfo, result, bmd.getStart(), "start");
        return result;
View Full Code Here

    public Class<?> getType(ConfigVisitor visitor, ConfigVisitorNode previous) {
        if (previous instanceof ValueConfig == false)
            throw PojoMessages.MESSAGES.notValueConfig(previous);

        ValueConfig vc = (ValueConfig) previous;
        BeanInfo beanInfo = visitor.getBeanInfo();
        Method m = beanInfo.findMethod(methodName, Configurator.getTypes(parameters));
        return m.getParameterTypes()[vc.getIndex()];
    }
View Full Code Here

        }
    }

    @SuppressWarnings({"unchecked"})
    protected BeanInfo getBeanInfo(Object bean) {
        BeanInfo bi = beanInfo.getOptionalValue();
        if (bi == null) {
            bi = getTempBeanInfo(bean.getClass());
        }
        return bi;
    }
View Full Code Here

        ValueConfig vc = (ValueConfig) previous;
        if (factoryClass != null) {
            if (factoryMethod == null)
                throw PojoLogger.ROOT_LOGGER.nullFactoryMethod();

            BeanInfo beanInfo = getTempBeanInfo(visitor, factoryClass);
            Method m = beanInfo.findMethod(factoryMethod, Configurator.getTypes(parameters));
            return m.getParameterTypes()[vc.getIndex()];
        } else {
            BeanInfo beanInfo = visitor.getBeanInfo();
            if (beanInfo == null)
                throw PojoLogger.ROOT_LOGGER.nullBeanInfo();
            Constructor ctor = beanInfo.findConstructor(Configurator.getTypes(parameters));
            return ctor.getParameterTypes()[vc.getIndex()];
        }
    }
View Full Code Here

    public Class<?> getType(ConfigVisitor visitor, ConfigVisitorNode previous) {
        if (previous instanceof ValueConfig == false)
            throw PojoLogger.ROOT_LOGGER.notValueConfig(previous);

        ValueConfig vc = (ValueConfig) previous;
        BeanInfo beanInfo = visitor.getBeanInfo();
        Method m = beanInfo.findMethod(methodName, Configurator.getTypes(parameters));
        return m.getParameterTypes()[vc.getIndex()];
    }
View Full Code Here

        }
    }

    @SuppressWarnings({"unchecked"})
    protected BeanInfo getBeanInfo(Object bean) {
        BeanInfo bi = beanInfo.getOptionalValue();
        if (bi == null) {
            bi = getTempBeanInfo(bean.getClass());
        }
        return bi;
    }
View Full Code Here

        ValueConfig vc = (ValueConfig) previous;
        if (factoryClass != null) {
            if (factoryMethod == null)
                throw new IllegalArgumentException("Null factory method!");

            BeanInfo beanInfo = getTempBeanInfo(visitor, factoryClass);
            Method m = beanInfo.findMethod(factoryMethod, Configurator.getTypes(parameters));
            return m.getParameterTypes()[vc.getIndex()];
        } else {
            BeanInfo beanInfo = visitor.getBeanInfo();
            if (beanInfo == null)
                throw new IllegalArgumentException("No bean info!");
            Constructor ctor = beanInfo.findConstructor(Configurator.getTypes(parameters));
            return ctor.getParameterTypes()[vc.getIndex()];
        }
    }
View Full Code Here

    public Class<?> getType(ConfigVisitor visitor, ConfigVisitorNode previous) {
        if (previous instanceof ValueConfig == false)
            throw new IllegalArgumentException("Previous node is not a value config!");

        ValueConfig vc = (ValueConfig) previous;
        BeanInfo beanInfo = visitor.getBeanInfo();
        Method m = beanInfo.findMethod(methodName, Configurator.getTypes(parameters));
        return m.getParameterTypes()[vc.getIndex()];
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.pojo.service.BeanInfo

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.