ReferenceType rt = (ReferenceType) onType;
ReferenceTypeDelegate rtd = rt.getDelegate();
if (rtd instanceof BcelObjectType) {
+ if (rt.isRawType()) {
+ rt = (ReferenceType)rt.getGenericType();
+ }
rt.addParent(parent);
// ((BcelObjectType) rtd).addParent(parent);
}
}
@Override
- public ResolvedType getGenericType() {
+ public ReferenceType getGenericType() {
if (isGenericType()) {
return this;
}
@Override
public void addParent(ResolvedType newParent) {
+ if (this.isRawType()) {
+ throw new IllegalStateException(
+ "The raw type should never be accumulating new interfaces, they should be on the generic type. Type is "
+ + this.getName());
+ }
if (newParent.isClass()) {
newSuperclass = newParent;
superclassReference = new WeakReference<ResolvedType>(null);
*
* @return
*/
- public ResolvedType getGenericType() {
+ public ReferenceType getGenericType() {
// if (!(isParameterizedType() || isRawType()))
// throw new BCException("The type " + getBaseName() + " is not parameterized or raw - it has no generic type");
return null;