Tabnine Logo
EnhancedAnnotatedType.getEnhancedSuperclass
Code IndexAdd Tabnine to your IDE (free)

How to use
getEnhancedSuperclass
method
in
org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType

Best Java code snippets using org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType.getEnhancedSuperclass (Showing top 20 results out of 315)

origin: weld/core

public EnhancedAnnotatedType<? super T> getEnhancedSuperclass() {
  return delegate().getEnhancedSuperclass();
}
origin: org.jboss.weld.se/weld-se

public EnhancedAnnotatedType<? super T> getEnhancedSuperclass() {
  return delegate().getEnhancedSuperclass();
}
origin: org.jboss.weld.se/weld-se-shaded

/**
 *
 * @param declaringBean
 * @param type
 * @param manager
 * @return resource injections for the given bean
 */
public List<Set<ResourceInjection<?>>> getResourceInjections(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<ResourceInjection<?>>> result = new ArrayList<Set<ResourceInjection<?>>>();
  // Iterate through the type hierarchy
  for (EnhancedAnnotatedType<?> actualType = type; actualType != null && !actualType.getJavaClass().equals(Object.class); actualType = actualType
      .getEnhancedSuperclass()) {
    Set<ResourceInjection<?>> resourceInjections = discoverType(declaringBean, actualType, manager);
    if (!resourceInjections.isEmpty()) {
      result.add(resourceInjections);
    }
  }
  Collections.reverse(result);
  return result;
}
origin: weld/core

/**
 *
 * @param declaringBean
 * @param type
 * @param manager
 * @return resource injections for the given bean
 */
public List<Set<ResourceInjection<?>>> getResourceInjections(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<ResourceInjection<?>>> result = new ArrayList<Set<ResourceInjection<?>>>();
  // Iterate through the type hierarchy
  for (EnhancedAnnotatedType<?> actualType = type; actualType != null && !actualType.getJavaClass().equals(Object.class); actualType = actualType
      .getEnhancedSuperclass()) {
    Set<ResourceInjection<?>> resourceInjections = discoverType(declaringBean, actualType, manager);
    if (!resourceInjections.isEmpty()) {
      result.add(resourceInjections);
    }
  }
  Collections.reverse(result);
  return result;
}
origin: org.jboss.weld.se/weld-se

/**
 *
 * @param declaringBean
 * @param type
 * @param manager
 * @return resource injections for the given bean
 */
public List<Set<ResourceInjection<?>>> getResourceInjections(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<ResourceInjection<?>>> result = new ArrayList<Set<ResourceInjection<?>>>();
  // Iterate through the type hierarchy
  for (EnhancedAnnotatedType<?> actualType = type; actualType != null && !actualType.getJavaClass().equals(Object.class); actualType = actualType
      .getEnhancedSuperclass()) {
    Set<ResourceInjection<?>> resourceInjections = discoverType(declaringBean, actualType, manager);
    if (!resourceInjections.isEmpty()) {
      result.add(resourceInjections);
    }
  }
  Collections.reverse(result);
  return result;
}
origin: weld/core

/**
 *
 * @param declaringBean
 * @param type
 * @param manager
 * @return resource injections for the given bean
 */
public List<Set<ResourceInjection<?>>> getResourceInjections(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<ResourceInjection<?>>> result = new ArrayList<Set<ResourceInjection<?>>>();
  // Iterate through the type hierarchy
  for (EnhancedAnnotatedType<?> actualType = type; actualType != null && !actualType.getJavaClass().equals(Object.class); actualType = actualType
      .getEnhancedSuperclass()) {
    Set<ResourceInjection<?>> resourceInjections = discoverType(declaringBean, actualType, manager);
    if (!resourceInjections.isEmpty()) {
      result.add(resourceInjections);
    }
  }
  Collections.reverse(result);
  return result;
}
origin: weld/core

/**
 *
 * @param declaringBean
 * @param type
 * @param manager
 * @return resource injections for the given bean
 */
