/** * Create a copy of the Extension * @return A copy of the Extension */ public Extension copy() { Extension c = new Extension(type, name, required); switch(type) { case TEXT: c.setText(text); break; case JSON: c.setJSON(text); break; case ARTIFACTS: if (artifacts != null) { for (Artifact a : artifacts) { c.getArtifacts().add(a.copy(a.getId())); } } break; } return c; }
switch ( target.getType() ) { case TEXT : // simply append target.setText(target.getText() + "\n" + source.getText()); break; case JSON : JsonStructure struct1;
case JSON : c.setJSON(e.getJSON()); break; case TEXT : c.setText(e.getText()); break;