@Override public IModularClassFile getModularClassFile() { // don't hold on the .class file extension to save memory // also make sure to not use substring as the resulting String may hold on the underlying char[] which might be much bigger than necessary return new ModularClassFile(this); }
@Override public IModularClassFile getModularClassFile() { // don't hold on the .class file extension to save memory // also make sure to not use substring as the resulting String may hold on the underlying char[] which might be much bigger than necessary return new ModularClassFile(this); }
/** * Compute the children of this package fragment. Children of jar package fragments * can only be IClassFile (representing .class files). */ private IJavaElement[] computeChildren(ArrayList namesWithoutExtension) { int size = namesWithoutExtension.size(); if (size == 0) return NO_ELEMENTS; IJavaElement[] children = new IJavaElement[size]; for (int i = 0; i < size; i++) { String nameWithoutExtension = (String) namesWithoutExtension.get(i); if (TypeConstants.MODULE_INFO_NAME_STRING.equals(nameWithoutExtension)) children[i] = new ModularClassFile(this); else children[i] = new ClassFile(this, nameWithoutExtension); } return children; } /**
/** * Compute the children of this package fragment. Children of jar package fragments * can only be IClassFile (representing .class files). */ private IJavaElement[] computeChildren(ArrayList namesWithoutExtension) { int size = namesWithoutExtension.size(); if (size == 0) return NO_ELEMENTS; IJavaElement[] children = new IJavaElement[size]; for (int i = 0; i < size; i++) { String nameWithoutExtension = (String) namesWithoutExtension.get(i); if (TypeConstants.MODULE_INFO_NAME_STRING.equals(nameWithoutExtension)) children[i] = new ModularClassFile(this); else children[i] = new ClassFile(this, nameWithoutExtension); } return children; } /**