|
|||||||||
| 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)
|
MethodInstance |
flags(Flags flags)
Non-destructive updates. |
MethodInstance |
formalTypes(java.util.List l)
|
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)
|
MethodInstance |
orig()
|
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. |
MethodInstance |
returnType(Type returnType)
|
void |
setName(java.lang.String name)
Destructively set the method's name. |
MethodInstance |
throwTypes(java.util.List l)
|
| Methods inherited from interface polyglot.types.FunctionInstance |
|---|
returnType, setReturnType |
| Methods inherited from interface polyglot.types.ProcedureInstance |
|---|
callValid, callValidImpl, designator, formalTypes, hasFormals, hasFormalsImpl, moreSpecific, moreSpecificImpl, setFormalTypes, setThrowTypes, signature, throwsSubset, throwsSubsetImpl, throwTypes |
| Methods inherited from interface polyglot.types.CodeInstance |
|---|
flags |
| Methods inherited from interface polyglot.types.TypeObject |
|---|
equalsImpl, isCanonical, position, typeSystem |
| Methods inherited from interface polyglot.util.Copy |
|---|
copy |
| Methods inherited from interface polyglot.types.MemberInstance |
|---|
container, flags, setContainer, setFlags |
| Methods inherited from interface polyglot.types.Declaration |
|---|
declaration, setDeclaration |
| Method Detail |
|---|
java.lang.String name()
void setName(java.lang.String name)
name - MethodInstance flags(Flags flags)
MethodInstance name(java.lang.String name)
MethodInstance returnType(Type returnType)
MethodInstance formalTypes(java.util.List l)
MethodInstance throwTypes(java.util.List l)
MethodInstance container(ReferenceType container)
MethodInstance orig()
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 | ||||||||