Class TypeBoundExtendsInsertion
java.lang.Object
org.checkerframework.afu.annotator.find.Insertion
org.checkerframework.afu.annotator.find.AnnotationInsertion
org.checkerframework.afu.annotator.find.TypeBoundExtendsInsertion
Specifies an insertion of an "extends @Annotation java.lang.Object" to a type bound.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.afu.annotator.find.Insertion
Insertion.Kind -
Field Summary
Fields inherited from class org.checkerframework.afu.annotator.find.Insertion
alwaysQualify, packageNames -
Constructor Summary
ConstructorsConstructorDescriptionTypeBoundExtendsInsertion(String text, Criteria criteria, boolean separateLine) Creates a new TypeBoundExtendsInsertion. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddTrailingSpace(boolean gotSeparateLine) Indicates if a trailing space should be added to this insertion.protected StringgetText(boolean abbreviate) Gets the insertion text.Methods inherited from class org.checkerframework.afu.annotator.find.AnnotationInsertion
addLeadingSpace, getAnnotation, getAnnotationFullyQualifiedName, getAnnotationText, getKind, isGenerateBound, isGenerateExtends, setGenerateBound, setGenerateExtends, setType, toStringMethods inherited from class org.checkerframework.afu.annotator.find.Insertion
collectionToString, decorateType, decorateType, getAlwaysQualify, getCriteria, getPackageNames, getText, getText, isInserted, isSeparateLine, removePackage, setAlwaysQualify, setInserted, toStringWithoutClass, typeToString
-
Constructor Details
-
TypeBoundExtendsInsertion
Creates a new TypeBoundExtendsInsertion.- Parameters:
text- the text to insertcriteria- where to insert the textseparateLine- if true, insert the text on its own line
-
-
Method Details
-
getText
Description copied from class:AnnotationInsertionGets the insertion text.- Overrides:
getTextin classAnnotationInsertion- 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:InsertionIndicates if a trailing space should be added to this insertion. Subclasses may override this method for custom trailing space rules.- Overrides:
addTrailingSpacein classAnnotationInsertion- Parameters:
gotSeparateLine-trueif this insertion is actually added on a separate line- Returns:
- true if a trailing space should be added,
falseotherwise
-