View Javadoc

1   package com.tapina.robe.swi;
2   
3   import java.lang.reflect.Method;
4   
5   /***
6    * This class represents a standard RISC OS module.
7    */
8   public final class ColourTrans extends SWIHandler {
9       private static ColourTrans ourInstance;
10  
11      public synchronized static ColourTrans getInstance() {
12          if (ourInstance == null) {
13              ourInstance = new ColourTrans();
14          }
15          return ourInstance;
16      }
17  
18      private ColourTrans() {
19      }
20  
21      public static int getBase() {
22          return 0x40740;
23      }
24  
25      private static final String[] methodNames = new String[] {
26          "", "", "", "", "", "", "", "", // 0x43380
27          "", "", "", "", "", "", "", "", // 0x43388
28          "", "", "", "", "", "", "", "", // 0x43390
29          "", "", "", "", "", "", "", "", // 0x43398
30          "", "", "", "", "", "", "", "", // 0x433a0
31          "", "", "", "", "", "", "", "", // 0x433a8
32          "", "", "", "", "", "", "", "", // 0x433b0
33          "", "", "", "", "", "", "", "" // 0x433b8
34      };
35  
36      public static Method getMethod(Integer offset) throws NoSuchMethodException {
37          return getMethod(methodNames[offset.intValue()]);
38      }
39  
40      private static final Method getMethod(String name) throws NoSuchMethodException {
41          return ColourTrans.class.getMethod(name, METHOD_PARAMETERS);
42      }
43  }
44