congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ClassWriter.newUTF8
Code IndexAdd Tabnine to your IDE (free)

How to use
newUTF8
method
in
jersey.repackaged.org.objectweb.asm.ClassWriter

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

Refine searchRefine arrow

  • ByteVector.putShort
  • ByteVector.<init>
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

@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 final void visitSource(final String file, final String debug) {
  if (file != null) {
    sourceFile = newUTF8(file);
  }
  if (debug != null) {
    sourceDebug = new ByteVector().encodeUTF8(debug, 0,
        Integer.MAX_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: org.glassfish.jersey.core/jersey-server

@Override
public final void visitSource(final String file, final String debug) {
  if (file != null) {
    sourceFile = newUTF8(file);
  }
  if (debug != null) {
    sourceDebug = new ByteVector().encodeUTF8(debug, 0,
        Integer.MAX_VALUE);
  }
}
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: org.glassfish.jersey.bundles/jaxrs-ri

@Override
public final void visitSource(final String file, final String debug) {
  if (file != null) {
    sourceFile = newUTF8(file);
  }
  if (debug != null) {
    sourceDebug = new ByteVector().encodeUTF8(debug, 0,
        Integer.MAX_VALUE);
  }
}
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

out.putShort(attributeCount);
if (value != 0) {
  out.putShort(cw.newUTF8("ConstantValue"));
  out.putInt(2).putShort(value);
  if ((cw.version & 0xFFFF) < Opcodes.V1_5
      || (access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) != 0) {
    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: eclipse-ee4j/jersey

@Override
public final void visitSource(final String file, final String debug) {
  if (file != null) {
    sourceFile = newUTF8(file);
  }
  if (debug != null) {
    sourceDebug = new ByteVector().encodeUTF8(debug, 0,
        Integer.MAX_VALUE);
  }
}
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

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: eclipse-ee4j/jersey

@Override
public final void visitSource(final String file, final String debug) {
  if (file != null) {
    sourceFile = newUTF8(file);
  }
  if (debug != null) {
    sourceDebug = new ByteVector().encodeUTF8(debug, 0,
        Integer.MAX_VALUE);
  }
}
origin: com.sun.jersey/jersey-server

@Override
public AnnotationVisitor visitTryCatchAnnotation(int typeRef,
    TypePath typePath, String desc, 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 = ctanns;
    ctanns = aw;
  } else {
    aw.next = ictanns;
    ictanns = aw;
  }
  return aw;
}
origin: com.sun.jersey/jersey-server

out.putShort(cw.newUTF8("Code")).putInt(size);
  out.putShort(cw.newUTF8("LocalVariableTable"));
  out.putShort(cw.newUTF8("LocalVariableTypeTable"));
  out.putShort(cw.newUTF8("LineNumberTable"));
  out.putShort(cw.newUTF8(zip ? "StackMapTable" : "StackMap"));
  out.putShort(cw.newUTF8("RuntimeVisibleTypeAnnotations"));
  ctanns.put(out);
  out.putShort(cw.newUTF8("RuntimeInvisibleTypeAnnotations"));
  ictanns.put(out);
out.putShort(cw.newUTF8("Exceptions")).putInt(
if ((cw.version & 0xFFFF) < Opcodes.V1_5
    || (access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) != 0) {
  out.putShort(cw.newUTF8("Synthetic")).putInt(0);
out.putShort(cw.newUTF8("Deprecated")).putInt(0);
out.putShort(cw.newUTF8("Signature")).putInt(2)
    .putShort(cw.newUTF8(signature));
out.putShort(cw.newUTF8("MethodParameters"));
out.putInt(methodParameters.length + 1).putByte(
origin: com.sun.jersey/jersey-bundle

@Override
public final void visitSource(final String file, final String debug) {
  if (file != null) {
    sourceFile = newUTF8(file);
  }
  if (debug != null) {
    sourceDebug = new ByteVector().encodeUTF8(debug, 0,
        Integer.MAX_VALUE);
  }
}
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.asmClassWriternewUTF8

Javadoc

Adds an UTF8 string to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.

Popular methods of ClassWriter

  • toByteArray
    Returns the bytecode of the class that was build with this class writer.
  • addType
    Adds the given Item to #typeTable.
  • addUninitializedType
    Adds the given "uninitialized" type to #typeTable and returns its index. This method is used for UNI
  • get
    Returns the constant pool's hash table item which is equal to the given item.
  • getCommonSuperClass
    Returns the common super type of the two given types. The default implementation of this method load
  • getMergedType
    Returns the index of the common super type of the two given types. This method calls #getCommonSuper
  • newClass
    Adds a class reference to the constant pool of the class being build. Does nothing if the constant p
  • newClassItem
    Adds a class reference to the constant pool of the class being build. Does nothing if the constant p
  • newConst
    Adds a number or string constant to the constant pool of the class being build. Does nothing if the
  • newConstItem
    Adds a number or string constant to the constant pool of the class being build. Does nothing if the
  • newDouble
    Adds a double to the constant pool of the class being build. Does nothing if the constant pool alrea
  • newField
    Adds a field reference to the constant pool of the class being build. Does nothing if the constant p
  • newDouble,
  • newField,
  • newFieldItem,
  • newFloat,
  • newHandle,
  • newHandleItem,
  • newInteger,
  • newInvokeDynamicItem,
  • newLong,
  • newMethod

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • setScale (BigDecimal)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now