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

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

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

origin: com.sun.jersey/jersey-server

@Override
public void visitTableSwitchInsn(final int min, final int max,
    final Label dflt, final Label... labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.TABLESWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(min).putInt(max);
  for (int i = 0; i < labels.length; ++i) {
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: com.sun.jersey/jersey-server

@Override
public void visitLookupSwitchInsn(final Label dflt, final int[] keys,
    final Label[] labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.LOOKUPSWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(labels.length);
  for (int i = 0; i < labels.length; ++i) {
    code.putInt(keys[i]);
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: com.sun.jersey/jersey-server

if (wideOffset) {
  addReference(-1 - source, out.length);
  out.putInt(-1);
} else {
  addReference(source, out.length);
  out.putInt(position - source);
} else {
  out.putShort(position - source);
origin: com.sun.jersey/jersey-server

/**
 * Puts the annotations of this annotation writer list into the given byte
 * vector.
 *
 * @param out
 *            where the annotations must be put.
 */
void put(final ByteVector out) {
  int n = 0;
  int size = 2;
  AnnotationWriter aw = this;
  AnnotationWriter last = null;
  while (aw != null) {
    ++n;
    size += aw.bv.length;
    aw.visitEnd(); // in case user forgot to call visitEnd
    aw.prev = last;
    last = aw;
    aw = aw.next;
  }
  out.putInt(size);
  out.putShort(n);
  aw = last;
  while (aw != null) {
    out.putByteArray(aw.bv.data, 0, aw.bv.length);
    aw = aw.prev;
  }
}
origin: com.sun.jersey/jersey-server

/**
 * Adds a float to the constant pool of the class being build. Does nothing
 * if the constant pool already contains a similar item.
 *
 * @param value
 *            the float value.
 * @return a new or already existing float item.
 */
Item newFloat(final float value) {
  key.set(value);
  Item result = get(key);
  if (result == null) {
    pool.putByte(FLOAT).putInt(key.intVal);
    result = new Item(index++, key);
    put(result);
  }
  return result;
}
origin: com.sun.jersey/jersey-server

/**
 * Adds an integer to the constant pool of the class being build. Does
 * nothing if the constant pool already contains a similar item.
 *
 * @param value
 *            the int value.
 * @return a new or already existing int item.
 */
Item newInteger(final int value) {
  key.set(value);
  Item result = get(key);
  if (result == null) {
    pool.putByte(INT).putInt(value);
    result = new Item(index++, key);
    put(result);
  }
  return result;
}
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: com.sun.jersey/jersey-server

  size += panns[i] == null ? 0 : panns[i].getSize();
out.putInt(size).putByte(panns.length - off);
for (int i = off; i < panns.length; ++i) {
  AnnotationWriter aw = panns[i];
origin: com.sun.jersey/jersey-server

case 0x4A: // CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
case 0x4B: // METHOD_REFERENCE_TYPE_ARGUMENT
  out.putInt(typeRef);
  break;
origin: com.sun.jersey/jersey-server

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.putInt(2).putShort(signature);
origin: com.sun.jersey/jersey-server

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) {
if (localVar != null) {
  out.putShort(cw.newUTF8("LocalVariableTable"));
  out.putInt(localVar.length + 2).putShort(localVarCount);
  out.putByteArray(localVar.data, 0, localVar.length);
  out.putInt(localVarType.length + 2).putShort(localVarTypeCount);
  out.putByteArray(localVarType.data, 0, localVarType.length);
  out.putInt(lineNumber.length + 2).putShort(lineNumberCount);
  out.putByteArray(lineNumber.data, 0, lineNumber.length);
  boolean zip = (cw.version & 0xFFFF) >= Opcodes.V1_6;
  out.putShort(cw.newUTF8(zip ? "StackMapTable" : "StackMap"));
  out.putInt(stackMap.length + 2).putShort(frameCount);
  out.putByteArray(stackMap.data, 0, stackMap.length);
out.putShort(cw.newUTF8("Exceptions")).putInt(
    2 * exceptionCount + 2);
out.putShort(exceptionCount);
if ((cw.version & 0xFFFF) < Opcodes.V1_5
    || (access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) != 0) {
  out.putShort(cw.newUTF8("Synthetic")).putInt(0);
origin: com.sun.jersey/jersey-server

  newCode.putInt(newOffset);
} else {
  newCode.putByte(opcode);
newOffset = getNewOffset(allIndexes, allSizes, u, label);
newCode.putByte(opcode);
newCode.putInt(newOffset);
u += 5;
break;
u += 4;
newOffset = getNewOffset(allIndexes, allSizes, v, label);
newCode.putInt(newOffset);
j = readInt(b, u);
u += 4;
newCode.putInt(j);
j = readInt(b, u) - j + 1;
u += 4;
newCode.putInt(readInt(b, u - 4));
for (; j > 0; --j) {
  label = v + readInt(b, u);
  u += 4;
  newOffset = getNewOffset(allIndexes, allSizes, v, label);
  newCode.putInt(newOffset);
u += 4;
newOffset = getNewOffset(allIndexes, allSizes, v, label);
newCode.putInt(newOffset);
j = readInt(b, u);
origin: com.sun.jersey/jersey-server

out.putInt(0xCAFEBABE).putInt(version);
out.putShort(index).putByteArray(pool.data, 0, pool.length);
int mask = Opcodes.ACC_DEPRECATED | ACC_SYNTHETIC_ATTRIBUTE
if (bootstrapMethods != null) {
  out.putShort(newUTF8("BootstrapMethods"));
  out.putInt(bootstrapMethods.length + 2).putShort(
      bootstrapMethodsCount);
  out.putByteArray(bootstrapMethods.data, 0, bootstrapMethods.length);
  out.putShort(newUTF8("Signature")).putInt(2).putShort(signature);
  out.putShort(newUTF8("SourceFile")).putInt(2).putShort(sourceFile);
  out.putShort(newUTF8("SourceDebugExtension")).putInt(len);
  out.putByteArray(sourceDebug.data, 0, len);
  out.putShort(newUTF8("EnclosingMethod")).putInt(4);
  out.putShort(enclosingMethodOwner).putShort(enclosingMethod);
  out.putShort(newUTF8("Deprecated")).putInt(0);
    out.putShort(newUTF8("Synthetic")).putInt(0);
  out.putInt(innerClasses.length + 2).putShort(innerClassesCount);
  out.putByteArray(innerClasses.data, 0, innerClasses.length);
origin: org.glassfish.jersey.core/jersey-server

@Override
public void visitTableSwitchInsn(final int min, final int max,
                 final Label dflt, final Label... labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.TABLESWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(min).putInt(max);
  for (int i = 0; i < labels.length; ++i) {
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: org.glassfish.jersey.core/jersey-server

@Override
public void visitLookupSwitchInsn(final Label dflt, final int[] keys,
                 final Label[] labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.LOOKUPSWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(labels.length);
  for (int i = 0; i < labels.length; ++i) {
    code.putInt(keys[i]);
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: org.glassfish.jersey.core/jersey-server

if (wideOffset) {
  addReference(-1 - source, out.length);
  out.putInt(-1);
} else {
  addReference(source, out.length);
  out.putInt(position - source);
} else {
  out.putShort(position - source);
origin: org.glassfish.jersey.core/jersey-server

/**
 * Puts the annotations of this annotation writer list into the given byte
 * vector.
 *
 * @param out
 *            where the annotations must be put.
 */
void put(final ByteVector out) {
  int n = 0;
  int size = 2;
  AnnotationWriter aw = this;
  AnnotationWriter last = null;
  while (aw != null) {
    ++n;
    size += aw.bv.length;
    aw.visitEnd(); // in case user forgot to call visitEnd
    aw.prev = last;
    last = aw;
    aw = aw.next;
  }
  out.putInt(size);
  out.putShort(n);
  aw = last;
  while (aw != null) {
    out.putByteArray(aw.bv.data, 0, aw.bv.length);
    aw = aw.prev;
  }
}
origin: org.glassfish.jersey.core/jersey-server

/**
 * Adds an integer to the constant pool of the class being build. Does
 * nothing if the constant pool already contains a similar item.
 *
 * @param value
 *            the int value.
 * @return a new or already existing int item.
 */
Item newInteger(final int value) {
  key.set(value);
  Item result = get(key);
  if (result == null) {
    pool.putByte(INT).putInt(value);
    result = new Item(index++, key);
    put(result);
  }
  return result;
}
origin: org.glassfish.jersey.core/jersey-server

/**
 * Adds a float to the constant pool of the class being build. Does nothing
 * if the constant pool already contains a similar item.
 *
 * @param value
 *            the float value.
 * @return a new or already existing float item.
 */
Item newFloat(final float value) {
  key.set(value);
  Item result = get(key);
  if (result == null) {
    pool.putByte(FLOAT).putInt(key.intVal);
    result = new Item(index++, key);
    put(result);
  }
  return result;
}
origin: org.glassfish.jersey.core/jersey-server

  size += panns[i] == null ? 0 : panns[i].getSize();
out.putInt(size).putByte(panns.length - off);
for (int i = off; i < panns.length; ++i) {
  AnnotationWriter aw = panns[i];
jersey.repackaged.org.objectweb.asmByteVectorputInt

Javadoc

Puts an int 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
  • putLong
    Puts a long into this byte vector. The byte vector is automatically enlarged if necessary.
  • putShort
    Puts a short 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 requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • JCheckBox (javax.swing)
  • JComboBox (javax.swing)
  • Github Copilot alternatives
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