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

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

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

origin: com.sun.jersey/jersey-server

/**
 * Puts one byte and two shorts into the constant pool.
 *
 * @param b
 *            a byte.
 * @param s1
 *            a short.
 * @param s2
 *            another short.
 */
private void put122(final int b, final int s1, final int s2) {
  pool.put12(b, s1).putShort(s2);
}
origin: com.sun.jersey/jersey-server

  bv.put12('s', cw.newUTF8((String) value));
} else if (value instanceof Byte) {
  bv.put12('B', cw.newInteger(((Byte) value).byteValue()).index);
} else if (value instanceof Boolean) {
  int v = ((Boolean) value).booleanValue() ? 1 : 0;
  bv.put12('Z', cw.newInteger(v).index);
} else if (value instanceof Character) {
  bv.put12('C', cw.newInteger(((Character) value).charValue()).index);
} else if (value instanceof Short) {
  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;
  bv.put12('[', v.length);
  for (int i = 0; i < v.length; i++) {
    bv.put12('B', cw.newInteger(v[i]).index);
  bv.put12('[', v.length);
  for (int i = 0; i < v.length; i++) {
    bv.put12('Z', cw.newInteger(v[i] ? 1 : 0).index);
  bv.put12('[', v.length);
  for (int i = 0; i < v.length; i++) {
    bv.put12('S', cw.newInteger(v[i]).index);
  bv.put12('[', v.length);
  for (int i = 0; i < v.length; i++) {
    bv.put12('C', cw.newInteger(v[i]).index);
origin: com.sun.jersey/jersey-server

  code.put12(20 /* LDC2_W */, index);
} else if (index >= 256) {
  code.put12(19 /* LDC_W */, index);
} else {
  code.put11(Opcodes.LDC, index);
origin: com.sun.jersey/jersey-server

@Override
public void visitTypeInsn(final int opcode, final String type) {
  lastCodeOffset = code.length;
  Item i = cw.newClassItem(type);
  // Label currentBlock = this.currentBlock;
  if (currentBlock != null) {
    if (compute == FRAMES) {
      currentBlock.frame.execute(opcode, code.length, cw, i);
    } else if (opcode == Opcodes.NEW) {
      // updates current and max stack sizes only if opcode == NEW
      // (no stack change for ANEWARRAY, CHECKCAST, INSTANCEOF)
      int size = stackSize + 1;
      if (size > maxStackSize) {
        maxStackSize = size;
      }
      stackSize = size;
    }
  }
  // adds the instruction to the bytecode of the method
  code.put12(opcode, i.index);
}
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

@Override
public void visitIntInsn(final int opcode, final int operand) {
  lastCodeOffset = code.length;
  // Label currentBlock = this.currentBlock;
  if (currentBlock != null) {
    if (compute == FRAMES) {
      currentBlock.frame.execute(opcode, operand, null, null);
    } else if (opcode != Opcodes.NEWARRAY) {
      // updates current and max stack sizes only for NEWARRAY
      // (stack size variation = 0 for BIPUSH or SIPUSH)
      int size = stackSize + 1;
      if (size > maxStackSize) {
        maxStackSize = size;
      }
      stackSize = size;
    }
  }
  // adds the instruction to the bytecode of the method
  if (opcode == Opcodes.SIPUSH) {
    code.put12(opcode, operand);
  } else { // BIPUSH or NEWARRAY
    code.put11(opcode, operand);
  }
}
origin: com.sun.jersey/jersey-server

code.put12(opcode, i.index);
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

@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

    i.intVal = argSize;
  code.put12(Opcodes.INVOKEINTERFACE, i.index).put11(argSize >> 2, 0);
} else {
  code.put12(opcode, i.index);
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

/**
 * Adds a string to the constant pool of the class being build. Does nothing
 * if the constant pool already contains a similar item.
 *
 * @param value
 *            the String value.
 * @return a new or already existing string item.
 */
private Item newString(final String value) {
  key2.set(STR, value, null, null);
  Item result = get(key2);
  if (result == null) {
    pool.put12(STR, newUTF8(value));
    result = new Item(index++, key2);
    put(result);
  }
  return result;
}
origin: com.sun.jersey/jersey-server

/**
 * Adds a class reference 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 internal name of the class.
 * @return a new or already existing class reference item.
 */
Item newClassItem(final String value) {
  key2.set(CLASS, value, null, null);
  Item result = get(key2);
  if (result == null) {
    pool.put12(CLASS, newUTF8(value));
    result = new Item(index++, key2);
    put(result);
  }
  return result;
}
origin: com.sun.jersey/jersey-server

/**
 * Adds a method type reference 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 methodDesc
 *            method descriptor of the method type.
 * @return a new or already existing method type reference item.
 */
Item newMethodTypeItem(final String methodDesc) {
  key2.set(MTYPE, methodDesc, null, null);
  Item result = get(key2);
  if (result == null) {
    pool.put12(MTYPE, newUTF8(methodDesc));
    result = new Item(index++, key2);
    put(result);
  }
  return result;
}
origin: com.sun.jersey/jersey-server

code.put12(Opcodes.INVOKEDYNAMIC, i.index);
code.putShort(0);
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

out.put12(typeRef >>> 24, (typeRef & 0xFFFF00) >> 8);
break;
origin: com.sun.jersey/jersey-server

  code.putByte(196 /* WIDE */).put12(opcode, var);
} else {
  code.put11(opcode, var);
origin: org.glassfish.jersey.core/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: org.glassfish.jersey.core/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);
}
jersey.repackaged.org.objectweb.asmByteVectorput12

Javadoc

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

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSystemService (Context)
  • setScale (BigDecimal)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • 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