KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > soot > jimple > toolkits > pointer > nativemethods > JavaLangStrictMathNative


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2003 Feng Qian
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20 /**
21  * Simulates the native method side effects in class java.lang.StrictMath
22  *
23  * @author Feng Qian
24  * @author <XXX>
25  */

26
27 package soot.jimple.toolkits.pointer.nativemethods;
28
29 import soot.*;
30 import soot.jimple.toolkits.pointer.representations.*;
31 import soot.jimple.toolkits.pointer.util.*;
32
33 public class JavaLangStrictMathNative extends NativeMethodClass {
34     public JavaLangStrictMathNative( NativeHelper helper ) { super(helper); }
35
36   /**
37    * Implements the abstract method simulateMethod.
38    * It distributes the request to the corresponding methods
39    * by signatures.
40    */

41   public void simulateMethod(SootMethod method,
42                  ReferenceVariable thisVar,
43                  ReferenceVariable returnVar,
44                  ReferenceVariable params[]){
45
46     String JavaDoc subSignature = method.getSubSignature();
47
48     {
49       defaultMethod(method, thisVar, returnVar, params);
50       return;
51
52     }
53   }
54   /************************* java.lang.StrictMath *******************/
55   /**
56    * Methods have no side effects.
57    *
58    * public static native strictfp double sin(double);
59    * public static native strictfp double cos(double);
60    * public static native strictfp double tan(double);
61    * public static native strictfp double asin(double);
62    * public static native strictfp double acos(double);
63    * public static native strictfp double atan(double);
64    * public static native strictfp double exp(double);
65    * public static native strictfp double log(double);
66    * public static native strictfp double sqrt(double);
67    * public static native strictfp double IEEEremainder(double, double);
68    * public static native strictfp double ceil(double);
69    * public static native strictfp double floor(double);
70    * public static native strictfp double rint(double);
71    * public static native strictfp double atan2(double, double);
72    * public static native strictfp double pow(double, double);
73    */

74 }
75
Popular Tags