Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

JavaLangLongReflection.java

00001 package gov.nasa.arc.ase.jpf.jvm.reflection;
00002 
00003 import gov.nasa.arc.ase.jpf.jvm.*;
00004 import gov.nasa.arc.ase.jpf.jvm.bytecode.Instruction;
00005 
00006 public class JavaLangLongReflection extends Reflection {
00007   public Instruction executeStaticMethod(MethodInfo mi) {
00008     String name = mi.getFullName();
00009 
00010     if(name.equals("<clinit>()V")) {
00011       setLongStaticField("MIN_VALUE", Long.MIN_VALUE);
00012       setLongStaticField("MAX_VALUE", Long.MAX_VALUE);
00013       setObjectStaticField("TYPE", null); // temporary
00014 
00015       return exit();
00016     }
00017 
00018     if(name.equals("toString(JI)Ljava/lang/String;")) {
00019       return exitReference(
00020       da.newString(
00021         Long.toString(
00022           getLongArgument(0),
00023           getIntArgument(1)),
00024         th));
00025     }
00026 
00027     if(name.equals("toBinaryString(J)Ljava/lang/String;")) {
00028       return exitReference(
00029       da.newString(
00030         Long.toBinaryString(
00031           getLongArgument(0)),
00032         th));
00033     }
00034 
00035     if(name.equals("toOctalString(J)Ljava/lang/String;")) {
00036       return exitReference(
00037       da.newString(
00038         Long.toOctalString(
00039           getLongArgument(0)),
00040         th));
00041     }
00042 
00043     if(name.equals("toHexString(J)Ljava/lang/String;")) {
00044       return exitReference(
00045       da.newString(
00046         Long.toHexString(
00047           getLongArgument(0)),
00048         th));
00049     }
00050 
00051     return super.executeStaticMethod(mi);
00052   }  
00053 }

Generated at Thu Feb 7 06:48:18 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001