public ObjCASTParameterDeclaration copy() { ObjCASTParameterDeclaration copy = new ObjCASTParameterDeclaration(); copy.setDeclSpecifier(declSpec == null ? null : declSpec.copy()); copy.setDeclarator(declarator == null ? null : declarator.copy()); copy.setOffsetAndLength(this); return copy; }
public CASTParameterDeclaration copy(CopyStyle style) { CASTParameterDeclaration copy = new CASTParameterDeclaration(); copy.setDeclSpecifier(declSpec == null ? null : declSpec.copy(style)); copy.setDeclarator(declarator == null ? null : declarator.copy(style)); copy.setOffsetAndLength(this); if (style == CopyStyle.withLocations) { copy.setCopyLocation(this); } return copy; }
protected <T extends CPPASTDeclarator> T copy(T copy, CopyStyle style) { copy.setName(name == null ? null : name.copy(style)); copy.setInitializer(initializer == null ? null : initializer.copy(style)); copy.setNestedDeclarator(nested == null ? null : nested.copy(style)); ((CPPASTDeclarator) copy).isPackExpansion = isPackExpansion; for (IASTPointerOperator pointer : getPointerOperators()) { copy.addPointerOperator(pointer.copy(style)); } return super.copy(copy, style); }