Examples of DefinitionException


Examples of org.codehaus.aspectwerkz.exception.DefinitionException

        if (name == null) {
            throw new IllegalArgumentException("aspect name can not be null");
        }
        final int index = m_aspectIndexes.get(name);
        if (index == 0) {
            throw new DefinitionException("aspect " + name + " is not properly defined");
        }
        return index;
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.exception.DefinitionException

        if (name == null) {
            throw new IllegalArgumentException("advice name can not be null");
        }
        final AdviceInfo index = (AdviceInfo) m_adviceIndexes.get(name);
        if (index == null) {
            throw new DefinitionException("advice " + name + " is not properly defined");
        }
        return index;
    }
View Full Code Here

Examples of org.exoplatform.container.context.DefinitionException

            && (annotationType.isAnnotationPresent(Scope.class) || annotationType
               .isAnnotationPresent(NormalScope.class)))
         {
            if (scope != null)
            {
               throw new DefinitionException("You cannot set several scopes to the class " + clazz.getName());
            }
            scope = annotationType;
         }
         else if (annotationType.isAnnotationPresent(Stereotype.class))
         {
            hasStereotype = true;
            Annotation[] stereotypeAnnotations = annotationType.getAnnotations();
            for (int j = 0; j < stereotypeAnnotations.length; j++)
            {
               Annotation stereotypeAnnotation = stereotypeAnnotations[j];
               Class<? extends Annotation> stereotypeAnnotationType = stereotypeAnnotation.annotationType();
               if (stereotypeAnnotationType.isAnnotationPresent(Scope.class)
                  || stereotypeAnnotationType.isAnnotationPresent(NormalScope.class))
               {
                  if (defaultScope != null && !defaultScope.equals(stereotypeAnnotationType))
                  {
                     throw new DefinitionException("The class " + clazz.getName()
                        + " has stereotypes with different default scope");
                  }
                  defaultScope = stereotypeAnnotationType;
               }
            }
         }
      }
      if (scope != null)
         return scope;
      if (defaultScope != null)
         return defaultScope;
      if (hasStereotype)
      {
         throw new DefinitionException("The class " + clazz.getName()
            + " has at least one stereotype but doesn't have any scope, please set an explicit scope");
      }
      return null;
   }
View Full Code Here

Examples of org.jboss.weld.exceptions.DefinitionException

    private void fireProcessAnnotatedType(ProcessAnnotatedTypeImpl<?> event, BeanManagerImpl beanManager) {
        final Resolvable resolvable = ProcessAnnotatedTypeEventResolvable.of(event, discovery);
        try {
            beanManager.getGlobalLenientObserverNotifier().fireEvent(event, resolvable);
        } catch (Exception e) {
            throw new DefinitionException(e);
        }
    }
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.