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 ColourPicker extends SWIHandler {
9 private static ColourPicker ourInstance;
10
11 public synchronized static ColourPicker getInstance() {
12 if (ourInstance == null) {
13 ourInstance = new ColourPicker();
14 }
15 return ourInstance;
16 }
17
18 private ColourPicker() {
19 }
20
21 public static int getBase() {
22 return 0x47700;
23 }
24
25 private static final String[] methodNames = new String[] {
26 "", "", "", "", "", "", "", "",
27 "", "", "", "", "", "", "", "",
28 "", "", "", "", "", "", "", "",
29 "", "", "", "", "", "", "", "",
30 "", "", "", "", "", "", "", "",
31 "", "", "", "", "", "", "", "",
32 "", "", "", "", "", "", "", "",
33 "", "", "", "", "", "", "", ""
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 ColourPicker.class.getMethod(name, METHOD_PARAMETERS);
42 }
43 }
44