|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.types.TypeObject_c
polyglot.types.ProcedureInstance_c
public abstract class ProcedureInstance_c
A ProcedureInstance_c contains the type information for a Java
procedure (either a method or a constructor).
| Field Summary | |
|---|---|
protected ReferenceType |
container
|
protected Flags |
flags
|
protected java.util.List |
formalTypes
|
protected java.util.List |
throwTypes
|
| Fields inherited from class polyglot.types.TypeObject_c |
|---|
position, ts |
| Constructor Summary | |
|---|---|
protected |
ProcedureInstance_c()
Used for deserializing types. |
|
ProcedureInstance_c(TypeSystem ts,
Position pos,
ReferenceType container,
Flags flags,
java.util.List formalTypes,
java.util.List excTypes)
|
| Method Summary | |
|---|---|
boolean |
callValid(java.util.List argTypes)
Returns true if a call can be made with the given argument types. |
boolean |
callValidImpl(java.util.List argTypes)
Returns true if a call can be made with the given argument types. |
ReferenceType |
container()
|
boolean |
equalsImpl(TypeObject o)
Default implementation is pointer equality. |
Flags |
flags()
|
java.util.List |
formalTypes()
List of formal parameter types. |
boolean |
hasFormals(java.util.List formalTypes)
Returns true if the procedure has the given formal parameter types. |
boolean |
hasFormalsImpl(java.util.List formalTypes)
Returns true if the procedure has the given formal parameter types. |
int |
hashCode()
|
protected boolean |
listIsCanonical(java.util.List l)
|
boolean |
moreSpecific(ProcedureInstance p)
Return true if this is more specific than pi
in terms of method overloading. |
boolean |
moreSpecificImpl(ProcedureInstance p)
Returns whether this is more specific than
p, where more specific is defined as JLS
15.12.2.2. |
void |
setContainer(ReferenceType container)
|
void |
setFlags(Flags flags)
|
void |
setFormalTypes(java.util.List formalTypes)
|
void |
setThrowTypes(java.util.List throwTypes)
|
boolean |
throwsSubset(ProcedureInstance p)
Returns true iff this throws fewer exceptions than
p. |
boolean |
throwsSubsetImpl(ProcedureInstance p)
Returns true iff this throws fewer exceptions than
p. |
java.util.List |
throwTypes()
List of declared exception types thrown. |
| Methods inherited from class polyglot.types.TypeObject_c |
|---|
copy, equals, position, typeSystem |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface polyglot.types.ProcedureInstance |
|---|
designator, signature |
| Methods inherited from interface polyglot.types.TypeObject |
|---|
isCanonical, position, typeSystem |
| Methods inherited from interface polyglot.util.Copy |
|---|
copy |
| Field Detail |
|---|
protected ReferenceType container
protected Flags flags
protected java.util.List formalTypes
protected java.util.List throwTypes
| Constructor Detail |
|---|
protected ProcedureInstance_c()
public ProcedureInstance_c(TypeSystem ts,
Position pos,
ReferenceType container,
Flags flags,
java.util.List formalTypes,
java.util.List excTypes)
| Method Detail |
|---|
public ReferenceType container()
public Flags flags()
flags in interface CodeInstancepublic java.util.List formalTypes()
ProcedureInstance
formalTypes in interface ProcedureInstanceType.Typepublic java.util.List throwTypes()
ProcedureInstance
throwTypes in interface ProcedureInstanceType.Typepublic void setContainer(ReferenceType container)
container - The container to set.public void setFlags(Flags flags)
flags - The flags to set.public void setFormalTypes(java.util.List formalTypes)
setFormalTypes in interface ProcedureInstanceformalTypes - The formalTypes to set.public void setThrowTypes(java.util.List throwTypes)
setThrowTypes in interface ProcedureInstancethrowTypes - The throwTypes to set.public int hashCode()
hashCode in class TypeObject_cpublic boolean equalsImpl(TypeObject o)
TypeObject_c
equalsImpl in interface TypeObjectequalsImpl in class TypeObject_cTypeObject_c.equalsImpl(TypeObject),
Object.hashCode()protected boolean listIsCanonical(java.util.List l)
public final boolean moreSpecific(ProcedureInstance p)
ProcedureInstancethis is more specific than pi
in terms of method overloading.
moreSpecific in interface ProcedureInstancepublic boolean moreSpecificImpl(ProcedureInstance p)
this is more specific than
p, where more specific is defined as JLS
15.12.2.2.
Note: There is a fair amount of guesswork since the JLS does not include any info regarding Java 1.2, so all inner class rules are found empirically using jikes and javac.
moreSpecificImpl in interface ProcedureInstancepublic final boolean hasFormals(java.util.List formalTypes)
hasFormals in interface ProcedureInstancepublic boolean hasFormalsImpl(java.util.List formalTypes)
hasFormalsImpl in interface ProcedureInstancepublic final boolean throwsSubset(ProcedureInstance p)
this throws fewer exceptions than
p.
throwsSubset in interface ProcedureInstancepublic boolean throwsSubsetImpl(ProcedureInstance p)
this throws fewer exceptions than
p.
throwsSubsetImpl in interface ProcedureInstancepublic final boolean callValid(java.util.List argTypes)
callValid in interface ProcedureInstancepublic boolean callValidImpl(java.util.List argTypes)
callValidImpl in interface ProcedureInstance
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||