Static Public Member Functions | |
static boolean | isPrimitive (Class<?> cls) |
static InstanceDomain | findDomain (final Class<?> cls, final ForgeProgram program) |
static GlobalVariable | findGlobalVar (String varName, ForgeProgram program) |
static InstanceLiteral | findLiteral (final String litName, final ForgeProgram program) |
static ForgeDomain | getArrayDomain (ForgeVariable g) |
static String | getArrayType (final ForgeVariable var) |
static Class<?> | classForName (final String clsName) throws ClassNotFoundException |
static Annotation[] | getMethodAnnotations (String className, String methodName, Class<?>[] parameterTypes) |
static boolean | boolValue (ForgeConstant fConst) |
static int | intValue (ForgeConstant fConst) |
static String | getMethodParamName (Method method, int i) |
static void | writeToFile (String text, String fileName) |
Various static utility methods
Definition at line 34 of file Utils.java.
static boolean edu.mit.csail.sdg.squander.utils.Utils.boolValue | ( | ForgeConstant | fConst | ) | [static] |
Definition at line 215 of file Utils.java.
static Class<?> edu.mit.csail.sdg.squander.utils.Utils.classForName | ( | final String | clsName | ) | throws ClassNotFoundException [static] |
Definition at line 142 of file Utils.java.
static InstanceDomain edu.mit.csail.sdg.squander.utils.Utils.findDomain | ( | final Class<?> | cls, | |
final ForgeProgram | program | |||
) | [static] |
Linearly searches through all instance domain in order to find one with the given name.
NOTE: there should probably exist a better (and more efficient) way to do this.
Definition at line 56 of file Utils.java.
static GlobalVariable edu.mit.csail.sdg.squander.utils.Utils.findGlobalVar | ( | String | varName, | |
ForgeProgram | program | |||
) | [static] |
Linearly searches through all global variables in order to find one with the given name.
NOTE: there should probably exist a better (and more efficient) way to do this.
Definition at line 80 of file Utils.java.
static InstanceLiteral edu.mit.csail.sdg.squander.utils.Utils.findLiteral | ( | final String | litName, | |
final ForgeProgram | program | |||
) | [static] |
Linearly searches through all instance literals in order to find one with the given name.
NOTE: there should probably exist a better (and more efficient) way to do this.
Definition at line 96 of file Utils.java.
static ForgeDomain edu.mit.csail.sdg.squander.utils.Utils.getArrayDomain | ( | ForgeVariable | g | ) | [static] |
Checks whether the given global variable is array and if it is returns its array domain, otherwise returns null.
Definition at line 110 of file Utils.java.
static String edu.mit.csail.sdg.squander.utils.Utils.getArrayType | ( | final ForgeVariable | var | ) | [static] |
Definition at line 127 of file Utils.java.
static Annotation [] edu.mit.csail.sdg.squander.utils.Utils.getMethodAnnotations | ( | String | className, | |
String | methodName, | |||
Class<?>[] | parameterTypes | |||
) | [static] |
Finds the method in the given class with the given name and parameter types Returns all annotations on the given method
Definition at line 187 of file Utils.java.
static String edu.mit.csail.sdg.squander.utils.Utils.getMethodParamName | ( | Method | method, | |
int | i | |||
) | [static] |
Definition at line 227 of file Utils.java.
static int edu.mit.csail.sdg.squander.utils.Utils.intValue | ( | ForgeConstant | fConst | ) | [static] |
Definition at line 222 of file Utils.java.
static boolean edu.mit.csail.sdg.squander.utils.Utils.isPrimitive | ( | Class<?> | cls | ) | [static] |
Returns true if cls.isPrimitive()
is true, or if cls is equal to either Integer.class or Boolean.class
Definition at line 40 of file Utils.java.
static void edu.mit.csail.sdg.squander.utils.Utils.writeToFile | ( | String | text, | |
String | fileName | |||
) | [static] |
Definition at line 237 of file Utils.java.