All Downloads are FREE. Search and download functionalities are using the official Maven repository.

opu.lljvm-python.0.2.0-EXPERIMENTAL.source-code.FloatCP Maven / Gradle / Ivy

The newest version!
package jas;

import java.io.*;


/**
 * Wrap an Float constant reference with this CPE.
 *
 * @author $Author: jonmeyerny $
 * @version $Revision: 1.1 $
 */

public class FloatCP extends CP implements RuntimeConstants
{
  float val;

  /**
   * @param n Value for Float constant
   */
  public FloatCP(float n)
  {
    uniq = ("Float: @#$" + n).intern();
    val = n;
  }
  void resolve(ClassEnv e) { return; }
  void write(ClassEnv e, DataOutputStream out)
    throws IOException
  {
    out.writeByte(CONSTANT_FLOAT);
    out.writeFloat(val);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy