add isPublic()

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@529 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2007-01-08 17:18:45 +00:00
parent cfda1c94fc
commit d8105c9052
4 changed files with 15 additions and 2 deletions

View File

@ -358,4 +358,8 @@ public class ArrayClass implements IClass, Constants {
public ClassHierarchy getClassHierarchy() {
return cha;
}
public boolean isPublic() {
return true;
}
}

View File

@ -47,6 +47,11 @@ public interface IClass extends IClassHierarchyDweller {
* @return true iff this class is abstract
*/
boolean isAbstract();
/**
* @return true iff this class is public
*/
boolean isPublic();
/**
* Return the integer that encodes the class's modifiers,
@ -177,4 +182,5 @@ public interface IClass extends IClassHierarchyDweller {
* to a primitive type.
*/
boolean isReferenceType();
}

View File

@ -833,4 +833,9 @@ public final class ShrikeCTClassWrapper implements IClass {
result.addAll(getAllStaticFields());
return result;
}
public boolean isPublic() {
boolean result = ((modifiers & Constants.ACC_PUBLIC) != 0);
return result;
}
}

View File

@ -24,8 +24,6 @@ import com.ibm.wala.types.TypeReference;
public abstract class SyntheticClass implements IClass {
private final TypeReference T;
private final ClassHierarchy cha;
/**