public void renameAll(Set<OJPathName> renamePathNames, String newName) { getType().renameAll(renamePathNames, newName); }
public void renameAll(Set<OJPathName> renamePathNames, String newName) { super.renameAll(renamePathNames, newName); Set<OJPathName> superInterfaces = getSuperInterfaces(); for (OJPathName ojPathName : superInterfaces) { ojPathName.renameAll(renamePathNames, newName); } }
@Override public void renameAll(Set<OJPathName> match,String suffix){ if(getType() != null){ getType().renameAll(match, suffix); } } }
public void renameAll(Set<OJPathName> renamePathNames, String newName) { super.renameAll(renamePathNames, newName); Collection<OJAnnotationValue> annotations = getAnnotations(); for (OJAnnotationValue ojAnnotationValue : annotations) { Set<OJPathName> usedTypes = ojAnnotationValue.getAllTypesUsed(); for (OJPathName usedType : usedTypes) { usedType.renameAll(renamePathNames, newName); } } }
@Override public void renameAll(Set<OJPathName> renamePathNames, String suffix) { if (renamePathNames.contains(getPathName())) { this.suffix = suffix; } Set<OJPathName> newImports = new HashSet<OJPathName>(); Collection<OJPathName> imports = getImports(); for (OJPathName ojPathName : imports) { OJPathName newImport = ojPathName.getDeepCopy(); newImport.renameAll(renamePathNames, suffix); newImports.add(newImport); } setImports(newImports); Collection<OJOperation> operations = getOperations(); for (OJOperation ojOperation : operations) { ojOperation.renameAll(renamePathNames, suffix); } }
@Override public void renameAll(Set<OJPathName> renamePathNames, String newName) { super.renameAll(renamePathNames, newName); outer.renameAll(renamePathNames, newName); classDeclaration.setMyPackage(new OJPackage("")); classDeclaration.renameAll(renamePathNames, newName); }
public void renameAll(Set<OJPathName> renamePathNames, String suffix) { getType().renameAll(renamePathNames, suffix); String init = getInitExp(); setInitExp(replaceAll(init, renamePathNames, suffix)); } }
public void renameAll(Set<OJPathName> renamePathNames, String newName) { if (getLast().charAt(0) == '?') { replaceTail(replaceAll(getLast(), renamePathNames, newName)); } else if (renamePathNames.contains(this)) { replaceTail(getLast() + newName); } for (OJPathName elementType : getElementTypes()) { elementType.renameAll(renamePathNames, newName); } }
@Override public void renameAll(Set<OJPathName> renamePathNames,String suffix){ super.renameAll(renamePathNames,suffix); Collection<OJConstructor> constructors = getConstructors(); for(OJConstructor ojConstructor:constructors){ ojConstructor.renameAll(renamePathNames, suffix); } // This is a jipo to make sure imports are correct. // renaming OJForStatement does not seem to add the renamed paths to the // imports Collection<OJPathName> newImports = new HashSet<OJPathName>(); Collection<OJPathName> imports = getImports(); for(OJPathName ojPathName:imports){ OJPathName newImport = ojPathName.getDeepCopy(); newImport.renameAll(renamePathNames, suffix); newImports.add(newImport); } addToImports(newImports); if(getSuperclass() != null){ getSuperclass().renameAll(renamePathNames, suffix); } Collection<OJPathName> implementedInterfaces = getImplementedInterfaces(); for(OJPathName ojPathName:implementedInterfaces){ ojPathName.renameAll(renamePathNames, suffix); } Collection<OJField> fields = getFields(); for(OJField ojField:fields){ ojField.renameAll(renamePathNames, suffix); } }
public void renameAll(Set<OJPathName> renamePathNames,String newName){ getReturnType().renameAll(renamePathNames, newName); for(OJParameter parameter:getParameters()){ parameter.renameAll(renamePathNames, newName); } getBody().renameAll(renamePathNames, newName); } @Override
public void renameAll(Set<OJPathName> renamePathNames, String suffix) { if (getElemType() != null) { getElemType().renameAll(renamePathNames, suffix); } setCollection(replaceAll(getCollection(), renamePathNames, suffix)); if (getBody() != null) { getBody().renameAll(renamePathNames, suffix); } } }