ConstantStaticFieldRef cStatF = new ConstantStaticFieldRefRead().load(in);
constantPoolComponent.getConstantPool().add(cStatF);
break;
case ConstantPoolComponent.TAG_STATIC_METHOD_REF:
ConstantStaticMethodRef cStatMet = new ConstantStaticMethodRefRead().load(in);
constantPoolComponent.getConstantPool().add(cStatMet);
break;
default:
throw new UnknownTagException(
"an error has occured while loading constant pool, tag "
+ cpTag + " unknow");
}
}
// we'll get the offset to method componentTab into a list which will
// be used when loading method componentTab
for (ConstantPoolInfo elem : constantPoolComponent.getConstantPool()) {
// we have offset to method componentTab only for
// InternalStaticMethodRef which are contained in Constant
// static method ref
if (elem instanceof ConstantStaticMethodRef) {
ConstantStaticMethodRef tmp = (ConstantStaticMethodRef) elem;
if (tmp.getStaticMethodRef() instanceof InternalStaticMethodRef) {
InternalStaticMethodRef tmp2 = (InternalStaticMethodRef) tmp.getStaticMethodRef();
constantPoolComponent.getOffsetMethodList().add(tmp2.getOffset());
}
}