Tabnine Logo
ByteVector.putShort
Code IndexAdd Tabnine to your IDE (free)

How to use
putShort
method
in
jersey.repackaged.org.objectweb.asm.ByteVector

Best Java code snippets using jersey.repackaged.org.objectweb.asm.ByteVector.putShort (Showing top 20 results out of 315)

Refine searchRefine arrow

  • ClassWriter.newUTF8
  • ByteVector.<init>
origin: com.sun.jersey/jersey-server

@Override
public void visitLineNumber(final int line, final Label start) {
  if (lineNumber == null) {
    lineNumber = new ByteVector();
  }
  ++lineNumberCount;
  lineNumber.putShort(start.position);
  lineNumber.putShort(line);
}
origin: com.sun.jersey/jersey-server

@Override
public void visitParameter(String name, int access) {
  if (methodParameters == null) {
    methodParameters = new ByteVector();
  }
  ++methodParametersCount;
  methodParameters.putShort((name == null) ? 0 : cw.newUTF8(name))
      .putShort(access);
}
origin: com.sun.jersey/jersey-server

@Override
public void visitEnum(final String name, final String desc,
    final String value) {
  ++size;
  if (named) {
    bv.putShort(cw.newUTF8(name));
  }
  bv.put12('e', cw.newUTF8(desc)).putShort(cw.newUTF8(value));
}
origin: com.sun.jersey/jersey-server

