public abstract class ProcedureInstance_c extends TypeObject_c implements ProcedureInstance
ProcedureInstance_c
contains the type information for a Java
procedure (either a method or a constructor).Modifier and Type | Field and Description |
---|---|
protected ReferenceType |
container |
protected Flags |
flags |
protected java.util.List<Type> |
formalTypes |
protected java.util.List<Type> |
throwTypes |
position, ts
Modifier | Constructor and Description |
---|---|
protected |
ProcedureInstance_c()
Used for deserializing types.
|
|
ProcedureInstance_c(TypeSystem ts,
Position pos,
ReferenceType container,
Flags flags,
java.util.List<? extends Type> formalTypes,
java.util.List<? extends Type> excTypes) |
Modifier and Type | Method and Description |
---|---|
boolean |
callValid(java.util.List<? extends Type> argTypes)
Returns true if the procedure can be called with the given argument types.
|
boolean |
callValidImpl(java.util.List<? extends Type> argTypes)
Returns true if the procedure can be called with the given argument types.
|
ReferenceType |
container() |
boolean |
equalsImpl(TypeObject o)
Default implementation is pointer equality.
|
Flags |
flags() |
java.util.List<Type> |
formalTypes()
List of formal parameter types.
|
boolean |
hasFormals(java.util.List<? extends Type> formalTypes)
Returns true if the procedure has the given formal parameter types.
|
boolean |
hasFormalsImpl(java.util.List<? extends Type> formalTypes)
Returns true if the procedure has the given formal parameter types.
|
int |
hashCode() |
protected boolean |
listIsCanonical(java.util.List<? extends TypeObject> 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<? extends Type> formalTypes) |
void |
setThrowTypes(java.util.List<? extends Type> throwTypes) |
boolean |
throwsSubset(ProcedureInstance pi)
Returns true if the procedure throws a subset of the exceptions
thrown by
pi . |
boolean |
throwsSubsetImpl(ProcedureInstance pi)
Returns true if the procedure throws a subset of the exceptions
thrown by
pi . |
java.util.List<Type> |
throwTypes()
List of declared exception types thrown.
|
copy, equals, position, typeSystem
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
designator, signature
isCanonical, position, typeSystem
protected ReferenceType container
protected Flags flags
protected java.util.List<Type> formalTypes
protected java.util.List<Type> throwTypes
protected ProcedureInstance_c()
public ProcedureInstance_c(TypeSystem ts, Position pos, ReferenceType container, Flags flags, java.util.List<? extends Type> formalTypes, java.util.List<? extends Type> excTypes)
public ReferenceType container()
public Flags flags()
flags
in interface CodeInstance
public java.util.List<Type> formalTypes()
ProcedureInstance
formalTypes
in interface ProcedureInstance
Type
.Type
public java.util.List<Type> throwTypes()
ProcedureInstance
throwTypes
in interface ProcedureInstance
Type
.Type
public 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<? extends Type> formalTypes)
setFormalTypes
in interface ProcedureInstance
public void setThrowTypes(java.util.List<? extends Type> throwTypes)
setThrowTypes
in interface ProcedureInstance
public int hashCode()
hashCode
in class TypeObject_c
public boolean equalsImpl(TypeObject o)
TypeObject_c
equalsImpl
in interface TypeObject
equalsImpl
in class TypeObject_c
TypeObject_c.equalsImpl(TypeObject)
,
Object.hashCode()
protected boolean listIsCanonical(java.util.List<? extends TypeObject> l)
public final boolean moreSpecific(ProcedureInstance p)
ProcedureInstance
this
is more specific than pi
in terms of method overloading.moreSpecific
in interface ProcedureInstance
public 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 ProcedureInstance
public final boolean hasFormals(java.util.List<? extends Type> formalTypes)
ProcedureInstance
hasFormals
in interface ProcedureInstance
public boolean hasFormalsImpl(java.util.List<? extends Type> formalTypes)
ProcedureInstance
hasFormalsImpl
in interface ProcedureInstance
public final boolean throwsSubset(ProcedureInstance pi)
ProcedureInstance
pi
.throwsSubset
in interface ProcedureInstance
public boolean throwsSubsetImpl(ProcedureInstance pi)
ProcedureInstance
pi
.throwsSubsetImpl
in interface ProcedureInstance
public final boolean callValid(java.util.List<? extends Type> argTypes)
ProcedureInstance
callValid
in interface ProcedureInstance
public boolean callValidImpl(java.util.List<? extends Type> argTypes)
ProcedureInstance
callValidImpl
in interface ProcedureInstance