Package org.jboss.errai.codegen.meta

Examples of org.jboss.errai.codegen.meta.MetaClassMember


                                        final InjectableInstance instance,
                                        final Annotation annotation,
                                        final IOCProcessingContext context) {

              final MetaClass injectedType = instance.getElementTypeOrMethodReturnType();
              final MetaClassMember producerMember;

              switch (instance.getTaskType()) {
                case PrivateMethod:
                case Method:
                  producerMember = instance.getMethod();

                  for (final MetaParameter parm : instance.getMethod().getParameters()) {
                    control.notifyDependency(injectedType);
                    control.notifyDependencies(fillInInterface(parm.getType()));
                  }

                  break;
                case PrivateField:
                case Field:
                  producerMember = instance.getField();
                  break;
                default:
                  throw new RuntimeException("illegal producer type");
              }

              final ProducerInjector producerInjector
                  = new ProducerInjector(
                  injectionContext,
                  injectedType,
                  producerMember,
                  instance.getQualifyingMetadata(),
                  instance);

              injectionContext.registerInjector(producerInjector);

              control.masqueradeAs(injectedType);

              if (!producerMember.isStatic()) {
                // if this is a static producer, it does not have a dependency on its parent bean
                injectionContext.getGraphBuilder().addDependency(injectedType, Dependency.on(instance.getEnclosingType()));
              }
            }
View Full Code Here

TOP

Related Classes of org.jboss.errai.codegen.meta.MetaClassMember

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.