if (signature != null) {
  if (localVarType == null) {
    localVarType = new ByteVector();
  localVarType.putShort(start.position)
      .putShort(end.position - start.position)
      .putShort(cw.newUTF8(name)).putShort(cw.newUTF8(signature))
      .putShort(index);
  localVar = new ByteVector();
localVar.putShort(start.position)
    .putShort(end.position - start.position)
    .putShort(cw.newUTF8(name)).putShort(cw.newUTF8(desc))
    .putShort(index);
if (compute != NOTHING) {
origin: com.sun.jersey/jersey-server

@Override
public AnnotationVisitor visitAnnotation(final String name,
    final String desc) {
  ++size;
  if (named) {
    bv.putShort(cw.newUTF8(name));
  }
  // write tag and type, and reserve space for values count
  bv.put12('@', cw.newUTF8(desc)).putShort(0);
  return new AnnotationWriter(cw, true, bv, bv, bv.length - 2);
}
origin: com.sun.jersey/jersey-server

case Opcodes.F_FULL:
  currentLocals = nLocal;
  stackMap.putByte(FULL_FRAME).putShort(delta).putShort(nLocal);
  for (int i = 0; i < nLocal; ++i) {
    writeFrameType(local[i]);
  stackMap.putShort(nStack);
  for (int i = 0; i < nStack; ++i) {
    writeFrameType(stack[i]);
case Opcodes.F_APPEND:
  currentLocals += nLocal;
  stackMap.putByte(SAME_FRAME_EXTENDED + nLocal).putShort(delta);
  for (int i = 0; i < nLocal; ++i) {
    writeFrameType(local[i]);
case Opcodes.F_CHOP:
  currentLocals -= nLocal;
  stackMap.putByte(SAME_FRAME_EXTENDED - nLocal).putShort(delta);
  break;
case Opcodes.F_SAME:
    stackMap.putByte(delta);
  } else {
    stackMap.putByte(SAME_FRAME_EXTENDED).putShort(delta);
  } else {
    stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
        .putShort(delta);
origin: com.sun.jersey/jersey-server

@Override
public AnnotationVisitor visitAnnotation(final String desc,
    final boolean visible) {
  if (!ClassReader.ANNOTATIONS) {
    return null;
  }
  ByteVector bv = new ByteVector();
  // write type, and reserve space for values count
  bv.putShort(cw.newUTF8(desc)).putShort(0);
  AnnotationWriter aw = new AnnotationWriter(cw, true, bv, bv, 2);
  if (visible) {
    aw.next = anns;
    anns = aw;
  } else {
    aw.next = ianns;
    ianns = aw;
  }
  return aw;
}
origin: com.sun.jersey/jersey-server

@Override
public AnnotationVisitor visitArray(final String name) {
  ++size;
  if (named) {
    bv.putShort(cw.newUTF8(name));
  }
  // write tag, and reserve space for array size
  bv.put12('[', 0);
  return new AnnotationWriter(cw, false, bv, bv, bv.length - 2);
}
origin: com.sun.jersey/jersey-server

  bootstrapMethods = this.bootstrapMethods = new ByteVector();
bootstrapMethods.putShort(newHandle(bsm.tag, bsm.owner, bsm.name,
    bsm.desc));
bootstrapMethods.putShort(argsLength);
  bootstrapMethods.putShort(newConst(bsmArg));
origin: com.sun.jersey/jersey-server

@Override
public AnnotationVisitor visitAnnotation(final String desc,
    final boolean visible) {
  if (!ClassReader.ANNOTATIONS) {
    return null;
  }
  ByteVector bv = new ByteVector();
  // write type, and reserve space for values count
  bv.putShort(cw.newUTF8(desc)).putShort(0);
  AnnotationWriter aw = new AnnotationWriter(cw, true, bv, bv, 2);
  if (visible) {
    aw.next = anns;
    anns = aw;
  } else {
    aw.next = ianns;
    ianns = aw;
  }
  return aw;
}
origin: com.sun.jersey/jersey-server

int mask = Opcodes.ACC_DEPRECATED | ClassWriter.ACC_SYNTHETIC_ATTRIBUTE
    | ((access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) / FACTOR);
out.putShort(access & ~mask).putShort(name).putShort(desc);
int attributeCount = 0;
if (value != 0) {
out.putShort(attributeCount);
if (value != 0) {
  out.putShort(cw.newUTF8("ConstantValue"));
  out.putInt(2).putShort(value);
    out.putShort(cw.newUTF8("Synthetic")).putInt(0);
  out.putShort(cw.newUTF8("Deprecated")).putInt(0);
  out.putShort(cw.newUTF8("Signature"));
  out.putInt(2).putShort(signature);
  out.putShort(cw.newUTF8("RuntimeVisibleAnnotations"));
  anns.put(out);
  out.putShort(cw.newUTF8("RuntimeInvisibleAnnotations"));
  ianns.put(out);
  out.putShort(cw.newUTF8("RuntimeVisibleTypeAnnotations"));
  tanns.put(out);
  out.putShort(cw.newUTF8("RuntimeInvisibleTypeAnnotations"));
  itanns.put(out);
origin: org.glassfish.jersey.core/jersey-server

@Override
public void visitLineNumber(final int line, final Label start) {
  if (lineNumber == null) {
    lineNumber = new ByteVector();
  }
  ++lineNumberCount;
  lineNumber.putShort(start.position);
  lineNumber.putShort(line);
}
origin: com.sun.jersey/jersey-server

@Override
public final AnnotationVisitor visitAnnotation(final String desc,
    final boolean visible) {
  if (!ClassReader.ANNOTATIONS) {
    return null;
  }
  ByteVector bv = new ByteVector();
  // write type, and reserve space for values count
  bv.putShort(newUTF8(desc)).putShort(0);
  AnnotationWriter aw = new AnnotationWriter(this, true, bv, bv, 2);
  if (visible) {
    aw.next = anns;
    anns = aw;
  } else {
    aw.next = ianns;
    ianns = aw;
  }
  return aw;
}
origin: com.sun.jersey/jersey-server

    | ClassWriter.ACC_SYNTHETIC_ATTRIBUTE
    | ((access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) / FACTOR);
out.putShort(access & ~mask).putShort(name).putShort(desc);
if (classReaderOffset != 0) {
  out.putByteArray(cw.cr.b, classReaderOffset, classReaderLength);
out.putShort(attributeCount);
if (code.length > 0) {
  int size = 12 + code.length + 8 * handlerCount;
  out.putShort(cw.newUTF8("Code")).putInt(size);
  out.putShort(maxStack).putShort(maxLocals);
  out.putInt(code.length).putByteArray(code.data, 0, code.length);
  out.putShort(handlerCount);
  if (handlerCount > 0) {
    Handler h = firstHandler;
    while (h != null) {
      out.putShort(h.start.position).putShort(h.end.position)
          .putShort(h.handler.position).putShort(h.type);
      h = h.next;
  out.putShort(attributeCount);
  if (localVar != null) {
    out.putShort(cw.newUTF8("LocalVariableTable"));
    out.putInt(localVar.length + 2).putShort(localVarCount);
    out.putByteArray(localVar.data, 0, localVar.length);
    out.putShort(cw.newUTF8("LocalVariableTypeTable"));
    out.putInt(localVarType.length + 2).putShort(localVarTypeCount);
origin: com.sun.jersey/jersey-server

ByteVector newCode = new ByteVector(code.length);
        newCode.putByte(opcode <= 166 ? ((opcode + 1) ^ 1) - 1
            : opcode ^ 1);
        newCode.putShort(8); // jump offset
        newCode.putByte(200); // GOTO_W
    } else {
      newCode.putByte(opcode);
      newCode.putShort(newOffset);
origin: com.sun.jersey/jersey-server

@Override
public final void visitInnerClass(final String name,
    final String outerName, final String innerName, final int access) {
  if (innerClasses == null) {
    innerClasses = new ByteVector();
  }
  // Sec. 4.7.6 of the JVMS states "Every CONSTANT_Class_info entry in the
  // constant_pool table which represents a class or interface C that is
  // not a package member must have exactly one corresponding entry in the
  // classes array". To avoid duplicates we keep track in the intVal field
  // of the Item of each CONSTANT_Class_info entry C whether an inner
  // class entry has already been added for C (this field is unused for
  // class entries, and changing its value does not change the hashcode
  // and equality tests). If so we store the index of this inner class
  // entry (plus one) in intVal. This hack allows duplicate detection in
  // O(1) time.
  Item nameItem = newClassItem(name);
  if (nameItem.intVal == 0) {
    ++innerClassesCount;
    innerClasses.putShort(nameItem.index);
    innerClasses.putShort(outerName == null ? 0 : newClass(outerName));
    innerClasses.putShort(innerName == null ? 0 : newUTF8(innerName));
    innerClasses.putShort(access);
    nameItem.intVal = innerClassesCount;
  } else {
    // Compare the inner classes entry nameItem.intVal - 1 with the
    // arguments of this method and throw an exception if there is a
    // difference?
  }
}
origin: com.sun.jersey/jersey-server

while (attr != null) {
  ByteVector b = attr.write(cw, code, len, maxStack, maxLocals);
  out.putShort(cw.newUTF8(attr.type)).putInt(b.length);
  out.putByteArray(b.data, 0, b.length);
  attr = attr.next;
origin: org.glassfish.jersey.core/jersey-server

case Opcodes.F_FULL:
  currentLocals = nLocal;
  stackMap.putByte(FULL_FRAME).putShort(delta).putShort(nLocal);
  for (int i = 0; i < nLocal; ++i) {
    writeFrameType(local[i]);
  stackMap.putShort(nStack);
  for (int i = 0; i < nStack; ++i) {
    writeFrameType(stack[i]);
case Opcodes.F_APPEND:
  currentLocals += nLocal;
  stackMap.putByte(SAME_FRAME_EXTENDED + nLocal).putShort(delta);
  for (int i = 0; i < nLocal; ++i) {
    writeFrameType(local[i]);
case Opcodes.F_CHOP:
  currentLocals -= nLocal;
  stackMap.putByte(SAME_FRAME_EXTENDED - nLocal).putShort(delta);
  break;
case Opcodes.F_SAME:
    stackMap.putByte(delta);
  } else {
    stackMap.putByte(SAME_FRAME_EXTENDED).putShort(delta);
  } else {
    stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
        .putShort(delta);
origin: com.sun.jersey/jersey-server

@Override
public AnnotationVisitor visitTypeAnnotation(final int typeRef,
    final TypePath typePath, final String desc, final boolean visible) {
  if (!ClassReader.ANNOTATIONS) {
    return null;
  }
  ByteVector bv = new ByteVector();
  // write target_type and target_info
  AnnotationWriter.putTarget(typeRef, typePath, bv);
  // write type, and reserve space for values count
  bv.putShort(cw.newUTF8(desc)).putShort(0);
  AnnotationWriter aw = new AnnotationWriter(cw, true, bv, bv,
      bv.length - 2);
  if (visible) {
    aw.next = tanns;
    tanns = aw;
  } else {
    aw.next = itanns;
    itanns = aw;
  }
  return aw;
}
origin: com.sun.jersey/jersey-server

++size;
if (named) {
  bv.putShort(cw.newUTF8(name));
  bv.put12('s', cw.newUTF8((String) value));
} else if (value instanceof Byte) {
  bv.put12('B', cw.newInteger(((Byte) value).byteValue()).index);
  bv.put12('S', cw.newInteger(((Short) value).shortValue()).index);
} else if (value instanceof Type) {
  bv.put12('c', cw.newUTF8(((Type) value).getDescriptor()));
} else if (value instanceof byte[]) {
  byte[] v = (byte[]) value;
jersey.repackaged.org.objectweb.asmByteVectorputShort

Javadoc

Puts a short into this byte vector. The byte vector is automatically enlarged if necessary.

Popular methods of ByteVector

  • <init>
    Constructs a new ByteVector with the given initial size.
  • encodeUTF8
    Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary. T
  • enlarge
    Enlarge this byte vector so that it can receive n more bytes.
  • put11
    Puts two bytes into this byte vector. The byte vector is automatically enlarged if necessary.
  • put12
    Puts a byte and a short into this byte vector. The byte vector is automatically enlarged if necessar
  • putByte
    Puts a byte into this byte vector. The byte vector is automatically enlarged if necessary.
  • putByteArray
    Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary
  • putInt
    Puts an int into this byte vector. The byte vector is automatically enlarged if necessary.
  • putLong
    Puts a long into this byte vector. The byte vector is automatically enlarged if necessary.
  • putUTF8
    Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary.
  • addElement
  • toArray
  • addElement,
  • toArray

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • setContentView (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ 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