Class TypeBoundExtendsInsertion


public class TypeBoundExtendsInsertion extends AnnotationInsertion
Specifies an insertion of an "extends @Annotation java.lang.Object" to a type bound.
  • Constructor Details

    • TypeBoundExtendsInsertion

      public TypeBoundExtendsInsertion(String text, Criteria criteria, boolean separateLine)
      Creates a new TypeBoundExtendsInsertion.
      Parameters:
      text - the text to insert
      criteria - where to insert the text
      separateLine - if true, insert the text on its own line
  • Method Details

    • getText

      protected String getText(boolean abbreviate)
      Description copied from class: AnnotationInsertion
      Gets the insertion text.
      Overrides:
      getText in class AnnotationInsertion
      Parameters:
      abbreviate - if true, the package name will be removed from the annotation
      Returns:
      the text to insert
    • addTrailingSpace

      protected boolean addTrailingSpace(boolean gotSeparateLine)
      Description copied from class: Insertion
      Indicates if a trailing space should be added to this insertion. Subclasses may override this method for custom trailing space rules.
      Overrides:
      addTrailingSpace in class AnnotationInsertion
      Parameters:
      gotSeparateLine - true if this insertion is actually added on a separate line
      Returns:
      true if a trailing space should be added, false otherwise