Package jminusminus
Class CLFile
java.lang.Object
jminusminus.CLFile
This class provides a representation of the ClassFile structure.
-
Field Summary
Modifier and TypeFieldDescriptionint
ClassFile.access_flags item.ClassFile.attributes item.int
ClassFile.attributes_count item.ClassFile.constant_pool item.int
ClassFile.constant_pool_count item.ClassFile.fields item.int
ClassFile.fields_count item.ClassFile.interfaces item.int
ClassFile.interfaces_count item.long
ClassFile.magic item.int
ClassFile.major_version item.ClassFile.methods item.int
ClassFile.methods_count item.int
ClassFile.minor_version item.int
ClassFile.super_class item.int
ClassFile.this_class item. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
accessFlagToInt
(String accessFlag) Returns the integer value (mask) corresponding to the specified access flag.static String
fieldAccessFlagsToString
(int accessFlags) Returns a string identifying the field access permissions and properties contained in the specified mask of flags.static String
innerClassAccessFlagsToString
(int accessFlags) Returns a string identifying the inner class access permissions and properties contained in the specified mask of flags.static String
methodAccessFlagsToString
(int accessFlags) Returns a string identifying the method access permissions and properties contained in the specified mask of flags.void
write
(CLOutputStream out) Writes the contents of this class to the specified output stream.
-
Field Details
-
magic
public long magicClassFile.magic item. -
minorVersion
public int minorVersionClassFile.minor_version item. -
majorVersion
public int majorVersionClassFile.major_version item. -
constantPoolCount
public int constantPoolCountClassFile.constant_pool_count item. -
constantPool
ClassFile.constant_pool item. -
accessFlags
public int accessFlagsClassFile.access_flags item. -
thisClass
public int thisClassClassFile.this_class item. -
superClass
public int superClassClassFile.super_class item. -
interfacesCount
public int interfacesCountClassFile.interfaces_count item. -
interfaces
ClassFile.interfaces item. -
fieldsCount
public int fieldsCountClassFile.fields_count item. -
fields
ClassFile.fields item. -
methodsCount
public int methodsCountClassFile.methods_count item. -
methods
ClassFile.methods item. -
attributesCount
public int attributesCountClassFile.attributes_count item. -
attributes
ClassFile.attributes item.
-
-
Constructor Details
-
CLFile
CLFile()
-
-
Method Details
-
write
Writes the contents of this class to the specified output stream.- Parameters:
out
- output stream.- Throws:
IOException
- if an error occurs while writing.
-
innerClassAccessFlagsToString
Returns a string identifying the inner class access permissions and properties contained in the specified mask of flags.- Parameters:
accessFlags
- mask of access flags.- Returns:
- a string identifying the inner class access permissions and properties.
-
fieldAccessFlagsToString
Returns a string identifying the field access permissions and properties contained in the specified mask of flags.- Parameters:
accessFlags
- mask of access flags.- Returns:
- a string identifying the field access permissions and properties.
-
methodAccessFlagsToString
Returns a string identifying the method access permissions and properties contained in the specified mask of flags.- Parameters:
accessFlags
- mask of access flags.- Returns:
- a string identifying the method access permissions and properties.
-
accessFlagToInt
Returns the integer value (mask) corresponding to the specified access flag.- Parameters:
accessFlag
- access flag.- Returns:
- the integer value (mask) corresponding to the specified access flag.
-