|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.Member
org.multijava.util.classfile.ClassInfo
VMS 4.1 Class File This is the place where all information about the class defined by this class file resides.
| Field Summary | |
protected AttributeList |
attributes
|
private FieldInfo[] |
fields
|
private ClassConstant[] |
interfaces
|
private int |
majorVersion
|
private MethodInfo[] |
methods
|
private int |
minorVersion
|
private File |
sourceFile
|
private ClassConstant |
superClass
|
private ClassConstant |
thisClass
|
| Fields inherited from class org.multijava.util.classfile.Member |
|
| Constructor Summary | |
|
ClassInfo(DataInput in,
boolean interfaceOnly)
|
protected |
ClassInfo(DataInput in,
boolean interfaceOnly,
ClassInfoCreator cr)
Constructs a class info structure from a class file |
|
ClassInfo(short modifiers,
String thisClass,
String superClass,
String genericSignature,
ArrayList interfaces,
ArrayList fields,
ArrayList methods,
InnerClassInfo[] innerClasses,
AttributeList attributes,
File sourceFile,
boolean deprecated)
Constructs a new class info structure from source. |
|
ClassInfo(short modifiers,
String thisClass,
String superClass,
String genericSignature,
ClassConstant[] interfaces,
FieldInfo[] fields,
MethodInfo[] methods,
InnerClassInfo[] innerClasses,
AttributeList attributes,
File sourceFile,
boolean deprecated)
Constructs a new class info structure from source. |
| Method Summary | |
protected File |
createOutputFile(File dir,
String className)
Creates an output file. |
MultimethodInfo[] |
getExternalMethods()
Returns the method infos for the external methods of this. |
FieldInfo[] |
getFields()
Returns the fields info of the class in the file |
String |
getGenericSignature()
|
InnerClassInfo[] |
getInnerClasses()
Returns the inner classes table of the class in the file |
String[] |
getInterfaces()
Returns the interfaces of the class in the file |
int |
getMajorVersion()
Returns the version of the class in the file |
MethodInfo[] |
getMethods()
Returns the methods info of the class in the file |
int |
getMinorVersion()
Returns the version of the class in the file |
MethodInfo[] |
getMultimethods()
Returns the method infos of the class but with synthetic multimethod and redirector bodies and external methods removed and internal multimethod signatures added. |
String |
getName()
Returns the name of the this class (fully qualified) |
String |
getSignature()
Returns the type of the this field |
String |
getSuperClass()
Returns the super class of the class in the file |
String |
getUniverseVersion()
Return the version of the encoding for the universe modifiers in the universe attributes or annotations. |
boolean |
hasUniverseRuntimeSupport()
Return true if this class was compiled with universe run-time support enabled. |
boolean |
isAnchor()
Returns true if the class is an anchor class for an external generic function. |
boolean |
isDeprecated()
Returns true if the field is deprecated |
private static FieldInfo[] |
makeFieldInfoArray(ArrayList vector)
|
private static ClassConstant[] |
makeInterfacesArray(ArrayList vector)
|
private static MethodInfo[] |
makeMethodInfoArray(ArrayList vector)
|
private ConstantPool |
resolveConstants()
Create a constant pool and insert in it all constants from from all the element of the class (fields, method, attributes, ...) |
void |
setDeprecated(boolean deprecated)
Sets the deprecated attribute of this field |
void |
setFields(FieldInfo[] fields)
Sets the fields info of the class in the file |
void |
setGenericSignature(String type)
|
void |
setInnerClasses(InnerClassInfo[] inners)
Sets the inner classes table of the class in the file |
void |
setInterfaces(String[] interfaces)
Sets the interfaces of the class in the file |
void |
setMajorVersion(int majorVersion)
Sets the version of the class in the file |
void |
setMethods(MethodInfo[] methods)
Sets the methods info of the class in the file |
void |
setMinor(int minorVersion)
Sets the version of the class in the file |
void |
setName(String name)
Sets the name of the this field (fully qualified) |
void |
setSuperClass(String superClass)
Sets the super class of the class in the file |
File |
sourceFile()
Returns the source file of the class in the file, or null if the actual source file is unknown. |
String |
sourceFileName()
Returns the short name of the source file as stored in the attributes of this. |
void |
write(DataOutput out)
Writes the content of the class to the specified output stream |
void |
write(Destination dest)
Writes the contents of the class to a file. |
| Methods inherited from class org.multijava.util.classfile.Member |
compareTo, equals, getModifiers, hashCode, setModifiers, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private int majorVersion
private int minorVersion
private ClassConstant thisClass
private ClassConstant superClass
private ClassConstant[] interfaces
private FieldInfo[] fields
private MethodInfo[] methods
protected AttributeList attributes
private final File sourceFile
| Constructor Detail |
public ClassInfo(short modifiers,
String thisClass,
String superClass,
String genericSignature,
ArrayList interfaces,
ArrayList fields,
ArrayList methods,
InnerClassInfo[] innerClasses,
AttributeList attributes,
File sourceFile,
boolean deprecated)
modifiers - access permission to and properties of this classthisClass - the class or interface defined by this class filesuperClass - the superclass of this classinterfaces - the interfaces implemented by this classfields - the fields which are members of this classmethods - the methods which are members of this classinnerClasses - the inner classes which are members of this classattributes - a list of the additional custom attributes for
the classinfo, or null if none. This reference
is captured.sourceFile - the source filedeprecated - is this class deprecated ?
public ClassInfo(short modifiers,
String thisClass,
String superClass,
String genericSignature,
ClassConstant[] interfaces,
FieldInfo[] fields,
MethodInfo[] methods,
InnerClassInfo[] innerClasses,
AttributeList attributes,
File sourceFile,
boolean deprecated)
modifiers - access permission to and properties of this classthisClass - the class or interface defined by this class filesuperClass - the superclass of this classinterfaces - the interfaces implemented by this classfields - the fields which are members of this classmethods - the methods which are members of this classinnerClasses - the inner classes which are members of this classattributes - a list of the additional custom attributes for
the classinfo, or null if none. This reference is
captured.sourceFile - the source filedeprecated - is this class deprecated ?
public ClassInfo(DataInput in,
boolean interfaceOnly)
throws IOException,
ClassFileFormatException
IOException
ClassFileFormatException
protected ClassInfo(DataInput in,
boolean interfaceOnly,
ClassInfoCreator cr)
throws IOException,
ClassFileFormatException
in - the stream to read the class frominterfaceOnly - load only the interface, not the source code
IOException - an io problem has occured
ClassFileFormatException - attempt to
write a bad classfile info| Method Detail |
public String getName()
public String getGenericSignature()
public void setGenericSignature(String type)
public void setName(String name)
public String getSignature()
public String getSuperClass()
public void setSuperClass(String superClass)
public int getMajorVersion()
public void setMajorVersion(int majorVersion)
public int getMinorVersion()
public void setMinor(int minorVersion)
public InnerClassInfo[] getInnerClasses()
public void setInnerClasses(InnerClassInfo[] inners)
public File sourceFile()
sourceFileName()public String sourceFileName()
public String getUniverseVersion()
public boolean hasUniverseRuntimeSupport()
public boolean isDeprecated()
public void setDeprecated(boolean deprecated)
public String[] getInterfaces()
public void setInterfaces(String[] interfaces)
public FieldInfo[] getFields()
public void setFields(FieldInfo[] fields)
public MethodInfo[] getMethods()
public void setMethods(MethodInfo[] methods)
public MethodInfo[] getMultimethods()
public MultimethodInfo[] getExternalMethods()
public boolean isAnchor()
public void write(DataOutput out)
throws IOException,
ClassFileFormatException
out - the stream to write to
IOException - an io problem has occured
ClassFileFormatException - attempt to write a bad classfile info
public void write(Destination dest)
throws IOException,
ClassFileFormatException
dest - the directory to write the .class file to,
if the directory doesn't exist it will be
created
IOException - an io problem occured
ClassFileFormatException - attempt to write a bad
classfile info
protected File createOutputFile(File dir,
String className)
private ConstantPool resolveConstants()
throws ClassFileFormatException
ClassFileFormatExceptionprivate static FieldInfo[] makeFieldInfoArray(ArrayList vector)
private static MethodInfo[] makeMethodInfoArray(ArrayList vector)
private static ClassConstant[] makeInterfacesArray(ArrayList vector)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||