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 int
ACC_ABSTRACT
static int
ACC_ANNOTATION
static int
ACC_BRIDGE
static int
ACC_CLASS_MASK
Mask of access_flags that are meaningful in .class file format (VM Spec 4.1)static int
ACC_ENUM
static int
ACC_FIELD_MASK
static int
ACC_FINAL
static int
ACC_INTERFACE
static int
ACC_METHOD_MASK
static int
ACC_NATIVE
static int
ACC_PRIVATE
static int
ACC_PROTECTED
static int
ACC_PUBLIC
static int
ACC_STATIC
static int
ACC_SYNCHRONIZED
static int
ACC_SYNTHETIC
static int
ACC_TRANSIENT
static int
ACC_VARARGS
static int
ACC_VOLATILE
static int
CONSTANT_Class
static int
CONSTANT_Double
static int
CONSTANT_Fieldref
static int
CONSTANT_Float
static int
CONSTANT_Integer
static int
CONSTANT_InterfaceMethodref
static int
CONSTANT_Long
static int
CONSTANT_Methodref
static int
CONSTANT_NameAndType
static int
CONSTANT_String
static int
CONSTANT_Utf8
static int
MAGIC
-
Constructor Summary
Constructors Constructor Description ClsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
convertClassName(String internalClassName, boolean convertSlashesToDots)
static int
getTypeEndOffset(byte[] data, int startOffset)
static String
getTypeText(byte[] data, int offset)
static boolean
isAbstract(int flags)
static boolean
isAnnotation(int flags)
static boolean
isBridge(int flags)
static boolean
isFinal(int flags)
static boolean
isPackageLocal(int flags)
static boolean
isPrivate(int flags)
static boolean
isProtected(int flags)
static boolean
isPublic(int flags)
static boolean
isStatic(int flags)
static boolean
isSynthetic(int flags)
static String
literalToString(CharSequence value, char quote)
static double
readDouble(BytePointer ptr)
static float
readFloat(BytePointer ptr)
static int
readU1(BytePointer ptr)
static int
readU2(BytePointer ptr)
static int
readU4(BytePointer ptr)
static long
readU8(BytePointer ptr)
static String
readUtf8Info(byte[] bytes, int startOffset)
static String
readUtf8Info(BytePointer ptr)
static String
readUtf8Info(BytePointer ptr, int oldChar, int newChar)
static void
skipAttribute(BytePointer ptr)
static void
skipAttributes(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)
-
-