small cleanups around synthetic classes
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2921 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
1df8568c23
commit
1422b44676
|
@ -13,10 +13,10 @@ package com.ibm.wala.classLoader;
|
|||
|
||||
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
||||
import com.ibm.wala.types.ClassLoaderReference;
|
||||
import com.ibm.wala.types.TypeName;
|
||||
import com.ibm.wala.types.TypeReference;
|
||||
|
||||
/**
|
||||
*
|
||||
* A Class that exists nowhere in bytecode.
|
||||
*
|
||||
* @author sfink
|
||||
|
@ -82,4 +82,8 @@ public abstract class SyntheticClass implements IClass {
|
|||
public IClassHierarchy getClassHierarchy() {
|
||||
return cha;
|
||||
}
|
||||
|
||||
public TypeName getName() {
|
||||
return getReference().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.ibm.wala.util.debug.UnimplementedError;
|
|||
import com.ibm.wala.util.strings.Atom;
|
||||
|
||||
/**
|
||||
*
|
||||
* A synthetic class for the fake root method
|
||||
*
|
||||
* @author sfink
|
||||
|
@ -98,13 +97,6 @@ public class FakeRootClass extends SyntheticClass {
|
|||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* @see com.ibm.wala.classLoader.IClass#getName()
|
||||
*/
|
||||
public TypeName getName() {
|
||||
return getReference().getName();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see com.ibm.wala.classLoader.IClass#getModifiers()
|
||||
*/
|
||||
|
@ -116,14 +108,14 @@ public class FakeRootClass extends SyntheticClass {
|
|||
* @see com.ibm.wala.classLoader.IClass#getSuperclass()
|
||||
*/
|
||||
public IClass getSuperclass() throws UnsupportedOperationException {
|
||||
throw new UnsupportedOperationException();
|
||||
return getClassHierarchy().getRootClass();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see com.ibm.wala.classLoader.IClass#getAllImplementedInterfaces()
|
||||
*/
|
||||
public Collection<IClass> getAllImplementedInterfaces() throws UnsupportedOperationException {
|
||||
throw new UnsupportedOperationException();
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -256,7 +256,6 @@ public class ClassHierarchy implements IClassHierarchy {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param klass
|
||||
* @return true if the add succeeded; false if it failed for some reason
|
||||
* @throws IllegalArgumentException if klass is null
|
||||
*/
|
||||
|
|
|
@ -99,18 +99,6 @@ public class BypassSyntheticClass extends SyntheticClass {
|
|||
}
|
||||
}
|
||||
|
||||
// /*
|
||||
// * @see com.ibm.wala.classLoader.IClass#getAllInterfaces()
|
||||
// */
|
||||
// public Collection<IClass> getAllAncestorInterfaces() throws ClassHierarchyException {
|
||||
// if (Assertions.verifyAssertions) {
|
||||
// Assertions._assert(realType.isInterface());
|
||||
// }
|
||||
// HashSet<IClass> result = HashSetFactory.make(realType.getAllAncestorInterfaces().size() + 1);
|
||||
// result.addAll(realType.getAllImplementedInterfaces()());
|
||||
// return result;
|
||||
// }
|
||||
|
||||
/*
|
||||
* @see com.ibm.wala.classLoader.IClass#getMethod(com.ibm.wala.classLoader.Selector)
|
||||
*/
|
||||
|
@ -202,13 +190,6 @@ public class BypassSyntheticClass extends SyntheticClass {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see com.ibm.wala.classLoader.IClass#getName()
|
||||
*/
|
||||
public TypeName getName() {
|
||||
return getReference().getName();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see com.ibm.wala.classLoader.IClass#isReferenceType()
|
||||
*/
|
||||
|
|
|
@ -95,9 +95,6 @@ public class BypassSyntheticClassLoader implements IClassLoader {
|
|||
|
||||
/**
|
||||
* Register the existence of a new synthetic class
|
||||
*
|
||||
* @param className
|
||||
* @param theClass
|
||||
*/
|
||||
public void registerClass(TypeName className, IClass theClass) {
|
||||
cha.addClass(theClass);
|
||||
|
@ -106,8 +103,6 @@ public class BypassSyntheticClassLoader implements IClassLoader {
|
|||
|
||||
/**
|
||||
* Return the ClassLoaderReference for this class loader.
|
||||
*
|
||||
* @return ClassLoaderReference
|
||||
*/
|
||||
public ClassLoaderReference getReference() {
|
||||
return me;
|
||||
|
|
Loading…
Reference in New Issue