polyglot.types
Class ConstructorInstance_c

java.lang.Object
  extended by polyglot.types.TypeObject_c
      extended by polyglot.types.ProcedureInstance_c
          extended by polyglot.types.ConstructorInstance_c
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, CodeInstance, ConstructorInstance, Declaration, MemberInstance, ProcedureInstance, TypeObject, Copy
Direct Known Subclasses:
CofferConstructorInstance_c

public class ConstructorInstance_c
extends ProcedureInstance_c
implements ConstructorInstance

A ConstructorInstance contains type information for a constructor.

See Also:
Serialized Form

Field Summary
 
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
protected ConstructorInstance_c()
          Used for deserializing types.
  ConstructorInstance_c(TypeSystem ts, Position pos, ClassType container, Flags flags, java.util.List formalTypes, java.util.List excTypes)
           
 
Method Summary
 ConstructorInstance container(ClassType container)
           
 java.lang.String designator()
          Returns either "method" or "constructor".
 boolean equalsImpl(TypeObject o)
          Default implementation is pointer equality.
 ConstructorInstance flags(Flags flags)
          Non-destructive updates.
 ConstructorInstance formalTypes(java.util.List l)
           
 boolean isCanonical()
          Return true if the type object contains no unknown/ambiguous types.
 ConstructorInstance orig()
           
 java.lang.String signature()
          Returns a String representing the signature of the procedure.
 ConstructorInstance throwTypes(java.util.List l)
           
 java.lang.String toString()
           
 
Methods inherited from class polyglot.types.ProcedureInstance_c
callValid, callValidImpl, container, declaration, flags, formalTypes, hasFormals, hasFormalsImpl, hashCode, listIsCanonical, moreSpecific, moreSpecificImpl, setContainer, setDeclaration, setFlags, setFormalTypes, setThrowTypes, throwsSubset, throwsSubsetImpl, throwTypes
 
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.ProcedureInstance
callValid, callValidImpl, formalTypes, hasFormals, hasFormalsImpl, moreSpecific, moreSpecificImpl, setFormalTypes, setThrowTypes, throwsSubset, throwsSubsetImpl, throwTypes
 
Methods inherited from interface polyglot.types.MemberInstance
container, flags, setContainer, setFlags
 
Methods inherited from interface polyglot.types.TypeObject
position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.types.Declaration
declaration, setDeclaration
 

Constructor Detail

ConstructorInstance_c

protected ConstructorInstance_c()
Used for deserializing types.


ConstructorInstance_c

public ConstructorInstance_c(TypeSystem ts,
                             Position pos,
                             ClassType container,
                             Flags flags,
                             java.util.List formalTypes,
                             java.util.List excTypes)
Method Detail

orig

public ConstructorInstance orig()
Specified by:
orig in interface ConstructorInstance

flags

public ConstructorInstance flags(Flags flags)
Description copied from interface: ConstructorInstance
Non-destructive updates.

Specified by:
flags in interface ConstructorInstance

formalTypes

public ConstructorInstance formalTypes(java.util.List l)
Specified by:
formalTypes in interface ConstructorInstance

throwTypes

public ConstructorInstance throwTypes(java.util.List l)
Specified by:
throwTypes in interface ConstructorInstance

container

public ConstructorInstance container(ClassType container)
Specified by:
container in interface ConstructorInstance

toString

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

signature

public java.lang.String signature()
Description copied from interface: ProcedureInstance
Returns a String representing the signature of the procedure. This includes just the name of the method (or name of the class, if it is a constructor), and the argument types.

Specified by:
signature in interface ProcedureInstance

designator

public java.lang.String designator()
Description copied from interface: ProcedureInstance
Returns either "method" or "constructor".

Specified by:
designator in interface ProcedureInstance

equalsImpl

public boolean equalsImpl(TypeObject o)
Description copied from class: TypeObject_c
Default implementation is pointer equality.

Specified by:
equalsImpl in interface TypeObject
Overrides:
equalsImpl in class ProcedureInstance_c
See Also:
TypeObject_c.equalsImpl(TypeObject), Object.hashCode()

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