congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ByteVector.putByte
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.sun.jersey/jersey-server

private void writeFrameType(final Object type) {
  if (type instanceof String) {
    stackMap.putByte(7).putShort(cw.newClass((String) type));
  } else if (type instanceof Integer) {
    stackMap.putByte(((Integer) type).intValue());
  } else {
    stackMap.putByte(8).putShort(((Label) type).position);
  }
}
origin: com.sun.jersey/jersey-server

case 0x14: // METHOD_RETURN
case 0x15: // METHOD_RECEIVER
  out.putByte(typeRef >>> 24);
  break;
case 0x47: // CAST
  out.putByte(0);
} else {
  int length = typePath.b[typePath.offset] * 2 + 1;
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

switch (t & Frame.BASE_KIND) {
case Frame.OBJECT:
  stackMap.putByte(7).putShort(
      cw.newClass(cw.typeTable[v].strVal1));
  break;
case Frame.UNINITIALIZED:
  stackMap.putByte(8).putShort(cw.typeTable[v].intVal);
  break;
default:
  stackMap.putByte(v);
stackMap.putByte(7).putShort(cw.newClass(sb.toString()));
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

@Override
public void visitIincInsn(final int var, final int increment) {
  lastCodeOffset = code.length;
  if (currentBlock != null) {
    if (compute == FRAMES) {
      currentBlock.frame.execute(Opcodes.IINC, var, null, null);
    }
  }
  if (compute != NOTHING) {
    // updates max locals
    int n = var + 1;
    if (n > maxLocals) {
      maxLocals = n;
    }
  }
  // adds the instruction to the bytecode of the method
  if ((var > 255) || (increment > 127) || (increment < -128)) {
    code.putByte(196 /* WIDE */).put12(Opcodes.IINC, var)
        .putShort(increment);
  } else {
    code.putByte(Opcodes.IINC).put11(var, increment);
  }
}
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

@Override
public void visitInsn(final int opcode) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  code.putByte(opcode);
  // update currentBlock
  // Label currentBlock = this.currentBlock;
  if (currentBlock != null) {
    if (compute == FRAMES) {
      currentBlock.frame.execute(opcode, 0, null, null);
    } else {
      // updates current and max stack sizes
      int size = stackSize + Frame.SIZE[opcode];
      if (size > maxStackSize) {
        maxStackSize = size;
      }
      stackSize = size;
    }
    // if opcode == ATHROW or xRETURN, ends current block (no successor)
    if ((opcode >= Opcodes.IRETURN && opcode <= Opcodes.RETURN)
        || opcode == Opcodes.ATHROW) {
      noSuccessor();
    }
  }
}
origin: com.sun.jersey/jersey-server

bv.putByte(typeRef >>> 24).putShort(start.length);
for (int i = 0; i < start.length; ++i) {
  bv.putShort(start[i].position)
  bv.putByte(0);
} else {
  int length = typePath.b[typePath.offset] * 2 + 1;
origin: com.sun.jersey/jersey-server

@Override
public void visitMultiANewArrayInsn(final String desc, final int dims) {
  lastCodeOffset = code.length;
  Item i = cw.newClassItem(desc);
  // Label currentBlock = this.currentBlock;
  if (currentBlock != null) {
    if (compute == FRAMES) {
      currentBlock.frame.execute(Opcodes.MULTIANEWARRAY, dims, cw, i);
    } else {
      // updates current stack size (max stack size unchanged because
      // stack size variation always negative or null)
      stackSize += 1 - dims;
    }
  }
  // adds the instruction to the bytecode of the method
  code.put12(Opcodes.MULTIANEWARRAY, i.index).putByte(dims);
}
origin: com.sun.jersey/jersey-server

out.putByte(0);
for (int i = 0; i < n;) {
  char c = typePath.charAt(i++);
origin: com.sun.jersey/jersey-server

  code.putByte(200); // GOTO_W
} else if (opcode == Opcodes.JSR) {
  code.putByte(201); // JSR_W
} else {
    nextInsn.status |= Label.TARGET;
  code.putByte(opcode <= 166 ? ((opcode + 1) ^ 1) - 1
      : opcode ^ 1);
  code.putShort(8); // jump offset
  code.putByte(200); // GOTO_W
code.putByte(opcode);
label.put(this, code, code.length - 1, false);
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]);
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:
  if (delta < 64) {
    stackMap.putByte(delta);
  } else {
    stackMap.putByte(SAME_FRAME_EXTENDED).putShort(delta);
    stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME + delta);
  } else {
    stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
        .putShort(delta);
origin: com.sun.jersey/jersey-server

  stackMap.putByte(delta);
  break;
case SAME_LOCALS_1_STACK_ITEM_FRAME:
  stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME + delta);
  writeFrameTypes(3 + clocalsSize, 4 + clocalsSize);
  break;
case SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED:
  stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED).putShort(
      delta);
  writeFrameTypes(3 + clocalsSize, 4 + clocalsSize);
  break;
case SAME_FRAME_EXTENDED:
  stackMap.putByte(SAME_FRAME_EXTENDED).putShort(delta);
  break;
case CHOP_FRAME:
  stackMap.putByte(SAME_FRAME_EXTENDED + k).putShort(delta);
  break;
case APPEND_FRAME:
  stackMap.putByte(SAME_FRAME_EXTENDED + k).putShort(delta);
  writeFrameTypes(3 + localsSize, 3 + clocalsSize);
  break;
  stackMap.putByte(FULL_FRAME).putShort(delta).putShort(clocalsSize);
  writeFrameTypes(3, 3 + clocalsSize);
  stackMap.putShort(cstackSize);
origin: com.sun.jersey/jersey-server

  code.putByte(opt);
} else if (var >= 256) {
  code.putByte(196 /* WIDE */).put12(opcode, var);
} else {
  code.put11(opcode, var);
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 a long to the constant pool of the class being build. Does nothing
 * if the constant pool already contains a similar item.
 *
 * @param value
 *            the long value.
 * @return a new or already existing long item.
 */
Item newLong(final long value) {
  key.set(value);
  Item result = get(key);
  if (result == null) {
    pool.putByte(LONG).putLong(value);
    result = new Item(index, key);
    index += 2;
    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

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

/**
 * Adds an UTF8 string to the constant pool of the class being build. Does
 * nothing if the constant pool already contains a similar item. <i>This
 * method is intended for {@link Attribute} sub classes, and is normally not
 * needed by class generators or adapters.</i>
 *
 * @param value
 *            the String value.
 * @return the index of a new or already existing UTF8 item.
 */
public int newUTF8(final String value) {
  key.set(UTF8, value, null, null);
  Item result = get(key);
  if (result == null) {
    pool.putByte(UTF8).putUTF8(value);
    result = new Item(index++, key);
    put(result);
  }
  return result.index;
}
jersey.repackaged.org.objectweb.asmByteVectorputByte

Javadoc

Puts a byte 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
  • 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.
  • 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

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Top plugins for Android Studio
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