Modifier and Type | Field and Description |
---|---|
static int |
ACC_ABSTRACT |
static int |
ACC_FINAL |
static int |
ACC_INTERFACE |
static int |
ACC_NATIVE |
static int |
ACC_PRIVATE |
static int |
ACC_PROTECTED |
static int |
ACC_PUBLIC |
static int |
ACC_STATIC |
static int |
ACC_STRICT |
static int |
ACC_SUPER |
static int |
ACC_SYNCHRONIZED |
static int |
ACC_TRANSIENT |
static int |
ACC_VOLATILE |
static CodeGenerator |
DO_NOTHING |
static CodeClass[] |
EMPTY_LIST |
static CodeClass |
TYPE_BOOLEAN |
static CodeClass |
TYPE_BYTE |
static CodeClass |
TYPE_CHAR |
static CodeClass |
TYPE_DOUBLE |
static CodeClass |
TYPE_FLOAT |
static CodeClass |
TYPE_INT |
static CodeClass |
TYPE_LONG |
static CodeClass |
TYPE_OBJECT |
static CodeClass |
TYPE_SHORT |
static CodeClass |
TYPE_VOID |
Constructor and Description |
---|
CodeUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
classListToString(CodeClass[] classes)
Format an array of classes as a comma-seperated list.
|
static boolean |
isFloatType(CodeClass cc)
Returns true if the class is a floating point number.
|
static boolean |
isIntegerType(CodeClass cc)
Returns true if the class is an integer number.
|
static int |
wordsForType(CodeClass cc)
Number of words needed for local variables of this type.
|
public static final int ACC_PUBLIC
public static final int ACC_PRIVATE
public static final int ACC_PROTECTED
public static final int ACC_STATIC
public static final int ACC_FINAL
public static final int ACC_SUPER
public static final int ACC_SYNCHRONIZED
public static final int ACC_VOLATILE
public static final int ACC_TRANSIENT
public static final int ACC_NATIVE
public static final int ACC_INTERFACE
public static final int ACC_ABSTRACT
public static final int ACC_STRICT
public static final CodeClass TYPE_FLOAT
public static final CodeClass TYPE_DOUBLE
public static final CodeClass TYPE_SHORT
public static final CodeClass TYPE_BOOLEAN
public static final CodeClass TYPE_OBJECT
public static final CodeClass[] EMPTY_LIST
public static final CodeGenerator DO_NOTHING
public CodeUtils()
public static String classListToString(CodeClass[] classes)
The names of each class in classes will be seperated by a comma and a space and will use CodeClass.getName() to produce strings for each one. Their names will be present in the return value in the same order they are found in the classes array
classes
- the array of classes to formatpublic static int wordsForType(CodeClass cc)
Longs and doubles require 2 words (64 bits), where as everything else needs 1 word (32 bits). Void needs no words. This just hides that knowledge.
cc
- the CodeClass to check word size forpublic static boolean isFloatType(CodeClass cc)
Double and Float are floating point numbers. All other classes are not.
cc
- the class to checkpublic static boolean isIntegerType(CodeClass cc)
All numeric types are integer (whole number) types, except for the floating point types. All other classes are not integer types.
cc
- the class to checkCopyright © 2014 BioJava. All rights reserved.