Package com.intellij.util.cls
Class ClsUtil
- java.lang.Object
-
- com.intellij.util.cls.ClsUtil
-
public class ClsUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intACC_ABSTRACTstatic intACC_ANNOTATIONstatic intACC_BRIDGEstatic intACC_CLASS_MASKMask of access_flags that are meaningful in .class file format (VM Spec 4.1)static intACC_ENUMstatic intACC_FIELD_MASKstatic intACC_FINALstatic intACC_INTERFACEstatic intACC_METHOD_MASKstatic intACC_NATIVEstatic intACC_PRIVATEstatic intACC_PROTECTEDstatic intACC_PUBLICstatic intACC_STATICstatic intACC_SYNCHRONIZEDstatic intACC_SYNTHETICstatic intACC_TRANSIENTstatic intACC_VARARGSstatic intACC_VOLATILEstatic intCONSTANT_Classstatic intCONSTANT_Doublestatic intCONSTANT_Fieldrefstatic intCONSTANT_Floatstatic intCONSTANT_Integerstatic intCONSTANT_InterfaceMethodrefstatic intCONSTANT_Longstatic intCONSTANT_Methodrefstatic intCONSTANT_NameAndTypestatic intCONSTANT_Stringstatic intCONSTANT_Utf8static intMAGIC
-
Constructor Summary
Constructors Constructor Description ClsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringconvertClassName(String internalClassName, boolean convertSlashesToDots)static intgetTypeEndOffset(byte[] data, int startOffset)static StringgetTypeText(byte[] data, int offset)static booleanisAbstract(int flags)static booleanisAnnotation(int flags)static booleanisBridge(int flags)static booleanisFinal(int flags)static booleanisPackageLocal(int flags)static booleanisPrivate(int flags)static booleanisProtected(int flags)static booleanisPublic(int flags)static booleanisStatic(int flags)static booleanisSynthetic(int flags)static StringliteralToString(CharSequence value, char quote)static doublereadDouble(BytePointer ptr)static floatreadFloat(BytePointer ptr)static intreadU1(BytePointer ptr)static intreadU2(BytePointer ptr)static intreadU4(BytePointer ptr)static longreadU8(BytePointer ptr)static StringreadUtf8Info(byte[] bytes, int startOffset)static StringreadUtf8Info(BytePointer ptr)static StringreadUtf8Info(BytePointer ptr, int oldChar, int newChar)static voidskipAttribute(BytePointer ptr)static voidskipAttributes(BytePointer ptr)
-
-
-
Field Detail
-
MAGIC
public static final int MAGIC
- See Also:
- Constant Field Values
-
CONSTANT_Class
public static final int CONSTANT_Class
- See Also:
- Constant Field Values
-
CONSTANT_Fieldref
public static final int CONSTANT_Fieldref
- See Also:
- Constant Field Values
-
CONSTANT_Methodref
public static final int CONSTANT_Methodref
- See Also:
- Constant Field Values
-
CONSTANT_InterfaceMethodref
public static final int CONSTANT_InterfaceMethodref
- See Also:
- Constant Field Values
-
CONSTANT_String
public static final int CONSTANT_String
- See Also:
- Constant Field Values
-
CONSTANT_Integer
public static final int CONSTANT_Integer
- See Also:
- Constant Field Values
-
CONSTANT_Float
public static final int CONSTANT_Float
- See Also:
- Constant Field Values
-
CONSTANT_Long
public static final int CONSTANT_Long
- See Also:
- Constant Field Values
-
CONSTANT_Double
public static final int CONSTANT_Double
- See Also:
- Constant Field Values
-
CONSTANT_NameAndType
public static final int CONSTANT_NameAndType
- See Also:
- Constant Field Values
-
CONSTANT_Utf8
public static final int CONSTANT_Utf8
- See Also:
- Constant Field Values
-
ACC_PUBLIC
public static final int ACC_PUBLIC
- See Also:
- Constant Field Values
-
ACC_PRIVATE
public static final int ACC_PRIVATE
- See Also:
- Constant Field Values
-
ACC_PROTECTED
public static final int ACC_PROTECTED
- See Also:
- Constant Field Values
-
ACC_STATIC
public static final int ACC_STATIC
- See Also:
- Constant Field Values
-
ACC_FINAL
public static final int ACC_FINAL
- See Also:
- Constant Field Values
-
ACC_SYNCHRONIZED
public static final int ACC_SYNCHRONIZED
- See Also:
- Constant Field Values
-
ACC_BRIDGE
public static final int ACC_BRIDGE
- See Also:
- Constant Field Values
-
ACC_VARARGS
public static final int ACC_VARARGS
- See Also:
- Constant Field Values
-
ACC_VOLATILE
public static final int ACC_VOLATILE
- See Also:
- Constant Field Values
-
ACC_TRANSIENT
public static final int ACC_TRANSIENT
- See Also:
- Constant Field Values
-
ACC_NATIVE
public static final int ACC_NATIVE
- See Also:
- Constant Field Values
-
ACC_INTERFACE
public static final int ACC_INTERFACE
- See Also:
- Constant Field Values
-
ACC_ABSTRACT
public static final int ACC_ABSTRACT
- See Also:
- Constant Field Values
-
ACC_SYNTHETIC
public static final int ACC_SYNTHETIC
- See Also:
- Constant Field Values
-
ACC_ANNOTATION
public static final int ACC_ANNOTATION
- See Also:
- Constant Field Values
-
ACC_ENUM
public static final int ACC_ENUM
- See Also:
- Constant Field Values
-
ACC_CLASS_MASK
public static final int ACC_CLASS_MASK
Mask of access_flags that are meaningful in .class file format (VM Spec 4.1)- See Also:
- Constant Field Values
-
ACC_FIELD_MASK
public static final int ACC_FIELD_MASK
- See Also:
- Constant Field Values
-
ACC_METHOD_MASK
public static final int ACC_METHOD_MASK
- See Also:
- Constant Field Values
-
-
Method Detail
-
readU1
public static int readU1(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
readU2
public static int readU2(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
readU4
public static int readU4(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
readU8
public static long readU8(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
readUtf8Info
public static String readUtf8Info(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
readUtf8Info
public static String readUtf8Info(BytePointer ptr, int oldChar, int newChar) throws ClsFormatException
- Throws:
ClsFormatException
-
readUtf8Info
public static String readUtf8Info(byte[] bytes, int startOffset) throws ClsFormatException
- Throws:
ClsFormatException
-
readDouble
public static double readDouble(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
readFloat
public static float readFloat(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
skipAttribute
public static void skipAttribute(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
skipAttributes
public static void skipAttributes(BytePointer ptr) throws ClsFormatException
- Throws:
ClsFormatException
-
getTypeText
public static String getTypeText(byte[] data, int offset) throws ClsFormatException
- Throws:
ClsFormatException
-
getTypeEndOffset
public static int getTypeEndOffset(byte[] data, int startOffset) throws ClsFormatException- Throws:
ClsFormatException
-
convertClassName
public static String convertClassName(String internalClassName, boolean convertSlashesToDots)
-
isPublic
public static boolean isPublic(int flags)
-
isProtected
public static boolean isProtected(int flags)
-
isPackageLocal
public static boolean isPackageLocal(int flags)
-
isPrivate
public static boolean isPrivate(int flags)
-
isAbstract
public static boolean isAbstract(int flags)
-
isBridge
public static boolean isBridge(int flags)
-
isSynthetic
public static boolean isSynthetic(int flags)
-
isAnnotation
public static boolean isAnnotation(int flags)
-
isFinal
public static boolean isFinal(int flags)
-
isStatic
public static boolean isStatic(int flags)
-
literalToString
public static String literalToString(CharSequence value, char quote)
-
-