/** * Creates {@link Field} objects for all instance fields of the type * * @param type the type declaring the field that will be moved to the extracted class * @return an instance of {@link Field} for every field declared in type that is not static * @throws JavaModelException if the type does not exist or if an exception occurs while accessing its corresponding resource. */ public static Field[] getFields(IType type) throws JavaModelException { IField[] fields= type.getFields(); ArrayList<Field> result= new ArrayList<>(); for (int i= 0; i < fields.length; i++) { IField field= fields[i]; if (!Flags.isStatic(field.getFlags()) && !field.isEnumConstant()) result.add(new Field(field.getElementName())); } return result.toArray(new Field[result.size()]); }
fFields= new Field[oldFieldNames.length]; for (int i= 0; i < oldFieldNames.length; i++) { fFields[i]= new Field(oldFieldNames[i]); fFields[i].setCreateField(createField[i]); if (createField[i])