|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MethodInstance
A MethodInstance represents the type information for a Java
method.
| Method Summary | |
|---|---|
boolean |
canOverride(MethodInstance mi)
Return true if this method can override mi, false otherwise. |
boolean |
canOverrideImpl(MethodInstance mi,
boolean quiet)
Return true if this method can override mi. |
void |
checkOverride(MethodInstance mi)
Return true if this method can override mi, throws
a SemanticException otherwise. |
MethodInstance |
container(ReferenceType container)
Set the method's containing type. |
MethodInstance |
flags(Flags flags)
Set the method's flags. |
MethodInstance |
formalTypes(java.util.List l)
Set the method's formal parameter types. |
java.util.List |
implemented()
Get the set of methods this method implements. |
java.util.List |
implementedImpl(ReferenceType rt)
Get the set of methods in rt and its superinterfaces that this method implements. |
boolean |
isSameMethod(MethodInstance mi)
Return true if this method has the same signature as mi. |
boolean |
isSameMethodImpl(MethodInstance mi)
Return true if this method has the same signature as mi. |
boolean |
methodCallValid(java.lang.String name,
java.util.List actualTypes)
Return true if this method can be called with name name
and actual parameters of types actualTypes. |
boolean |
methodCallValidImpl(java.lang.String name,
java.util.List actualTypes)
Return true if this method can be called with name name
and actual parameters of types actualTypes. |
java.lang.String |
name()
The method's name. |
MethodInstance |
name(java.lang.String name)
Set the method's name. |
java.util.List |
overrides()
Get the list of methods this method (potentially) overrides, in order from this class (i.e., including this) to super classes. |
java.util.List |
overridesImpl()
Get the list of methods this method (potentially) overrides, in order from this class (i.e., including this) to super classes. |
Type |
returnType()
The method's return type. |
MethodInstance |
returnType(Type returnType)
Set the method's return type. |
MethodInstance |
throwTypes(java.util.List l)
Set the method's exception throw types. |
| Methods inherited from interface polyglot.types.ProcedureInstance |
|---|
callValid, callValidImpl, designator, formalTypes, hasFormals, hasFormalsImpl, moreSpecific, moreSpecificImpl, signature, throwsSubset, throwsSubsetImpl, throwTypes |
| Methods inherited from interface polyglot.types.MemberInstance |
|---|
container, flags |
| Methods inherited from interface polyglot.types.TypeObject |
|---|
equalsImpl, isCanonical, position, typeSystem |
| Methods inherited from interface polyglot.util.Copy |
|---|
copy |
| Method Detail |
|---|
Type returnType()
MethodInstance returnType(Type returnType)
java.lang.String name()
MethodInstance name(java.lang.String name)
MethodInstance flags(Flags flags)
MethodInstance formalTypes(java.util.List l)
l - A list of Type.TypeMethodInstance throwTypes(java.util.List l)
l - A list of Type.TypeMethodInstance container(ReferenceType container)
java.util.List overrides()
this) to super classes.
MethodInstance, starting with
this. Note that this list does not include methods declared
in interfaces. Use implemented for that.MethodInstanceboolean canOverride(MethodInstance mi)
mi, false otherwise.
void checkOverride(MethodInstance mi)
throws SemanticException
mi, throws
a SemanticException otherwise.
SemanticExceptionjava.util.List implemented()
boolean isSameMethod(MethodInstance mi)
mi.
boolean methodCallValid(java.lang.String name,
java.util.List actualTypes)
name
and actual parameters of types actualTypes.
name - The method to call.actualTypes - A list of argument types of type Type.Typejava.util.List overridesImpl()
this) to super classes.
This method should not be called except by TypeSystem
and by subclasses.
MethodInstance, starting with
this.MethodInstance
boolean canOverrideImpl(MethodInstance mi,
boolean quiet)
throws SemanticException
mi.
This method should not be called except by TypeSystem
and by subclasses.
If quiet is true and this method cannot override mi, then
false is returned; otherwise, if quiet is false and this method cannot
override mi, then a SemanticException is thrown.
SemanticExceptionjava.util.List implementedImpl(ReferenceType rt)
rt - The point in the type hierarchy to begin looking for methods.
boolean isSameMethodImpl(MethodInstance mi)
mi.
This method should not be called except by TypeSystem
and by subclasses.
boolean methodCallValidImpl(java.lang.String name,
java.util.List actualTypes)
name
and actual parameters of types actualTypes.
This method should not be called except by TypeSystem
and by subclasses.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||