polyglot.ext.jl.types
Class ConstructorInstance_c

java.lang.Object
  extended bypolyglot.ext.jl.types.TypeObject_c
      extended bypolyglot.ext.jl.types.ProcedureInstance_c
          extended bypolyglot.ext.jl.types.ConstructorInstance_c
All Implemented Interfaces:
java.lang.Cloneable, CodeInstance, ConstructorInstance, Copy, MemberInstance, ProcedureInstance, java.io.Serializable, TypeObject
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.ext.jl.types.ProcedureInstance_c
container, excTypes, flags, formalTypes
 
Fields inherited from class polyglot.ext.jl.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)
          Set the containing class of the constructor.
 java.lang.String designator()
          Returns either "method" or "constructor".
 boolean equalsImpl(TypeObject o)
          Return true iff this type object is the same as t.
 ConstructorInstance flags(Flags flags)
          Set the flags of the constructor.
 ConstructorInstance formalTypes(java.util.List l)
          Set the types of the formal parameters of the constructor.
 boolean isCanonical()
          Return true if the type object contains no unknown/ambiguous types.
 java.lang.String signature()
          Returns a String representing the signature of the procedure.
 ConstructorInstance throwTypes(java.util.List l)
          Set the types of the exceptions thrown by the constructor.
 java.lang.String toString()
           
 
Methods inherited from class polyglot.ext.jl.types.ProcedureInstance_c
callValid, callValidImpl, container, flags, formalTypes, hasFormals, hasFormalsImpl, hashCode, listIsCanonical, moreSpecific, moreSpecificImpl, throwsSubset, throwsSubsetImpl, throwTypes
 
Methods inherited from class polyglot.ext.jl.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, throwsSubset, throwsSubsetImpl, throwTypes
 
Methods inherited from interface polyglot.types.MemberInstance
container, flags
 
Methods inherited from interface polyglot.types.TypeObject
position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

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

flags

public ConstructorInstance flags(Flags flags)
Description copied from interface: ConstructorInstance
Set the flags of the constructor.

Specified by:
flags in interface ConstructorInstance

formalTypes

public ConstructorInstance formalTypes(java.util.List l)
Description copied from interface: ConstructorInstance
Set the types of the formal parameters of the constructor.

Specified by:
formalTypes in interface ConstructorInstance
Parameters:
l - A list of Type.
See Also:
Type

throwTypes

public ConstructorInstance throwTypes(java.util.List l)
Description copied from interface: ConstructorInstance
Set the types of the exceptions thrown by the constructor.

Specified by:
throwTypes in interface ConstructorInstance
Parameters:
l - A list of Type.
See Also:
Type

container

public ConstructorInstance container(ClassType container)
Description copied from interface: ConstructorInstance
Set the containing class of the constructor.

Specified by:
container in interface ConstructorInstance

toString

public java.lang.String toString()

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 interface: TypeObject
Return true iff this type object is the same as t. All Polyglot extensions should attempt to maintain pointer equality between TypeObjects. If this cannot be done, extensions can override TypeObject_c.equalsImpl(), and don't forget to override hashCode().

Specified by:
equalsImpl in interface TypeObject
Overrides:
equalsImpl in class ProcedureInstance_c

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