Package org.jboss.beans.metadata.api.annotations

Examples of org.jboss.beans.metadata.api.annotations.Dependency


      super(SecurityDomain.class);
   }

   protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(ClassInfo info, MetaData retrieval, SecurityDomain annotation, KernelControllerContext context) throws Throwable
   {
      Dependency dependency = annotation.annotationType().getAnnotation(Dependency.class);
      if (dependency == null)
         throw new IllegalArgumentException("Null @Dependency.");

      DependencyInfo dependencies = context.getDependencyInfo();

      SecurityDomainDependencyFactory factory = null;
      // try to find existing security domain dependency factory
      // or what ever kind of lookup
      KernelController controller = context.getKernel().getController();
      ControllerContext smCC = controller.getInstalledContext(annotation.securityManagerName());
      if (smCC != null)
      {
         Object target = smCC.getTarget();
         if (target != null && target instanceof SecurityDomainDependencyFactory)
            factory = SecurityDomainDependencyFactory.class.cast(target);
      }

      if (factory == null)
         factory = (SecurityDomainDependencyFactory)dependency.factory().newInstance();

      DependencyItem item = factory.createDependencyItem(annotation, dependency);
      dependencies.addIDependOn(item);

      return null;
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.api.annotations.Dependency

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.