Constructor.getDeclaredAnnotations
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using java.lang.reflect.Constructor.getDeclaredAnnotations (Showing top 20 results out of 621)

  • Common ways to obtain Constructor
private void myMethod () {
Constructor c =
  • Class clazz;Class[] parameterTypes;clazz.getConstructor(parameterTypes)
  • Class clazz;clazz.getConstructor()
  • Class clazz;Class[] parameterTypes;clazz.getDeclaredConstructor(parameterTypes)
  • Smart code suggestions by Codota
}
origin: prestodb/presto

public Annotation[] getDeclaredAnnotations() {
  Annotation[] result = _annotations;
  if (result == null) {
    result = _ctor.getDeclaredAnnotations();
    _annotations = result;
  }
  return result;
}
origin: redisson/redisson

public Annotation[] getDeclaredAnnotations() {
  Annotation[] result = _annotations;
  if (result == null) {
    result = _ctor.getDeclaredAnnotations();
    _annotations = result;
  }
  return result;
}
origin: oldmanpushcart/greys-anatomy

@Override
public Annotation[] getDeclaredAnnotations() {
  return target.getDeclaredAnnotations();
}
origin: alibaba/jvm-sandbox

@Override
public Annotation[] getDeclaredAnnotations() {
  return target.getDeclaredAnnotations();
}
origin: apache/drill

public Annotation[] getDeclaredAnnotations() {
  Annotation[] result = _annotations;
  if (result == null) {
    result = _ctor.getDeclaredAnnotations();
    _annotations = result;
  }
  return result;
}
origin: spring-projects/spring-loaded

