Tabnine Logo
AnnotationInstance.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jboss.jandex.AnnotationInstance
constructor

Best Java code snippets using org.jboss.jandex.AnnotationInstance.<init> (Showing top 9 results out of 315)

origin: wildfly/jandex

final AnnotationInstance annotation(DotName name) {
  AnnotationInstance key = new AnnotationInstance(name, null, null);
  int i = Arrays.binarySearch(annotations, key, AnnotationInstance.NAME_COMPARATOR);
  return i >= 0 ? annotations[i] : null;
}
origin: wildfly/jandex

final AnnotationInstance annotation(DotName name) {
  AnnotationInstance key = new AnnotationInstance(name, null, null);
  int i = Arrays.binarySearch(annotations, key, AnnotationInstance.NAME_COMPARATOR);
  return i >= 0 ? annotations[i] : null;
}
origin: wildfly/jandex

public final AnnotationInstance annotation(DotName name) {
  AnnotationInstance key = new AnnotationInstance(name, null, null);
  int i = Arrays.binarySearch(annotations, key, AnnotationInstance.NAME_COMPARATOR);
  return i >= 0 ? annotations[i] : null;
}
origin: wildfly/jandex

/**
 * Construct a new mock annotation instance. The passed values array will be defensively copied.
 *
 * @param name the name of the annotation instance
 * @param target the thing the annotation is declared on
 * @param values the values of this annotation instance
 * @return the new mock Annotation Instance
 */
public static final AnnotationInstance create(DotName name, AnnotationTarget target, AnnotationValue[] values) {
  if (name == null)
    throw new IllegalArgumentException("Name can't be null");
  if (values == null)
    throw new IllegalArgumentException("Values can't be null");
  values = values.clone();
  // Sort entries so they can be binary searched
  Arrays.sort(values, new Comparator<AnnotationValue>() {
    public int compare(AnnotationValue o1, AnnotationValue o2) {
      return o1.name().compareTo(o2.name());
    }
  });
  return new AnnotationInstance(name, target, values);
}
origin: wildfly/jandex

private AnnotationInstance readAnnotationEntry(PackedDataInputStream stream, AnnotationTarget caller) throws IOException {
  DotName name = nameTable[stream.readPackedU32()];
  AnnotationTarget target = readAnnotationTarget(stream, caller);
  AnnotationValue[] values = readAnnotationValues(stream);
  return new AnnotationInstance(name, target, values);
}
origin: wildfly/jandex

private AnnotationInstance processAnnotation(DataInputStream data, AnnotationTarget target) throws IOException {
  String annotation = convertClassFieldDescriptor(decodeUtf8Entry(data.readUnsignedShort()));
  int valuePairs = data.readUnsignedShort();
  AnnotationValue[] values = new AnnotationValue[valuePairs];
  for (int v = 0; v < valuePairs; v++) {
    String name = intern(decodeUtf8Entry(data.readUnsignedShort()));
    values[v] = processAnnotationElementValue(name, data);
  }
  // Sort entries so they can be binary searched
  Arrays.sort(values, new Comparator<AnnotationValue>() {
    public int compare(AnnotationValue o1, AnnotationValue o2) {
      return o1.name().compareTo(o2.name());
    }
  });
  DotName annotationName = names.convertToName(annotation);
  AnnotationInstance instance = new AnnotationInstance(annotationName, target, values);
  // Don't record nested annotations in index
  if (target != null) {
    recordAnnotation(classAnnotations, annotationName, instance);
    recordAnnotation(masterAnnotations, annotationName, instance);
    if (target instanceof FieldInfo || target instanceof MethodInfo || target instanceof MethodParameterInfo) {
      elementAnnotations.add(instance);
    }
  }
  return instance;
}
origin: wildfly/jandex

AnnotationInstance instance = new AnnotationInstance(annotationName, target, values);
origin: wildfly/jandex

PathElement element = elements.pop();
if (element == null) {
  type = intern(type.addAnnotation(new AnnotationInstance(typeAnnotationState.annotation, null)));
origin: wildfly/jandex

case AVALUE_NESTED: {
  DotName nestedName = classTable[stream.readPackedU32()];
  AnnotationInstance nestedInstance = new AnnotationInstance(nestedName, null, readAnnotationValues(stream));
  value = new AnnotationValue.NestedAnnotation(name, nestedInstance);
  break;
org.jboss.jandexAnnotationInstance<init>

Popular methods of AnnotationInstance

  • target
  • value
  • name
  • toString
  • values
  • create
  • equals
    Returns whether or not this annotation instance is equivalent to another instance. An annotation ins
  • hashCode
    Returns a hash code representing this object.
  • valueWithDefault
    Returns a value that corresponds with the specified parameter name, accounting for its default value

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JButton (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Join (org.hibernate.mapping)
  • Top plugins for WebStorm
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