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

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

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

origin: jersey/jersey

private void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
  if (!beanManager.getServices().get(ProxyInstantiator.class).isUsingConstructor()) {
    return;
  }
  EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
  if (constructor == null) {
    throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
  } else if (constructor.isPrivate()) {
    throw BeanLogger.LOG
        .decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
  }
}
origin: org.jboss.weld.se/weld-se

public EnhancedAnnotatedConstructor<T> getNoArgsEnhancedConstructor() {
  return delegate().getNoArgsEnhancedConstructor();
}
origin: weld/core

public EnhancedAnnotatedConstructor<T> getNoArgsEnhancedConstructor() {
  return delegate().getNoArgsEnhancedConstructor();
}
origin: org.jboss.weld.se/weld-se

public static <T> EnhancedAnnotatedConstructor<T> getBeanConstructor(EnhancedAnnotatedType<T> type) {
  Collection<EnhancedAnnotatedConstructor<T>> initializerAnnotatedConstructors = type
      .getEnhancedConstructors(Inject.class);
  BeanLogger.LOG.foundInjectableConstructors(initializerAnnotatedConstructors, type);
  EnhancedAnnotatedConstructor<T> constructor = null;
  if (initializerAnnotatedConstructors.size() > 1) {
    throw UtilLogger.LOG.ambiguousConstructor(type, initializerAnnotatedConstructors);
  } else if (initializerAnnotatedConstructors.size() == 1) {
    constructor = initializerAnnotatedConstructors.iterator().next();
    BeanLogger.LOG.foundOneInjectableConstructor(constructor, type);
  } else if (type.getNoArgsEnhancedConstructor() != null) {
    constructor = type.getNoArgsEnhancedConstructor();
    BeanLogger.LOG.foundDefaultConstructor(constructor, type);
  }
  if (constructor != null) {
    if (!constructor.getEnhancedParameters(Disposes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Disposes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(Observes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Observes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
  return constructor;
}
origin: weld/core

public static <T> EnhancedAnnotatedConstructor<T> getBeanConstructor(EnhancedAnnotatedType<T> type) {
  Collection<EnhancedAnnotatedConstructor<T>> initializerAnnotatedConstructors = type
      .getEnhancedConstructors(Inject.class);
  BeanLogger.LOG.foundInjectableConstructors(initializerAnnotatedConstructors, type);
  EnhancedAnnotatedConstructor<T> constructor = null;
  if (initializerAnnotatedConstructors.size() > 1) {
    throw UtilLogger.LOG.ambiguousConstructor(type, initializerAnnotatedConstructors);
  } else if (initializerAnnotatedConstructors.size() == 1) {
    constructor = initializerAnnotatedConstructors.iterator().next();
    BeanLogger.LOG.foundOneInjectableConstructor(constructor, type);
  } else if (type.getNoArgsEnhancedConstructor() != null) {
    constructor = type.getNoArgsEnhancedConstructor();
    BeanLogger.LOG.foundDefaultConstructor(constructor, type);
  }
  if (constructor != null) {
    if (!constructor.getEnhancedParameters(Disposes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Disposes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(Observes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Observes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(ObservesAsync.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@ObservesAsync", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
  return constructor;
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

public static <T> EnhancedAnnotatedConstructor<T> getBeanConstructor(EnhancedAnnotatedType<T> type) {
  Collection<EnhancedAnnotatedConstructor<T>> initializerAnnotatedConstructors = type
      .getEnhancedConstructors(Inject.class);
  BeanLogger.LOG.foundInjectableConstructors(initializerAnnotatedConstructors, type);
  EnhancedAnnotatedConstructor<T> constructor = null;
  if (initializerAnnotatedConstructors.size() > 1) {
    throw UtilLogger.LOG.ambiguousConstructor(type, initializerAnnotatedConstructors);
  } else if (initializerAnnotatedConstructors.size() == 1) {
    constructor = initializerAnnotatedConstructors.iterator().next();
    BeanLogger.LOG.foundOneInjectableConstructor(constructor, type);
  } else if (type.getNoArgsEnhancedConstructor() != null) {
    constructor = type.getNoArgsEnhancedConstructor();
    BeanLogger.LOG.foundDefaultConstructor(constructor, type);
  }
  if (constructor != null) {
    if (!constructor.getEnhancedParameters(Disposes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Disposes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(Observes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Observes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(ObservesAsync.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@ObservesAsync", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
  return constructor;
}
origin: weld/core

public static <T> EnhancedAnnotatedConstructor<T> getBeanConstructor(EnhancedAnnotatedType<T> type) {
  Collection<EnhancedAnnotatedConstructor<T>> initializerAnnotatedConstructors = type
      .getEnhancedConstructors(Inject.class);
  BeanLogger.LOG.foundInjectableConstructors(initializerAnnotatedConstructors, type);
  EnhancedAnnotatedConstructor<T> constructor = null;
  if (initializerAnnotatedConstructors.size() > 1) {
    throw UtilLogger.LOG.ambiguousConstructor(type, initializerAnnotatedConstructors);
  } else if (initializerAnnotatedConstructors.size() == 1) {
    constructor = initializerAnnotatedConstructors.iterator().next();
    BeanLogger.LOG.foundOneInjectableConstructor(constructor, type);
  } else if (type.getNoArgsEnhancedConstructor() != null) {
    constructor = type.getNoArgsEnhancedConstructor();
    BeanLogger.LOG.foundDefaultConstructor(constructor, type);
  }
  if (constructor != null) {
    if (!constructor.getEnhancedParameters(Disposes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Disposes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(Observes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Observes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(ObservesAsync.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@ObservesAsync", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
  return constructor;
}
origin: weld/core

public static <T> EnhancedAnnotatedConstructor<T> getBeanConstructor(EnhancedAnnotatedType<T> type) {
  Collection<EnhancedAnnotatedConstructor<T>> initializerAnnotatedConstructors = type
      .getEnhancedConstructors(Inject.class);
  BeanLogger.LOG.foundInjectableConstructors(initializerAnnotatedConstructors, type);
  EnhancedAnnotatedConstructor<T> constructor = null;
  if (initializerAnnotatedConstructors.size() > 1) {
    throw UtilLogger.LOG.ambiguousConstructor(type, initializerAnnotatedConstructors);
  } else if (initializerAnnotatedConstructors.size() == 1) {
    constructor = initializerAnnotatedConstructors.iterator().next();
    BeanLogger.LOG.foundOneInjectableConstructor(constructor, type);
  } else if (type.getNoArgsEnhancedConstructor() != null) {
    constructor = type.getNoArgsEnhancedConstructor();
    BeanLogger.LOG.foundDefaultConstructor(constructor, type);
  }
  if (constructor != null) {
    if (!constructor.getEnhancedParameters(Disposes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Disposes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(Observes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Observes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(ObservesAsync.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@ObservesAsync", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
  return constructor;
}
origin: org.jboss.weld.se/weld-se-shaded

public static <T> EnhancedAnnotatedConstructor<T> getBeanConstructor(EnhancedAnnotatedType<T> type) {
  Collection<EnhancedAnnotatedConstructor<T>> initializerAnnotatedConstructors = type
      .getEnhancedConstructors(Inject.class);
  BeanLogger.LOG.foundInjectableConstructors(initializerAnnotatedConstructors, type);
  EnhancedAnnotatedConstructor<T> constructor = null;
  if (initializerAnnotatedConstructors.size() > 1) {
    throw UtilLogger.LOG.ambiguousConstructor(type, initializerAnnotatedConstructors);
  } else if (initializerAnnotatedConstructors.size() == 1) {
    constructor = initializerAnnotatedConstructors.iterator().next();
    BeanLogger.LOG.foundOneInjectableConstructor(constructor, type);
  } else if (type.getNoArgsEnhancedConstructor() != null) {
    constructor = type.getNoArgsEnhancedConstructor();
    BeanLogger.LOG.foundDefaultConstructor(constructor, type);
  }
  if (constructor != null) {
    if (!constructor.getEnhancedParameters(Disposes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Disposes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(Observes.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@Observes", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
    if (!constructor.getEnhancedParameters(ObservesAsync.class).isEmpty()) {
      throw BeanLogger.LOG.parameterAnnotationNotAllowedOnConstructor("@ObservesAsync", constructor,
          Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
  return constructor;
}
origin: weld/core

protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
  EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
  if (constructor == null) {
    if (!beanManager.getServices().get(ProxyInstantiator.class).isUsingConstructor()) {
      // Relaxed construction allows us to bypass non-existent no-arg constructor
      return;
    } else {
      // Without relaxed contruction, CDI enforces existence of no-arg constructor
      throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
    }
  } else {
    if (constructor.isPrivate()) {
      // Private no-arg constructor is a problem while creating the decorator and we have to blow up
      throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
}
origin: weld/core

protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
  EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
  if (constructor == null) {
    if (!beanManager.getServices().get(ProxyInstantiator.class).isUsingConstructor()) {
      // Relaxed construction allows us to bypass non-existent no-arg constructor
      return;
    } else {
      // Without relaxed contruction, CDI enforces existence of no-arg constructor
      throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
    }
  } else {
    if (constructor.isPrivate()) {
      // Private no-arg constructor is a problem while creating the decorator and we have to blow up
      throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
}
origin: weld/core

protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
  EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
  if (constructor == null) {
    if (!beanManager.getServices().get(ProxyInstantiator.class).isUsingConstructor()) {
      // Relaxed construction allows us to bypass non-existent no-arg constructor
      return;
    } else {
      // Without relaxed contruction, CDI enforces existence of no-arg constructor
      throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
    }
  } else {
    if (constructor.isPrivate()) {
      // Private no-arg constructor is a problem while creating the decorator and we have to blow up
      throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
}
origin: org.jboss.weld.se/weld-se-shaded

protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
  EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
  if (constructor == null) {
    if (!beanManager.getServices().get(ProxyInstantiator.class).isUsingConstructor()) {
      // Relaxed construction allows us to bypass non-existent no-arg constructor
      return;
    } else {
      // Without relaxed contruction, CDI enforces existence of no-arg constructor
      throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
    }
  } else {
    if (constructor.isPrivate()) {
      // Private no-arg constructor is a problem while creating the decorator and we have to blow up
      throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
}
origin: org.jboss.weld.se/weld-se

protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
  EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
  if (constructor == null) {
    if (!beanManager.getServices().get(ProxyInstantiator.class).isUsingConstructor()) {
      // Relaxed construction allows us to bypass non-existent no-arg constructor
      return;
    } else {
      // Without relaxed contruction, CDI enforces existence of no-arg constructor
      throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
    }
  } else {
    if (constructor.isPrivate()) {
      // Private no-arg constructor is a problem while creating the decorator and we have to blow up
      throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

protected void checkNoArgsConstructor(EnhancedAnnotatedType<T> type) {
  EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
  if (constructor == null) {
    if (!beanManager.getServices().get(ProxyInstantiator.class).isUsingConstructor()) {
      // Relaxed construction allows us to bypass non-existent no-arg constructor
      return;
    } else {
      // Without relaxed contruction, CDI enforces existence of no-arg constructor
      throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
    }
  } else {
    if (constructor.isPrivate()) {
      // Private no-arg constructor is a problem while creating the decorator and we have to blow up
      throw BeanLogger.LOG.decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
    }
  }
}
org.jboss.weld.annotated.enhancedEnhancedAnnotatedTypegetNoArgsEnhancedConstructor

Javadoc

Gets the no-args constructor

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
  • 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
  • getDeclaredMetaAnnotations
    Gets all annotations which are declared on this annotated item with the given meta annotation type
  • getDeclaredEnhancedMethodsWithAnnotatedParameters,
  • getDeclaredMetaAnnotations,
  • getEnhancedConstructors,
  • getEnhancedFields,
  • getEnhancedMethodsWithAnnotatedParameters,
  • getEnhancedSuperclass,
  • getFields,
  • getMethods,
  • getSimpleName

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Permission (java.security)
    Legacy security code; do not use.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • JFrame (javax.swing)
  • JLabel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top Vim 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