Examples of Depends


Examples of org.jboss.ejb3.annotation.Depends

   {
   }

   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
   {
      Depends dep = container.getAnnotation(Depends.class, method.getDeclaringClass(), method);
      if (dep != null)
      {
         if (!method.getName().startsWith("set"))
            throw new RuntimeException("@EJB can only be used with a set method: " + method);
         String[] names = dep.value();
         if (names.length != 1)
            throw new RuntimeException("@Depends on a field can only take one object name: " + method);
         ObjectName on = null;
         try
         {
View Full Code Here

Examples of org.jboss.ejb3.annotation.Depends

      }
   }

   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
   {
      Depends dep = container.getAnnotation(Depends.class, field.getDeclaringClass(), field);
      if (dep != null)
      {
         String[] names = dep.value();
         if (names.length != 1)
            throw new RuntimeException("@Depends on a field can only take one object name: " + field);
         ObjectName on = null;
         try
         {
View Full Code Here

Examples of org.jboss.ejb3.annotation.Depends

      }
   }

   public void handleClassAnnotations(Class<?> clazz, InjectionContainer container)
   {
      Depends dep = container.getAnnotation(Depends.class, clazz);
      if (dep == null) return;
      for (String dependency : dep.value())
      {
         container.getDependencyPolicy().addDependency(dependency);
      }
   }
View Full Code Here

Examples of org.jboss.ejb3.annotation.Depends

/*     */   {
/*     */   }
/*     */
/*     */   public void handleMethodAnnotations(Method method, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
/*     */   {
/*  51 */     Depends dep = (Depends)container.getAnnotation(Depends.class, method.getDeclaringClass(), method);
/*  52 */     if (dep != null)
/*     */     {
/*  54 */       if (!method.getName().startsWith("set"))
/*  55 */         throw new RuntimeException("@EJB can only be used with a set method: " + method);
/*  56 */       String[] names = dep.value();
/*  57 */       if (names.length != 1)
/*  58 */         throw new RuntimeException("@Depends on a field can only take one object name: " + method);
/*  59 */       ObjectName on = null;
/*     */       try
/*     */       {
View Full Code Here

Examples of org.jboss.ejb3.annotation.Depends

/*     */     }
/*     */   }
/*     */
/*     */   public void handleFieldAnnotations(Field field, InjectionContainer container, Map<AccessibleObject, Injector> injectors)
/*     */   {
/*  79 */     Depends dep = (Depends)container.getAnnotation(Depends.class, field.getDeclaringClass(), field);
/*  80 */     if (dep != null)
/*     */     {
/*  82 */       String[] names = dep.value();
/*  83 */       if (names.length != 1)
/*  84 */         throw new RuntimeException("@Depends on a field can only take one object name: " + field);
/*  85 */       ObjectName on = null;
/*     */       try
/*     */       {
View Full Code Here

Examples of org.jboss.ejb3.annotation.Depends

/*     */     }
/*     */   }
/*     */
/*     */   public void handleClassAnnotations(Class<?> clazz, InjectionContainer container)
/*     */   {
/* 105 */     Depends dep = (Depends)container.getAnnotation(Depends.class, clazz);
/* 106 */     if (dep == null) return;
/* 107 */     for (String dependency : dep.value())
/*     */     {
/* 109 */       container.getDependencyPolicy().addDependency(dependency);
/*     */     }
/*     */   }
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.