Methods Summary |
---|
public boolean | accessibleTo(com.sun.org.apache.bcel.internal.generic.ObjectType accessor)Java Virtual Machine Specification edition 2, ÷ 5.4.4 Access Control
JavaClass jc = Repository.lookupClass(class_name);
if(jc.isPublic()) {
return true;
} else {
JavaClass acc = Repository.lookupClass(accessor.class_name);
return acc.getPackageName().equals(jc.getPackageName());
}
|
public boolean | equals(java.lang.Object type)
return (type instanceof ObjectType)?
((ObjectType)type).class_name.equals(class_name) : false;
|
public java.lang.String | getClassName() return class_name;
|
public int | hashCode() return class_name.hashCode();
|
public boolean | referencesClass()If "this" doesn't reference a class, it references an interface
or a non-existant entity.
JavaClass jc = Repository.lookupClass(class_name);
if (jc == null)
return false;
else
return jc.isClass();
|
public boolean | referencesInterface()If "this" doesn't reference an interface, it references a class
or a non-existant entity.
JavaClass jc = Repository.lookupClass(class_name);
if (jc == null)
return false;
else
return !jc.isClass();
|
public boolean | subclassOf(com.sun.org.apache.bcel.internal.generic.ObjectType superclass)
if (this.referencesInterface() || superclass.referencesInterface())
return false;
return Repository.instanceOf(this.class_name, superclass.class_name);
|