|
mjc | ||||||||||
| 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.MethodInfo
VMS 4.6: Methods Each method, and each (class or instance) initialization method is described by this structure.
| Field Summary | |
protected AttributeList |
attributes
|
private AsciiConstant |
name
|
private AsciiConstant |
type
|
| Fields inherited from class org.multijava.util.classfile.Member |
|
| Constructor Summary | |
MethodInfo(DataInput in,
ConstantPool cp,
boolean interfaceOnly)
Constructs a method entry from a class file stream |
|
MethodInfo(short modifiers,
String name,
String type,
String genericsignature,
String[] exceptions,
CodeInfo code,
boolean deprecated,
boolean synthetic)
Constructs a method entry |
|
| Method Summary | |
void |
addAttribute(Attribute attr)
Adds the given custom attribute to the attribute list of this, replacing any existing attribute of the same kind. |
private static boolean |
containsUniverseAnnotation(RuntimeVisibleAnnotationsAttribute attr)
Returns whether the given annotations attribute of the method contains Universe annotations for the purity or the return type of the method. |
private static boolean |
containsUniverseAnnotation(RuntimeVisibleParameterAnnotationsAttribute pattr)
Returns whether the given annotations attribute of the method contains Universe annotations for any of the parameter types. |
CodeInfo |
getCodeInfo()
Returns the code attribute associated with this method |
String[] |
getExceptions()
Returns the exceptions of this method |
String |
getGenericSignature()
|
String |
getName()
Returns the name of this method |
protected int |
getParameterCount()
Computes the number of parameters. |
String |
getSignature()
Returns the type of the this method |
CUniverseMethodAnnotation |
getUniverseAnnotation()
Return this method's universe annotation, or null if no annotation is present. |
boolean |
hasSyntheticReceiver()
Returns true if the method represented by this has a synthetic receiver parameter (in the first parameter position). |
boolean |
isDeprecated()
Returns true if the field is deprecated |
boolean |
isDispatcher()
Returns true if the method represented by this is a compiler-generated multimethod dispatcher. |
boolean |
isMultimethodBody()
Returns true if the method represented by this is a compiler-generated multimethod body. |
boolean |
isRedirector()
Returns true if the method represented by this is a compiler-generated pleomorphic method redirector. |
boolean |
isSynthetic()
Returns true if the field is synthetic |
void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool |
void |
setCodeInfo(CodeInfo info)
Sets the code attribute associated with this method |
void |
setDeprecated(boolean deprecated)
Sets the deprecated attribute of this field |
void |
setExceptions(String[] exceptions)
Sets the exceptions |
void |
setGenericSignature(String type)
|
void |
setName(String name)
Sets the name of the this method |
void |
setSignature(String type)
Returns the type of the this method |
void |
setSynthetic(boolean synthetic)
Returns true if the field is synthetic |
void |
write(ConstantPool cp,
DataOutput out)
Write this class into the the file (out) getting data position from the constant pool |
| 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 AsciiConstant name
private AsciiConstant type
protected final AttributeList attributes
| Constructor Detail |
public MethodInfo(short modifiers,
String name,
String type,
String genericsignature,
String[] exceptions,
CodeInfo code,
boolean deprecated,
boolean synthetic)
modifiers - access permission to and properties of the methodname - the simple name of the method (or type - the method signatureexceptions - the checked exceptions the method may throwcode - the virtual machine instructions and auxiliary infosdeprecated - is this method deprecated ?synthetic - is this method synthesized by the compiler ?
NOTE:
VMS 4.7.5: There must be exactly one Exceptions attribute in each method_info structure.
public MethodInfo(DataInput in,
ConstantPool cp,
boolean interfaceOnly)
throws IOException,
ClassFileFormatException
in - the stream to read fromcp - the constant poolinterfaceOnly - 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 void setName(String name)
public String getSignature()
public String getGenericSignature()
public void setGenericSignature(String type)
public void setSignature(String type)
public String[] getExceptions()
public void setExceptions(String[] exceptions)
public boolean isDeprecated()
public void setDeprecated(boolean deprecated)
public boolean isSynthetic()
public void setSynthetic(boolean synthetic)
public CodeInfo getCodeInfo()
public void setCodeInfo(CodeInfo info)
public boolean isMultimethodBody()
public boolean isDispatcher()
public boolean isRedirector()
public boolean hasSyntheticReceiver()
public CUniverseMethodAnnotation getUniverseAnnotation()
private static boolean containsUniverseAnnotation(RuntimeVisibleAnnotationsAttribute attr)
attr - The annotations attribute which may contain Universe
annotations.
private static boolean containsUniverseAnnotation(RuntimeVisibleParameterAnnotationsAttribute pattr)
pattr - The annotations attribute which may contain Universe
annotations.
public void addAttribute(Attribute attr)
public void resolveConstants(ConstantPool cp)
throws ClassFileFormatException
cp - the constant pool for this class
ClassFileFormatException
public void write(ConstantPool cp,
DataOutput out)
throws IOException,
ClassFileFormatException
cp - the constant pool that contain all dataout - the file where to write this object info
IOException - an io problem has occured
ClassFileFormatException - attempt to
write a bad classfile infoprotected int getParameterCount()
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||