Examples of Annotation


Examples of java.text.Annotation

        } break;
        case EBIDI_EMBEDDING: bidiEmbedding = (byte)((Integer)o).intValue(); break;
        case EJUSTIFICATION: justification = ((Number)o).floatValue(); break;
        case EINPUT_METHOD_HIGHLIGHT: {
            if (o instanceof Annotation) {
                Annotation at = (Annotation)o;
                imHighlight = (InputMethodHighlight)at.getValue();
            } else {
                imHighlight = (InputMethodHighlight)o;
            }
        } break;
        case EINPUT_METHOD_UNDERLINE: imUnderline = (byte)((Integer)o).intValue();
View Full Code Here

Examples of javassist.bytecode.annotation.Annotation

  
   public void visitAnnotationMemberValue(AnnotationMemberValue node)
   {
      try
      {
         Annotation ann = node.getValue();
         value = AnnotationProxy.createProxy(ann);
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

Examples of lombok.ast.Annotation

            return false;
        }

        Iterator<Annotation> iterator = annotations.iterator();
        while (iterator.hasNext()) {
            Annotation annotation = iterator.next();
            TypeReference t = annotation.astAnnotationTypeReference();
            String typeName = t.getTypeName();
            if (typeName.endsWith(SUPPRESS_LINT)
                    || typeName.endsWith("SuppressWarnings")) {     //$NON-NLS-1$
                StrictListAccessor<AnnotationElement, Annotation> values =
                        annotation.astElements();
                if (values != null) {
                    Iterator<AnnotationElement> valueIterator = values.iterator();
                    while (valueIterator.hasNext()) {
                        AnnotationElement element = valueIterator.next();
                        AnnotationValue valueNode = element.astValue();
View Full Code Here

Examples of net.opentsdb.meta.Annotation

        KeyValue kv = row.get(0);
        final byte[] qual = kv.qualifier();
        if (qual.length % 2 != 0 || qual.length == 0) {
          // This could be a row with only an annotation in it
          if ((qual[0] | Annotation.PREFIX()) == Annotation.PREFIX()) {
            final Annotation note = JSON.parseToObject(kv.value(),
                Annotation.class);
            annotations.add(note);
          }
          return null;
        }
        final byte[] val = kv.value();
        if (qual.length == 2 && Internal.floatingPointValueToFix(qual[1], val)) {
          // Fix up old, incorrectly encoded floating point value.
          final byte[] newval = Internal.fixFloatingPointValue(qual[1], val);
          final byte[] newqual = new byte[] { qual[0],
            Internal.fixQualifierFlags(qual[1], newval.length) };
          kv = new KeyValue(kv.key(), kv.family(), newqual, newval);
        }
        compacted[0] = kv;
      }
      return null;
    }

    // We know we have at least 2 cells.  We need to go through all the cells
    // to determine what kind of compaction we're going to do.  If each cell
    // contains a single individual data point, then we can do a trivial
    // compaction.  Otherwise, we have a partially compacted row, and the
    // logic required to compact it is more complex.
    boolean write = true// Do we need to write a compacted cell?
    final KeyValue compact;
    {
      boolean trivial = true// Are we doing a trivial compaction?
      boolean ms_in_row = false;
      boolean s_in_row = false;
      int qual_len = 0// Pre-compute the size of the qualifier we'll need.
      int val_len = 1;   // Reserve an extra byte for meta-data.
      KeyValue longest = row.get(0)// KV with the longest qualifier.
      int longest_idx = 0;            // Index of `longest'.
      int nkvs = row.size();
      for (int i = 0; i < nkvs; i++) {
        final KeyValue kv = row.get(i);
        final byte[] qual = kv.qualifier();
        // If the qualifier length isn't 2, this row might have already
        // been compacted, potentially partially, so we need to merge the
        // partially compacted set of cells, with the rest.
        final int len = qual.length;
        if (len != 2 && len != 4) {
          // Datapoints and compacted columns should have qualifiers with an
          // even number of bytes. If we find one with an odd number, or an
          // empty qualifier (which is possible), we need to remove it from the
          // compaction queue.
          if (len % 2 != 0 || len == 0) {
            // if the qualifier is 3 bytes and starts with the Annotation prefix,
            // parse it out.
            if ((qual[0] | Annotation.PREFIX()) == Annotation.PREFIX()) {
              final Annotation note = JSON.parseToObject(kv.value(),
                  Annotation.class);
              annotations.add(note);
            }
           
            row.remove(i)// This is O(n) but should happen *very* rarely.
 
View Full Code Here

Examples of net.sf.rej.java.attribute.annotations.Annotation

            sd.drawDefault(";");
        } else if (er instanceof DeprecatedAnnotationDefRow) {
          sd.drawIndent();
          sd.drawAnnotation("@Deprecated");
        } else if (er instanceof ClassAnnotationDefRow || er instanceof MethodAnnotationDefRow || er instanceof FieldAnnotationDefRow) {
          Annotation ann = null;
          if (er instanceof ClassAnnotationDefRow) {
            ann = ((ClassAnnotationDefRow)er).getAnnotation();
          } else if (er instanceof MethodAnnotationDefRow) {
            sd.drawIndent();
            ann = ((MethodAnnotationDefRow)er).getAnnotation();
          } else {
            sd.drawIndent();
            ann = ((FieldAnnotationDefRow)er).getAnnotation();
          }
         
          sd.drawAnnotation("@" + ia.getShortName(ann.getName()));
          if (ann.getElementValueCount() > 0) {
            sd.drawDefault("(");
            Map<String, ElementValue> elementValues = ann.getElementValues();
            boolean first = true;
            for (Entry<String, ElementValue> entry : elementValues.entrySet()) {
              if (!first) {
                sd.drawDefault(", ");
              } else {
View Full Code Here

Examples of net.sourceforge.marathon.screencapture.ImagePanel.Annotation

    private void updateAnnotations(BufferedImage image) {
        Graphics graphics = image.getGraphics();
        ArrayList<Annotation> annotations = imagePanel.getAnnotations();
        for (int i = 0; i < annotations.size(); i++) {
            Annotation a = annotations.get(i);
            a.drawDecoration(graphics, i, false);
        }
    }
View Full Code Here

Examples of objot.bytecode.Annotation

    post(ads);
    if (t.isAnnotationPresent(Inject.class))
    {
      byte[] inject = new byte[4];
      Bytes.writeU2(inject, 0, cons.addClass(Inject.class));
      wp.getAnnos().addAnno(new Annotation(cons, inject, 0));
    }
  }
View Full Code Here

Examples of ome.xml.model.Annotation

   * @return
   */
  private static int getLongAnnotationFromPlane(Plane plane, String description, int defaultValue) {
    int result = defaultValue;
    for (int annotationRefIdx=0; annotationRefIdx<plane.sizeOfLinkedAnnotationList(); annotationRefIdx++) {
      Annotation a = plane.getLinkedAnnotation(annotationRefIdx);
      if (a.getDescription().equals(description) &&
        a.getNamespace().equals(ANNOTATION_NAMESPACE) &&
        a instanceof LongAnnotation) {
        result = ((LongAnnotation)a).getValue().intValue();
        break;
      }
    }
View Full Code Here

Examples of oracle.toplink.libraries.asm.attrs.Annotation

        cv_get.visitMaxs(0, 0);
    }
  
    private RuntimeVisibleAnnotations getTransientAnnotation(){
        RuntimeVisibleAnnotations attrs = new RuntimeVisibleAnnotations();
        Annotation transientAnnotation = new Annotation("Ljavax/persistence/Transient;");
        attrs.annotations.add(transientAnnotation);
        return attrs;
    }
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.AnnotationsAttribute.Annotation

        for (int j = 0; j < elementNames.length; j++) {
           elementNames[j] = (CPUTF8) namesIterator.next();
           int t = ((Integer)T_iterator.next()).intValue();
           elementValues[j] = new ElementValue(t, getNextValue(t));
        }
        return new Annotation(pairCount, type, elementNames, elementValues);
    }
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.