polyglot.ext.coffer.types
Class CofferMethodInstance_c

java.lang.Object
  extended by polyglot.types.TypeObject_c
      extended by polyglot.types.ProcedureInstance_c
          extended by polyglot.types.MethodInstance_c
              extended by polyglot.ext.coffer.types.CofferMethodInstance_c
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, CofferMethodInstance, CofferProcedureInstance, CodeInstance, Declaration, MemberInstance, MethodInstance, ProcedureInstance, TypeObject, Copy

public class CofferMethodInstance_c
extends MethodInstance_c
implements CofferMethodInstance

An implementation of the CofferMethodInstance interface.

See Also:
Serialized Form

Nested Class Summary
 class CofferMethodInstance_c.GetType
           
 
Field Summary
protected  KeySet entryKeys
           
protected  KeySet returnKeys
           
protected  java.util.List throwConstraints
           
 
Fields inherited from class polyglot.types.MethodInstance_c
name, returnType
 
Fields inherited from class polyglot.types.ProcedureInstance_c
container, decl, flags, formalTypes, throwTypes
 
Fields inherited from class polyglot.types.TypeObject_c
position, ts
 
Constructor Summary
CofferMethodInstance_c(CofferTypeSystem ts, Position pos, ReferenceType container, Flags flags, Type returnType, java.lang.String name, java.util.List argTypes, KeySet entryKeys, KeySet returnKeys, java.util.List throwConstraints)
           
 
Method Summary
 boolean canOverrideImpl(MethodInstance mj, boolean quiet)
          Return true if this method can override mi.
 KeySet entryKeys()
           
 boolean isCanonical()
          Return true if the type object contains no unknown/ambiguous types.
 KeySet returnKeys()
           
 void setEntryKeys(KeySet entryKeys)
           
 void setReturnKeys(KeySet returnKeys)
           
 void setThrowConstraints(java.util.List throwConstraints)
           
 void setThrowTypes(java.util.List throwTypes)
           
 java.util.List throwConstraints()
           
 java.util.List throwTypes()
          List of declared exception types thrown.
 java.lang.String toString()
           
 
Methods inherited from class polyglot.types.MethodInstance_c
canOverride, canOverrideImpl, checkOverride, container, designator, equalsImpl, flags, formalTypes, hashCode, implemented, implementedImpl, isSameMethod, isSameMethodImpl, methodCallValid, methodCallValidImpl, name, name, orig, overrides, overridesImpl, returnType, returnType, setName, setReturnType, signature, throwTypes
 
Methods inherited from class polyglot.types.ProcedureInstance_c
callValid, callValidImpl, container, declaration, flags, formalTypes, hasFormals, hasFormalsImpl, listIsCanonical, moreSpecific, moreSpecificImpl, setContainer, setDeclaration, setFlags, setFormalTypes, throwsSubset, throwsSubsetImpl
 
Methods inherited from class polyglot.types.TypeObject_c
copy, equals, position, typeSystem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.types.MethodInstance
canOverride, checkOverride, container, flags, formalTypes, implemented, implementedImpl, isSameMethod, isSameMethodImpl, methodCallValid, methodCallValidImpl, name, name, orig, overrides, overridesImpl, returnType, returnType, setName, setReturnType, throwTypes
 
Methods inherited from interface polyglot.types.ProcedureInstance
callValid, callValidImpl, designator, formalTypes, hasFormals, hasFormalsImpl, moreSpecific, moreSpecificImpl, setFormalTypes, signature, throwsSubset, throwsSubsetImpl
 
Methods inherited from interface polyglot.types.MemberInstance
container, flags, setContainer, setFlags
 
Methods inherited from interface polyglot.types.Declaration
declaration, setDeclaration
 
Methods inherited from interface polyglot.types.ProcedureInstance
callValid, callValidImpl, designator, formalTypes, hasFormals, hasFormalsImpl, moreSpecific, moreSpecificImpl, setFormalTypes, signature, throwsSubset, throwsSubsetImpl
 
Methods inherited from interface polyglot.types.MemberInstance
container, flags, setContainer, setFlags
 
Methods inherited from interface polyglot.types.Declaration
declaration, setDeclaration
 

Field Detail

entryKeys

protected KeySet entryKeys

returnKeys

protected KeySet returnKeys

throwConstraints

protected java.util.List throwConstraints
Constructor Detail

CofferMethodInstance_c

public CofferMethodInstance_c(CofferTypeSystem ts,
                              Position pos,
                              ReferenceType container,
                              Flags flags,
                              Type returnType,
                              java.lang.String name,
                              java.util.List argTypes,
                              KeySet entryKeys,
                              KeySet returnKeys,
                              java.util.List throwConstraints)
Method Detail

isCanonical

public boolean isCanonical()
Description copied from interface: TypeObject
Return true if the type object contains no unknown/ambiguous types.

Specified by:
isCanonical in interface TypeObject
Overrides:
isCanonical in class MethodInstance_c

entryKeys

public KeySet entryKeys()
Specified by:
entryKeys in interface CofferProcedureInstance

returnKeys

public KeySet returnKeys()
Specified by:
returnKeys in interface CofferProcedureInstance

throwConstraints

public java.util.List throwConstraints()
Specified by:
throwConstraints in interface CofferProcedureInstance

throwTypes

public java.util.List throwTypes()
Description copied from interface: ProcedureInstance
List of declared exception types thrown.

Specified by:
throwTypes in interface ProcedureInstance
Overrides:
throwTypes in class ProcedureInstance_c
Returns:
A list of Type.
See Also:
Type

setThrowTypes

public void setThrowTypes(java.util.List throwTypes)
Specified by:
setThrowTypes in interface ProcedureInstance
Overrides:
setThrowTypes in class ProcedureInstance_c
Parameters:
throwTypes - The throwTypes to set.

setEntryKeys

public void setEntryKeys(KeySet entryKeys)
Specified by:
setEntryKeys in interface CofferProcedureInstance

setReturnKeys

public void setReturnKeys(KeySet returnKeys)
Specified by:
setReturnKeys in interface CofferProcedureInstance

setThrowConstraints

public void setThrowConstraints(java.util.List throwConstraints)
Specified by:
setThrowConstraints in interface CofferProcedureInstance

canOverrideImpl

public boolean canOverrideImpl(MethodInstance mj,
                               boolean quiet)
                        throws SemanticException
Description copied from interface: MethodInstance
Return true if this method can override 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.

Specified by:
canOverrideImpl in interface MethodInstance
Overrides:
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.
Throws:
SemanticException

toString

public java.lang.String toString()
Overrides:
toString in class MethodInstance_c