public List<Annotation> callConstructorGetDeclaredAnnotations(Constructor<?> m) {
  return Arrays.asList(m.getDeclaredAnnotations());
}
public boolean callConstructorIsAnnotationPresent(Constructor<?> m, Class<? extends Annotation> annotClass) {
origin: ronmamo/reflections

public List<String> getMethodAnnotationNames(Member method) {
  Annotation[] annotations =
      method instanceof Method ? ((Method) method).getDeclaredAnnotations() :
      method instanceof Constructor ? ((Constructor) method).getDeclaredAnnotations() : null;
  return getAnnotationNames(annotations);
}
origin: org.reflections/reflections

public List<String> getMethodAnnotationNames(Member method) {
  Annotation[] annotations =
      method instanceof Method ? ((Method) method).getDeclaredAnnotations() :
      method instanceof Constructor ? ((Constructor) method).getDeclaredAnnotations() : null;
  return getAnnotationNames(annotations);
}
origin: redisson/redisson

/**
 * {@inheritDoc}
 */
@CachedReturnPlugin.Enhance("declaredAnnotations")
public AnnotationList getDeclaredAnnotations() {
  return new AnnotationList.ForLoadedAnnotations(constructor.getDeclaredAnnotations());
}
origin: prestodb/presto

private AnnotationMap collectAnnotations(ClassUtil.Ctor main, ClassUtil.Ctor mixin) {
  AnnotationCollector c = collectAnnotations(main.getConstructor().getDeclaredAnnotations());
  if (mixin != null) {
    c = collectAnnotations(c, mixin.getConstructor().getDeclaredAnnotations());
  }
  return c.asAnnotationMap();
}
origin: redisson/redisson

private AnnotationMap collectAnnotations(ClassUtil.Ctor main, ClassUtil.Ctor mixin) {
  AnnotationCollector c = collectAnnotations(main.getConstructor().getDeclaredAnnotations());
  if (mixin != null) {
    c = collectAnnotations(c, mixin.getConstructor().getDeclaredAnnotations());
  }
  return c.asAnnotationMap();
}
origin: apache/drill

private AnnotationMap collectAnnotations(ClassUtil.Ctor main, ClassUtil.Ctor mixin) {
  AnnotationCollector c = collectAnnotations(main.getConstructor().getDeclaredAnnotations());
  if (mixin != null) {
    c = collectAnnotations(c, mixin.getConstructor().getDeclaredAnnotations());
  }
  return c.asAnnotationMap();
}
origin: swagger-api/swagger-core

  && !ReflectionUtils.isInject(Arrays.asList(constructor.getDeclaredAnnotations()))) {
continue;
origin: org.codehaus.jackson/jackson-mapper-asl

/**
 * @param addParamAnnotations Whether parameter annotations are to be
 *   added as well
 */
protected void _addMixOvers(Constructor<?> mixin, AnnotatedConstructor target,
    boolean addParamAnnotations)
{
  for (Annotation a : mixin.getDeclaredAnnotations()) {
    if (_annotationIntrospector.isHandled(a)) {
      target.addOrOverride(a);
    }
  }
  if (addParamAnnotations) {
    Annotation[][] pa = mixin.getParameterAnnotations();
    for (int i = 0, len = pa.length; i < len; ++i) {
      for (Annotation a : pa[i]) {
        target.addOrOverrideParam(i, a);
      }
    }
  }
}
origin: org.codehaus.jackson/jackson-mapper-asl

  return new AnnotatedConstructor(ctor, _collectRelevantAnnotations(ctor.getDeclaredAnnotations()), null);
  resolvedAnnotations = _collectRelevantAnnotations(paramAnns);
return new AnnotatedConstructor(ctor, _collectRelevantAnnotations(ctor.getDeclaredAnnotations()),
    resolvedAnnotations);
origin: alibaba/jvm-sandbox

private BehaviorStructure newBehaviorStructure(final Constructor constructor) {
  return new BehaviorStructure(
      new AccessImplByJDKBehavior(constructor),
      "<init>",
      this,
      this,
      newInstances(constructor.getParameterTypes()),
      newInstances(constructor.getExceptionTypes()),
      newInstances(getAnnotationTypeArray(constructor.getDeclaredAnnotations()))
  );
}
origin: org.mongodb/mongo-java-driver

for (Constructor<?> constructor : clazz.getDeclaredConstructors()) {
  if (isPublic(constructor.getModifiers()) && !constructor.isSynthetic()) {
    for (Annotation annotation : constructor.getDeclaredAnnotations()) {
      if (annotation.annotationType().equals(BsonCreator.class)) {
        if (creatorExecutable != null) {
origin: camunda/camunda-bpm-platform

/**
 * @param addParamAnnotations Whether parameter annotations are to be
 *   added as well
 */
protected void _addMixOvers(Constructor<?> mixin, AnnotatedConstructor target,
    boolean addParamAnnotations)
{
  for (Annotation a : mixin.getDeclaredAnnotations()) {
    if (_annotationIntrospector.isHandled(a)) {
      target.addOrOverride(a);
    }
  }
  if (addParamAnnotations) {
    Annotation[][] pa = mixin.getParameterAnnotations();
    for (int i = 0, len = pa.length; i < len; ++i) {
      for (Annotation a : pa[i]) {
        target.addOrOverrideParam(i, a);
      }
    }
  }
}
origin: camunda/camunda-bpm-platform

  return new AnnotatedConstructor(ctor, _collectRelevantAnnotations(ctor.getDeclaredAnnotations()), null);
  resolvedAnnotations = _collectRelevantAnnotations(paramAnns);
return new AnnotatedConstructor(ctor, _collectRelevantAnnotations(ctor.getDeclaredAnnotations()),
    resolvedAnnotations);
origin: INRIA/spoon

@Override
public <T> void visitConstructor(Constructor<T> constructor) {
  for (Annotation annotation : constructor.getDeclaredAnnotations()) {
    visitAnnotation(annotation);
  }
  int nrEnclosingClasses = getNumberOfEnclosingClasses(constructor.getDeclaringClass());
  for (RtParameter parameter : RtParameter.parametersOf(constructor)) {
    //ignore implicit parameters of enclosing classes
    if (nrEnclosingClasses > 0) {
      nrEnclosingClasses--;
      continue;
    }
    visitParameter(parameter);
  }
  for (TypeVariable<Constructor<T>> aTypeParameter : constructor.getTypeParameters()) {
    visitTypeParameter(aTypeParameter);
  }
  for (Class<?> exceptionType : constructor.getExceptionTypes()) {
    visitTypeReference(CtRole.THROWN, exceptionType);
  }
}
java.lang.reflectConstructorgetDeclaredAnnotations

Popular methods of Constructor

  • newInstance
    Uses the constructor represented by this Constructor object to create and initialize a new instance
  • getParameterTypes
  • setAccessible
  • getDeclaringClass
    Returns the Class object representing the class that declares the constructor represented by this Co
  • getModifiers
    Returns the Java language modifiers for the constructor represented by this Constructor object, as
  • getParameterAnnotations
    Returns an array of arrays that represent the annotations of the formal parameters of this construct
  • getGenericParameterTypes
    Returns the generic parameter types as an array of Typeinstances, in declaration order. If this cons
  • isAccessible
  • getAnnotation
  • getName
    Returns the name of this constructor, as a string. This is always the same as the simple name of the
  • isVarArgs
    Indicates whether or not this constructor takes a variable number of arguments.
  • getExceptionTypes
  • isVarArgs,
  • getExceptionTypes,
  • getParameterCount,
  • isAnnotationPresent,
  • toString,
  • getParameters,
  • getGenericExceptionTypes,
  • getTypeParameters,
  • equals

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)