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

How to use
getTag
method
in
org.apache.bcel.classfile.Constant

Best Java code snippets using org.apache.bcel.classfile.Constant.getTag (Showing top 20 results out of 315)

origin: spotbugs/spotbugs

@Override
public void visitConstantPool(ConstantPool obj) {
  super.visitConstantPool(obj);
  Constant[] constant_pool = obj.getConstantPool();
  for (int i = 1; i < constant_pool.length; i++) {
    constant_pool[i].accept(this);
    byte tag = constant_pool[i].getTag();
    if ((tag == Const.CONSTANT_Double) || (tag == Const.CONSTANT_Long)) {
      i++;
    }
  }
}
origin: oracle/opengrok

String str;
int i, j, k;
byte tag = c.getTag();
origin: org.apache.bcel/bcel

/**
 * Dump constant package to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeShort(name_index);
}
origin: org.apache.bcel/bcel

/**
 * Dump String in Utf8 format to file stream.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeUTF(bytes);
}
origin: org.apache.bcel/bcel

/**
 * Dump constant field reference to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeShort(string_index);
}
origin: org.apache.bcel/bcel

/**
 * Dump name and signature index to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeShort(descriptor_index);
}
origin: org.apache.bcel/bcel

/**
 * Dumps constant class to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException if an I/O error occurs writing to the DataOutputStream.
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeShort(name_index);
}
origin: org.apache.bcel/bcel

/**
 * Dump constant float to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeFloat(bytes);
}
origin: org.apache.bcel/bcel

/**
 * Dump constant module to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeShort(name_index);
}
origin: org.apache.bcel/bcel

/**
 * Dump constant double to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeDouble(bytes);
}
origin: org.apache.bcel/bcel

/**
 * Dump constant integer to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeInt(bytes);
}
origin: org.apache.bcel/bcel

/**
 * Dump constant long to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeLong(bytes);
}
origin: org.apache.bcel/bcel

/**
 * Dump constant field reference to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeShort(class_index);
  file.writeShort(name_and_type_index);
}
origin: org.apache.bcel/bcel

/**
 * Dump name and signature index to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeShort(name_index);
  file.writeShort(signature_index);
}
origin: org.apache.bcel/bcel

/**
 * Dump method kind and index to file stream in binary format.
 *
 * @param file Output file stream
 * @throws IOException
 */
@Override
public final void dump( final DataOutputStream file ) throws IOException {
  file.writeByte(super.getTag());
  file.writeByte(reference_kind);
  file.writeShort(reference_index);
}
origin: bcel/bcel

public Type getType(ConstantPoolGen cpg) {
 switch(cpg.getConstantPool().getConstant(index).getTag()) {
 case org.apache.bcel.Constants.CONSTANT_Long:   return Type.LONG;
 case org.apache.bcel.Constants.CONSTANT_Double: return Type.DOUBLE;
 default: // Never reached
  throw new RuntimeException("Unknown constant type " + opcode);
 }
}
origin: bcel/bcel

public Type getType(ConstantPoolGen cpg) {
 switch(cpg.getConstantPool().getConstant(index).getTag()) {
 case org.apache.bcel.Constants.CONSTANT_String:  return Type.STRING;
 case org.apache.bcel.Constants.CONSTANT_Float:   return Type.FLOAT;
 case org.apache.bcel.Constants.CONSTANT_Integer: return Type.INT;
 default: // Never reached
  throw new RuntimeException("Unknown or invalid constant type at " + index);
 }
}
origin: org.apache.bcel/bcel

@Override
public Type getType( final ConstantPoolGen cpg ) {
  switch (cpg.getConstantPool().getConstant(super.getIndex()).getTag()) {
    case org.apache.bcel.Const.CONSTANT_Long:
      return Type.LONG;
    case org.apache.bcel.Const.CONSTANT_Double:
      return Type.DOUBLE;
    default: // Never reached
      throw new RuntimeException("Unknown constant type " + super.getOpcode());
  }
}
origin: com.google.code.findbugs/findbugs

@Override
public void visitConstantPool(ConstantPool obj) {
  super.visitConstantPool(obj);
  Constant[] constant_pool = obj.getConstantPool();
  for (int i = 1; i < constant_pool.length; i++) {
    constant_pool[i].accept(this);
    byte tag = constant_pool[i].getTag();
    if ((tag == CONSTANT_Double) || (tag == CONSTANT_Long)) {
      i++;
    }
  }
}
origin: org.apache.bcel/bcel

public Number getValue( final ConstantPoolGen cpg ) {
  final org.apache.bcel.classfile.Constant c = cpg.getConstantPool().getConstant(super.getIndex());
  switch (c.getTag()) {
    case org.apache.bcel.Const.CONSTANT_Long:
      return Long.valueOf(((org.apache.bcel.classfile.ConstantLong) c).getBytes());
    case org.apache.bcel.Const.CONSTANT_Double:
      return new Double(((org.apache.bcel.classfile.ConstantDouble) c).getBytes());
    default: // Never reached
      throw new RuntimeException("Unknown or invalid constant type at " + super.getIndex());
  }
}
org.apache.bcel.classfileConstantgetTag

Popular methods of Constant

  • accept
    Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a
  • copy
  • dump
  • readConstant
    Read one constant from the given file, the type depends on a tag byte.
  • toString

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • String (java.lang)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 17 Plugins for Android Studio
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