public List<Set<ResourceInjection<?>>> getResourceInjections(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<ResourceInjection<?>>> result = new ArrayList<Set<ResourceInjection<?>>>();
  // Iterate through the type hierarchy
  for (EnhancedAnnotatedType<?> actualType = type; actualType != null && !actualType.getJavaClass().equals(Object.class); actualType = actualType
      .getEnhancedSuperclass()) {
    Set<ResourceInjection<?>> resourceInjections = discoverType(declaringBean, actualType, manager);
    if (!resourceInjections.isEmpty()) {
      result.add(resourceInjections);
    }
  }
  Collections.reverse(result);
  return result;
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

/**
 *
 * @param declaringBean
 * @param type
 * @param manager
 * @return resource injections for the given bean
 */
public List<Set<ResourceInjection<?>>> getResourceInjections(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<ResourceInjection<?>>> result = new ArrayList<Set<ResourceInjection<?>>>();
  // Iterate through the type hierarchy
  for (EnhancedAnnotatedType<?> actualType = type; actualType != null && !actualType.getJavaClass().equals(Object.class); actualType = actualType
      .getEnhancedSuperclass()) {
    Set<ResourceInjection<?>> resourceInjections = discoverType(declaringBean, actualType, manager);
    if (!resourceInjections.isEmpty()) {
      result.add(resourceInjections);
    }
  }
  Collections.reverse(result);
  return result;
}
origin: weld/core

protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) {
  if (interceptor instanceof InterceptorImpl<?>) {
    EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated();
    if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) {
      throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor);
    }
    if (!interceptor.getScope().equals(Dependent.class)) {
      throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor);
    }
    while (annotated != null && annotated.getJavaClass() != Object.class) {
      if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor);
      }
      if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor);
      }
      if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor);
      }
      annotated = annotated.getEnhancedSuperclass();
    }
  }
  for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) {
    validateInjectionPoint(injectionPoint, manager);
  }
}
origin: org.jboss.weld.se/weld-se-shaded

protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) {
  if (interceptor instanceof InterceptorImpl<?>) {
    EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated();
    if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) {
      throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor);
    }
    if (!interceptor.getScope().equals(Dependent.class)) {
      throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor);
    }
    while (annotated != null && annotated.getJavaClass() != Object.class) {
      if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor);
      }
      if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor);
      }
      if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor);
      }
      annotated = annotated.getEnhancedSuperclass();
    }
  }
  for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) {
    validateInjectionPoint(injectionPoint, manager);
  }
}
origin: weld/core

protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) {
  if (interceptor instanceof InterceptorImpl<?>) {
    EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated();
    if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) {
      throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor);
    }
    if (!interceptor.getScope().equals(Dependent.class)) {
      throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor);
    }
    while (annotated != null && annotated.getJavaClass() != Object.class) {
      if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor);
      }
      if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor);
      }
      if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor);
      }
      annotated = annotated.getEnhancedSuperclass();
    }
  }
  for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) {
    validateInjectionPoint(injectionPoint, manager);
  }
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) {
  if (interceptor instanceof InterceptorImpl<?>) {
    EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated();
    if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) {
      throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor);
    }
    if (!interceptor.getScope().equals(Dependent.class)) {
      throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor);
    }
    while (annotated != null && annotated.getJavaClass() != Object.class) {
      if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor);
      }
      if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor);
      }
      if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor);
      }
      annotated = annotated.getEnhancedSuperclass();
    }
  }
  for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) {
    validateInjectionPoint(injectionPoint, manager);
  }
}
origin: weld/core

public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>();
  if (type.slim() instanceof UnbackedAnnotatedType<?>) {
    // external AnnotatedTypes require special treatment
    Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class);
    for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> field : allFields) {
        if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) {
          addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  } else {
    for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t
        .getEnhancedSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) {
        if (!annotatedField.isStatic()) {
          addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  }
  return ImmutableList.copyOf(injectableFieldsList);
}
origin: weld/core

public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>();
  if (type.slim() instanceof UnbackedAnnotatedType<?>) {
    // external AnnotatedTypes require special treatment
    Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class);
    for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> field : allFields) {
        if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) {
          addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  } else {
    for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t
        .getEnhancedSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) {
        if (!annotatedField.isStatic()) {
          addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  }
  return ImmutableList.copyOf(injectableFieldsList);
}
origin: org.jboss.weld.se/weld-se

public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>();
  if (type.slim() instanceof UnbackedAnnotatedType<?>) {
    // external AnnotatedTypes require special treatment
    Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class);
    for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> field : allFields) {
        if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) {
          addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  } else {
    for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t
        .getEnhancedSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) {
        if (!annotatedField.isStatic()) {
          addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  }
  return immutableListView(injectableFieldsList);
}
origin: weld/core

protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) {
  if (interceptor instanceof InterceptorImpl<?>) {
    EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated();
    if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) {
      throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor);
    }
    if (!interceptor.getScope().equals(Dependent.class)) {
      throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor);
    }
    while (annotated != null && annotated.getJavaClass() != Object.class) {
      if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor);
      }
      if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor);
      }
      if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor);
      }
      annotated = annotated.getEnhancedSuperclass();
    }
  }
  for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) {
    validateInjectionPoint(injectionPoint, manager);
  }
}
origin: weld/core

public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>();
  if (type.slim() instanceof UnbackedAnnotatedType<?>) {
    // external AnnotatedTypes require special treatment
    Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class);
    for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> field : allFields) {
        if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) {
          addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  } else {
    for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t
        .getEnhancedSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) {
        if (!annotatedField.isStatic()) {
          addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  }
  return ImmutableList.copyOf(injectableFieldsList);
}
origin: org.jboss.weld.se/weld-se-shaded

public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>();
  if (type.slim() instanceof UnbackedAnnotatedType<?>) {
    // external AnnotatedTypes require special treatment
    Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class);
    for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> field : allFields) {
        if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) {
          addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  } else {
    for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t
        .getEnhancedSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) {
        if (!annotatedField.isStatic()) {
          addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  }
  return ImmutableList.copyOf(injectableFieldsList);
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

public List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, EnhancedAnnotatedType<?> type,
    BeanManagerImpl manager) {
  List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>();
  if (type.slim() instanceof UnbackedAnnotatedType<?>) {
    // external AnnotatedTypes require special treatment
    Collection<EnhancedAnnotatedField<?, ?>> allFields = type.getEnhancedFields(Inject.class);
    for (Class<?> clazz = type.getJavaClass(); clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> field : allFields) {
        if (!field.isStatic() && field.getJavaMember().getDeclaringClass().equals(clazz)) {
          addFieldInjectionPoint(field, fields, declaringBean, type.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  } else {
    for (EnhancedAnnotatedType<?> t = type; t != null && !t.getJavaClass().equals(Object.class); t = t
        .getEnhancedSuperclass()) {
      ImmutableSet.Builder<FieldInjectionPoint<?, ?>> fields = ImmutableSet.builder();
      for (EnhancedAnnotatedField<?, ?> annotatedField : t.getDeclaredEnhancedFields(Inject.class)) {
        if (!annotatedField.isStatic()) {
          addFieldInjectionPoint(annotatedField, fields, declaringBean, t.getJavaClass(), manager);
        }
      }
      injectableFieldsList.add(0, fields.build());
    }
  }
  return ImmutableList.copyOf(injectableFieldsList);
}
origin: org.jboss.weld.se/weld-se

protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) {
  if (interceptor instanceof InterceptorImpl<?>) {
    EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated();
    if (!BeanMethods.getObserverMethods(annotated).isEmpty()) {
      throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor);
    }
    if (!interceptor.getScope().equals(Dependent.class)) {
      throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor);
    }
    while (annotated != null && annotated.getJavaClass() != Object.class) {
      if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor);
      }
      if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor);
      }
      if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) {
        throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor);
      }
      annotated = annotated.getEnhancedSuperclass();
    }
  }
  for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) {
    validateInjectionPoint(injectionPoint, manager);
  }
}
org.jboss.weld.annotated.enhancedEnhancedAnnotatedTypegetEnhancedSuperclass

Javadoc

Gets the superclass.

Popular methods of EnhancedAnnotatedType

  • getDeclaredEnhancedConstructor
    Get the constructor which matches the argument list provided
  • getJavaClass
  • getEnhancedMethod
    Get a method by name
  • getEnhancedMethods
    Gets all methods annotated with annotationType including those declared on a superclass of #getJavaC
  • getNoArgsEnhancedConstructor
    Gets the no-args constructor
  • isAbstract
  • isDiscovered
  • slim
    Returns a lightweight implementation of AnnotatedType with minimal memory footprint.
  • getConstructors
  • getDeclaredEnhancedFields
    Gets all fields which are annotated with the given annotation type on this class only.
  • getDeclaredEnhancedMethods
    Gets all methods annotated with annotationType
  • getDeclaredEnhancedMethodsWithAnnotatedParameters
    Gets declared with parameters annotated with annotationType
  • getDeclaredEnhancedMethods,
  • getDeclaredEnhancedMethodsWithAnnotatedParameters,
  • getDeclaredMetaAnnotations,
  • getEnhancedConstructors,
  • getEnhancedFields,
  • getEnhancedMethodsWithAnnotatedParameters,
  • getFields,
  • getMethods,
  • getSimpleName

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Notification (javax.management)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JFileChooser (javax.swing)
  • JTextField (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now