|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.taskdefs.optional.sitraka.bytecode.Utils
Utilities mostly to manipulate methods and access flags.
Field Summary | |
static short |
ACC_ABSTRACT
abstract access flag |
static short |
ACC_FINAL
final access flag |
static short |
ACC_INTERFACE
interface access flag |
static short |
ACC_NATIVE
native access flag |
static short |
ACC_PRIVATE
private access flag |
static short |
ACC_PROTECTED
protected access flag |
static short |
ACC_PUBLIC
public access flag |
static short |
ACC_STATIC
static access flag |
static short |
ACC_STRICT
strict access flag |
static short |
ACC_SUPER
super access flag |
static short |
ACC_SYNCHRONIZED
synchronized access flag |
static short |
ACC_TRANSIENT
transient access flag |
static short |
ACC_VOLATILE
volatile access flag |
Method Summary | |
static int |
descriptor2java(java.lang.String descriptor,
int i,
java.lang.StringBuffer sb)
Parse a single descriptor symbol and returns it java equivalent. |
static java.lang.String |
getClassAccess(int access_flags)
return the class access flag as java modifiers |
static java.lang.String |
getFieldAccess(int access_flags)
return the field access flag as java modifiers |
static java.lang.String |
getMethodAccess(int access_flags)
return the method access flag as java modifiers |
static java.lang.String[] |
getMethodParams(java.lang.String descriptor)
parse all parameters from a descritor into fields of java name. |
static java.lang.String |
getMethodReturnType(java.lang.String descriptor)
return the object type of a return type. |
static java.lang.String |
getUTF8Value(ConstantPool pool,
int index)
return an UTF8 value from the pool located a a specific index. |
static boolean |
isAbstract(int access_flags)
check for abstract access |
static boolean |
isClass(int access_flags)
check for class access |
static boolean |
isFinal(int access_flags)
chck for final flag |
static boolean |
isInterface(int access_flags)
check for interface access |
static boolean |
isNative(int access_flags)
check for native access |
static boolean |
isPrivate(int access_flags)
check for private access |
static boolean |
isProtected(int access_flags)
check for protected flag |
static boolean |
isPublic(int access_flags)
check for public access |
static boolean |
isStatic(int access_flags)
check for a static access |
static boolean |
isStrict(int access_flags)
check for strict access |
static boolean |
isSuper(int access_flags)
check for super flag |
static boolean |
isSynchronized(int access_flags)
check for synchronized flag |
static boolean |
isTransient(int access_flags)
check for transient flag |
static boolean |
isVolatile(int access_flags)
check for volatile flag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short ACC_PUBLIC
public static final short ACC_PRIVATE
public static final short ACC_PROTECTED
public static final short ACC_STATIC
public static final short ACC_FINAL
public static final short ACC_SUPER
public static final short ACC_SYNCHRONIZED
public static final short ACC_VOLATILE
public static final short ACC_TRANSIENT
public static final short ACC_NATIVE
public static final short ACC_INTERFACE
public static final short ACC_ABSTRACT
public static final short ACC_STRICT
Method Detail |
public static java.lang.String getUTF8Value(ConstantPool pool, int index)
pool
- the constant pool to look atindex
- index of the UTF8 value in the constant pool
java.lang.ClassCastException
- if the index is not an UTF8 constant.public static java.lang.String[] getMethodParams(java.lang.String descriptor)
descriptor
- of a method.
public static java.lang.String getMethodReturnType(java.lang.String descriptor)
descriptor
-
public static int descriptor2java(java.lang.String descriptor, int i, java.lang.StringBuffer sb)
descriptor
- the descriptor symbol.i
- the index to look at the symbol in the descriptor stringsb
- the stringbuffer to return the java equivalent of the symbol
public static boolean isAbstract(int access_flags)
access_flags
- access flagspublic static boolean isPublic(int access_flags)
access_flags
- access flagspublic static boolean isStatic(int access_flags)
access_flags
- access flagspublic static boolean isNative(int access_flags)
access_flags
- access flagspublic static boolean isClass(int access_flags)
access_flags
- access flagspublic static boolean isStrict(int access_flags)
access_flags
- access flagspublic static boolean isInterface(int access_flags)
access_flags
- access flagspublic static boolean isPrivate(int access_flags)
access_flags
- access flagspublic static boolean isTransient(int access_flags)
access_flags
- access flagspublic static boolean isVolatile(int access_flags)
access_flags
- access flagspublic static boolean isSuper(int access_flags)
access_flags
- access flagpublic static boolean isProtected(int access_flags)
access_flags
- access flagspublic static boolean isFinal(int access_flags)
access_flags
- access flagspublic static boolean isSynchronized(int access_flags)
access_flags
- access flagspublic static java.lang.String getMethodAccess(int access_flags)
access_flags
- access flags
public static java.lang.String getFieldAccess(int access_flags)
access_flags
- access flags
public static java.lang.String getClassAccess(int access_flags)
access_flags
- access flags
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |