1 package annotator.find; 2 3 /** 4 * Specifies an insertion of an "extends @Annotation java.lang.Object" to a type 5 * bound. 6 */ 7 public class TypeBoundExtendsInsertion extends AnnotationInsertion { 8 9 /** 10 * Creates a new TypeBoundExtendsInsertion. 11 * 12 * @param text 13 * the text to insert 14 * @param criteria 15 * where to insert the text 16 * @param separateLine 17 * whether to insert the text on its own 18 */ 19 public TypeBoundExtendsInsertion(String text, Criteria criteria, 20 boolean separateLine) { 21 super(text, criteria, separateLine); 22 } 23 24 /** 25 * {@inheritDoc} 26 */ 27 @Override 28 protected String getText(boolean comments, boolean abbreviate) { 29 return "extends java.lang." + super.getText(comments, abbreviate) 30 + " Object"; 31 } 32 33 /** 34 * {@inheritDoc} 35 */ 36 @Override 37 protected boolean addTrailingSpace(boolean gotSeparateLine) { 38 // Never add a trailing space for an extends insertion. 39 return false; 40 } 41 } 42