public class JL5MethodInstance_c extends MethodInstance_c implements JL5MethodInstance
decl, name, returnType
container, flags, formalTypes, throwTypes
position, ts
Constructor and Description |
---|
JL5MethodInstance_c(JL5TypeSystem ts,
Position pos,
ReferenceType container,
Flags flags,
Type returnType,
java.lang.String name,
java.util.List<? extends Type> argTypes,
java.util.List<? extends Type> excTypes,
java.util.List<TypeVariable> typeParams) |
Modifier and Type | Method and Description |
---|---|
Annotations |
annotations()
Annotations on the declaration of this type.
|
boolean |
callValidImpl(java.util.List<? extends Type> argTypes)
Returns true if the procedure can be called with the given argument types.
|
boolean |
canOverrideImpl(MethodInstance mj_,
boolean quiet)
Return true if this method can override
mi . |
JL5Subst |
erasureSubst()
Returns a subst suitable for the erased type: the subst
maps any type variables to their erasure.
|
java.util.List<MethodInstance> |
implementedImpl(ReferenceType rt)
Get the set of methods in rt and its superinterfaces that
this method implements.
|
boolean |
isCanonical()
Return true if the type object contains no unknown/ambiguous types.
|
boolean |
isVariableArity() |
boolean |
moreSpecificImpl(ProcedureInstance p)
See JLS 3rd ed.
|
java.util.List<MethodInstance> |
overridesImpl()
Get the list of methods this method (potentially) overrides, in order
from this class (i.e., including
this ) to super classes. |
void |
setAnnotations(Annotations annotations) |
void |
setTypeParams(java.util.List<TypeVariable> typeParams) |
java.lang.String |
toString() |
java.util.List<TypeVariable> |
typeParams() |
canOverride, canOverrideImpl, checkOverride, container, declaration, designator, equalsImpl, flags, formalTypes, hashCode, implemented, implementedImplAux, isSameMethod, isSameMethodImpl, methodCallValid, methodCallValidImpl, name, name, orig, overrides, returnType, returnType, setDeclaration, setName, setReturnType, signature, throwTypes
callValid, container, flags, formalTypes, hasFormals, hasFormalsImpl, listIsCanonical, moreSpecific, setContainer, setFlags, setFormalTypes, setThrowTypes, throwsSubset, throwsSubsetImpl, throwTypes
copy, equals, position, typeSystem
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canOverride, checkOverride, container, flags, formalTypes, implemented, isSameMethod, isSameMethodImpl, methodCallValid, methodCallValidImpl, name, name, orig, overrides, returnType, setName, throwTypes
returnType, setReturnType
callValid, designator, formalTypes, hasFormals, hasFormalsImpl, moreSpecific, setFormalTypes, setThrowTypes, signature, throwsSubset, throwsSubsetImpl, throwTypes
flags
container, flags, setContainer, setFlags
declaration, setDeclaration
public JL5MethodInstance_c(JL5TypeSystem ts, Position pos, ReferenceType container, Flags flags, Type returnType, java.lang.String name, java.util.List<? extends Type> argTypes, java.util.List<? extends Type> excTypes, java.util.List<TypeVariable> typeParams)
public boolean isVariableArity()
isVariableArity
in interface JL5ProcedureInstance
public java.util.List<MethodInstance> overridesImpl()
MethodInstance
this
) to super classes.
This method should not be called except by TypeSystem
and by subclasses.overridesImpl
in interface MethodInstance
overridesImpl
in class MethodInstance_c
MethodInstance
, starting with
this
.MethodInstance
public java.util.List<MethodInstance> implementedImpl(ReferenceType rt)
MethodInstance
implementedImpl
in interface MethodInstance
implementedImpl
in class MethodInstance_c
rt
- The point in the type hierarchy to begin looking for methods.public boolean canOverrideImpl(MethodInstance mj_, boolean quiet) throws SemanticException
MethodInstance
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.canOverrideImpl
in interface MethodInstance
canOverrideImpl
in class MethodInstance_c
quiet
- If true, then no Semantic Exceptions will be thrown, and the
return value will be true or false. Otherwise, if the method
cannot override, then a SemanticException will be thrown, else
the method will return true.SemanticException
public boolean callValidImpl(java.util.List<? extends Type> argTypes)
ProcedureInstance
callValidImpl
in interface ProcedureInstance
callValidImpl
in class ProcedureInstance_c
public boolean moreSpecificImpl(ProcedureInstance p)
moreSpecificImpl
in interface ProcedureInstance
moreSpecificImpl
in class ProcedureInstance_c
public boolean isCanonical()
TypeObject
isCanonical
in interface TypeObject
isCanonical
in class MethodInstance_c
public void setTypeParams(java.util.List<TypeVariable> typeParams)
setTypeParams
in interface JL5ProcedureInstance
public java.util.List<TypeVariable> typeParams()
typeParams
in interface JL5ProcedureInstance
public JL5Subst erasureSubst()
JL5ProcedureInstance
erasureSubst
in interface JL5ProcedureInstance
public java.lang.String toString()
toString
in class MethodInstance_c
public Annotations annotations()
JL5ProcedureInstance
annotations
in interface JL5ProcedureInstance
public void setAnnotations(Annotations annotations)
setAnnotations
in interface JL5ProcedureInstance