org.apache.bcel.generic
public abstract class ReferenceType extends Type
Constructor Summary | |
---|---|
protected | ReferenceType(byte t, String s) |
Method Summary | |
---|---|
ReferenceType | firstCommonSuperclass(ReferenceType t)
This commutative operation returns the first common superclass (narrowest ReferenceType
referencing a class, not an interface).
|
ReferenceType | getFirstCommonSuperclass(ReferenceType t)
This commutative operation returns the first common superclass (narrowest ReferenceType
referencing a class, not an interface).
|
boolean | isAssignmentCompatibleWith(Type t)
Return true iff this is assignment compatible with another type t
as defined in the JVM specification; see the AASTORE definition
there. |
boolean | isCastableTo(Type t)
Return true iff this type is castable to another type t as defined in
the JVM specification. |
Deprecated: use getFirstCommonSuperclass(ReferenceType t) which has slightly changed semantics.
This commutative operation returns the first common superclass (narrowest ReferenceType referencing a class, not an interface). If one of the types is a superclass of the other, the former is returned. If "this" is Type.NULL, then t is returned. If t is Type.NULL, then "this" is returned. If "this" equals t ['this.equals(t)'] "this" is returned. If "this" or t is an ArrayType, then Type.OBJECT is returned. If "this" or t is a ReferenceType referencing an interface, then Type.OBJECT is returned. If not all of the two classes' superclasses cannot be found, "null" is returned. See the JVM specification edition 2, "§4.9.2 The Bytecode Verifier".Throws: ClassNotFoundException on failure to find superclasses of this type, or the type passed as a parameter
Throws: ClassNotFoundException on failure to find superclasses of this type, or the type passed as a parameter
Throws: ClassNotFoundException if any classes or interfaces required to determine assignment compatibility can't be found
Throws: ClassNotFoundException if any classes or interfaces required to determine assignment compatibility can't be found