protected SimpleName rename(ASTNode node, SimpleName newName) { AbstractTypeDeclaration type = (AbstractTypeDeclaration) node; SimpleName oldName = type.getName(); type.setName(newName); return oldName; } }
protected SimpleName rename(ASTNode node, SimpleName newName) { AbstractTypeDeclaration type = (AbstractTypeDeclaration) node; SimpleName oldName = type.getName(); type.setName(newName); return oldName; } }
protected SimpleName rename(ASTNode node, SimpleName newName) { AbstractTypeDeclaration type = (AbstractTypeDeclaration) node; SimpleName oldName = type.getName(); type.setName(newName); return oldName; } }
@Override protected SimpleName rename(ASTNode node, SimpleName newName) { AbstractTypeDeclaration type = (AbstractTypeDeclaration) node; SimpleName oldName = type.getName(); type.setName(newName); return oldName; } }
protected SimpleName rename(ASTNode node, SimpleName newName) { AbstractTypeDeclaration type = (AbstractTypeDeclaration) node; SimpleName oldName = type.getName(); type.setName(newName); return oldName; } }
protected SimpleName rename(ASTNode node, SimpleName newName) { AbstractTypeDeclaration type = (AbstractTypeDeclaration) node; SimpleName oldName = type.getName(); type.setName(newName); return oldName; } }
@Override public O setName(final String name) { getBodyDeclaration().setName(unit.getAST().newSimpleName(name)); return updateTypeNames(name); }
/** * Create a type declaration. * * @param cname class name * @param isenum Java 5 enum class flag * @return type declaration */ private AbstractTypeDeclaration createClass(String cname, boolean isenum) { AbstractTypeDeclaration abstype; if (isenum) { abstype = m_ast.newEnumDeclaration(); } else { TypeDeclaration type = m_ast.newTypeDeclaration(); type.setInterface(false); abstype = type; } abstype.modifiers().add(m_ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD)); abstype.setName(m_ast.newSimpleName(cname)); return abstype; }
@SuppressWarnings("rawtypes") @Override public O setName(final String name) { AbstractTypeDeclaration typeDeclaration = getDeclaration(); TypeImpl<O> type = new TypeImpl(this, null, name); typeDeclaration.setName(unit.getAST().newSimpleName(type.getName())); if (typeDeclaration instanceof TypeDeclaration) { TypeDeclaration td = (TypeDeclaration) typeDeclaration; for (Type<?> arg : type.getTypeArguments()) { TypeParameter typeParameter = unit.getAST().newTypeParameter(); typeParameter.setName(unit.getAST().newSimpleName(arg.getName())); td.typeParameters().add(typeParameter); } } return updateTypeNames(name); }