KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gov > nasa > jpf > jvm > JPF_java_io_PrintStream


1 //
2
// Copyright (C) 2005 United States Government as represented by the
3
// Administrator of the National Aeronautics and Space Administration
4
// (NASA). All Rights Reserved.
5
//
6
// This software is distributed under the NASA Open Source Agreement
7
// (NOSA), version 1.3. The NOSA has been approved by the Open Source
8
// Initiative. See the file NOSA-1.3-JPF at the top of the distribution
9
// directory tree for the complete NOSA document.
10
//
11
// THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY
12
// KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
13
// LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO
14
// SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
15
// A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT
16
// THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT
17
// DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE.
18
//
19

20 package gov.nasa.jpf.jvm;
21
22 /**
23  * MJI NativePeer class for java.io.PrintStream library abstraction
24  */

25 class JPF_java_io_PrintStream {
26   
27   /****************************************************************************
28    * these are the native methods we intercept
29    */

30   
31   public static void print__C (MJIEnv env, int objref, char c) {
32     env.getVM().print(c);
33   }
34
35   public static void print__D (MJIEnv env, int objref, double d) {
36     env.getVM().print(d);
37   }
38
39   public static void print__F (MJIEnv env, int objref, float f) {
40     env.getVM().print(f);
41   }
42
43   public static void print__I (MJIEnv env, int objref, int i) {
44     env.getVM().print(i);
45   }
46
47   public static void print__J (MJIEnv env, int objref, long j) {
48     env.getVM().print(j);
49   }
50
51   public static void print__Ljava_lang_String_2 (MJIEnv env, int objRef,
52                                                  int strRef) {
53     env.getVM().print(env.getStringObject(strRef));
54   }
55
56   public static void print__Z (MJIEnv env, int objref, boolean z) {
57     env.getVM().print(z);
58   }
59
60   public static void println__ (MJIEnv env, int objRef) {
61     env.getVM().println();
62   }
63
64   public static void println__C (MJIEnv env, int objref, char c) {
65     env.getVM().print(c);
66     env.getVM().println();
67   }
68
69   public static void println__D (MJIEnv env, int objref, double d) {
70     env.getVM().print(d);
71     env.getVM().println();
72   }
73
74   public static void println__F (MJIEnv env, int objref, float f) {
75     env.getVM().print(f);
76     env.getVM().println();
77   }
78
79   public static void println__I (MJIEnv env, int objref, int i) {
80     env.getVM().print(i);
81     env.getVM().println();
82   }
83
84   public static void println__J (MJIEnv env, int objref, long j) {
85     env.getVM().print(j);
86     env.getVM().println();
87   }
88
89   public static void println__Ljava_lang_String_2 (MJIEnv env, int objRef,
90                                                    int strRef) {
91     env.getVM().println(env.getStringObject(strRef));
92   }
93
94   public static void println__Z (MJIEnv env, int objref, boolean z) {
95     env.getVM().print(z);
96     env.getVM().println();
97   }
98
99   public static void write__Ljava_lang_String_2 (MJIEnv env, int objref,
100                                                  int strRef) {
101     env.getVM().println(env.getStringObject(strRef));
102   }
103 }
104
Popular Tags