getHint added

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@301 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 81e13e16c5
commit 1123c02533
  1. 4
      jode/jode/type/ArrayType.java
  2. 10
      jode/jode/type/ClassInterfacesType.java
  3. 4
      jode/jode/type/Type.java

@ -53,6 +53,10 @@ public class ArrayType extends Type {
return tArray(elementType.getTop());
}
public Type getHint() {
return tArray(elementType.getHint());
}
static boolean implementsAllIfaces(ClassInfo[] otherIfaces) {
big:
for (int i=0; i < otherIfaces.length; i++) {

@ -80,6 +80,16 @@ public class ClassInterfacesType extends Type {
return new ClassInterfacesType(clazz, ifaces);
}
public Type getHint() {
if (ifaces.length == 0
|| (clazz == null && ifaces.length == 1))
return this;
if (clazz != null)
return Type.tClass(clazz.getName());
else
return Type.tClass(ifaces[0].getName());
}
/**
* Create the type corresponding to the range from bottomType to
* this. Checks if the given type range may be not empty. This

@ -218,6 +218,10 @@ public class Type {
return (this == tBoolByte || this == tBoolInt) ? tUnknown : this;
}
public Type getHint() {
return this;
}
/**
* @return the type code of the type.
*/

Loading…
Cancel
Save