Package com.spotify.github.v3.checks
Class ImmutableAnnotation
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableAnnotation
-
- All Implemented Interfaces:
Annotation
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAnnotation extends Object implements Annotation
Immutable implementation ofAnnotation.Use the builder to create immutable instances:
ImmutableAnnotation.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableAnnotation.BuilderBuilds instances of typeImmutableAnnotation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationLevelannotationLevel()Annotation level.Optional<String>blobHref()Blob href optional.static ImmutableAnnotation.Builderbuilder()Creates a builder forImmutableAnnotation.static ImmutableAnnotationcopyOf(Annotation instance)Creates an immutable copy of aAnnotationvalue.Optional<Integer>endColumn()End column optional.intendLine()The end line of the annotation.booleanequals(Object another)This instance is equal to all instances ofImmutableAnnotationthat have equal attribute values.inthashCode()Computes a hash code from attributes:path,blobHref,annotationLevel,message,title,rawDetails,startLine,endLine,startColumn,endColumn.Stringmessage()A short description of the feedback for these lines of code.Stringpath()The path of the file to add an annotation to.Optional<String>rawDetails()Details about this annotation.Optional<Integer>startColumn()Start column optional.intstartLine()The start line of the annotation.Optional<String>title()The title that represents the annotation.StringtoString()Prints the immutable valueAnnotationwith attribute values.ImmutableAnnotationwithAnnotationLevel(AnnotationLevel value)Copy the current immutable object by setting a value for theannotationLevelattribute.ImmutableAnnotationwithBlobHref(String value)Copy the current immutable object by setting a present value for the optionalblobHrefattribute.ImmutableAnnotationwithBlobHref(Optional<String> optional)Copy the current immutable object by setting an optional value for theblobHrefattribute.ImmutableAnnotationwithEndColumn(int value)Copy the current immutable object by setting a present value for the optionalendColumnattribute.ImmutableAnnotationwithEndColumn(Optional<Integer> optional)Copy the current immutable object by setting an optional value for theendColumnattribute.ImmutableAnnotationwithEndLine(int value)Copy the current immutable object by setting a value for theendLineattribute.ImmutableAnnotationwithMessage(String value)Copy the current immutable object by setting a value for themessageattribute.ImmutableAnnotationwithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableAnnotationwithRawDetails(String value)Copy the current immutable object by setting a present value for the optionalrawDetailsattribute.ImmutableAnnotationwithRawDetails(Optional<String> optional)Copy the current immutable object by setting an optional value for therawDetailsattribute.ImmutableAnnotationwithStartColumn(int value)Copy the current immutable object by setting a present value for the optionalstartColumnattribute.ImmutableAnnotationwithStartColumn(Optional<Integer> optional)Copy the current immutable object by setting an optional value for thestartColumnattribute.ImmutableAnnotationwithStartLine(int value)Copy the current immutable object by setting a value for thestartLineattribute.ImmutableAnnotationwithTitle(String value)Copy the current immutable object by setting a present value for the optionaltitleattribute.ImmutableAnnotationwithTitle(Optional<String> optional)Copy the current immutable object by setting an optional value for thetitleattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.spotify.github.v3.checks.Annotation
check
-
-
-
-
Method Detail
-
path
public String path()
The path of the file to add an annotation to. For example, assets/css/main.css.- Specified by:
pathin interfaceAnnotation- Returns:
- the string
-
blobHref
public Optional<String> blobHref()
Blob href optional.- Specified by:
blobHrefin interfaceAnnotation- Returns:
- the optional
-
annotationLevel
public AnnotationLevel annotationLevel()
Annotation level. Can be one of notice, warning, or failure.- Specified by:
annotationLevelin interfaceAnnotation- Returns:
- the annotation level
-
message
public String message()
A short description of the feedback for these lines of code. The maximum size is 64 KB.- Specified by:
messagein interfaceAnnotation- Returns:
- the string
-
title
public Optional<String> title()
The title that represents the annotation. The maximum size is 255 characters.- Specified by:
titlein interfaceAnnotation- Returns:
- the optional
-
rawDetails
public Optional<String> rawDetails()
Details about this annotation. The maximum size is 64 KB.- Specified by:
rawDetailsin interfaceAnnotation- Returns:
- the optional string
-
startLine
public int startLine()
The start line of the annotation.- Specified by:
startLinein interfaceAnnotation- Returns:
- the int
-
endLine
public int endLine()
The end line of the annotation.- Specified by:
endLinein interfaceAnnotation- Returns:
- the int
-
startColumn
public Optional<Integer> startColumn()
Start column optional.- Specified by:
startColumnin interfaceAnnotation- Returns:
- the optional
-
endColumn
public Optional<Integer> endColumn()
End column optional.- Specified by:
endColumnin interfaceAnnotation- Returns:
- the optional
-
withPath
public final ImmutableAnnotation withPath(String value)
Copy the current immutable object by setting a value for thepathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for path- Returns:
- A modified copy of the
thisobject
-
withBlobHref
public final ImmutableAnnotation withBlobHref(String value)
Copy the current immutable object by setting a present value for the optionalblobHrefattribute.- Parameters:
value- The value for blobHref- Returns:
- A modified copy of
thisobject
-
withBlobHref
public final ImmutableAnnotation withBlobHref(Optional<String> optional)
Copy the current immutable object by setting an optional value for theblobHrefattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for blobHref- Returns:
- A modified copy of
thisobject
-
withAnnotationLevel
public final ImmutableAnnotation withAnnotationLevel(AnnotationLevel value)
Copy the current immutable object by setting a value for theannotationLevelattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for annotationLevel- Returns:
- A modified copy of the
thisobject
-
withMessage
public final ImmutableAnnotation withMessage(String value)
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message- Returns:
- A modified copy of the
thisobject
-
withTitle
public final ImmutableAnnotation withTitle(String value)
Copy the current immutable object by setting a present value for the optionaltitleattribute.- Parameters:
value- The value for title- Returns:
- A modified copy of
thisobject
-
withTitle
public final ImmutableAnnotation withTitle(Optional<String> optional)
Copy the current immutable object by setting an optional value for thetitleattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for title- Returns:
- A modified copy of
thisobject
-
withRawDetails
public final ImmutableAnnotation withRawDetails(String value)
Copy the current immutable object by setting a present value for the optionalrawDetailsattribute.- Parameters:
value- The value for rawDetails- Returns:
- A modified copy of
thisobject
-
withRawDetails
public final ImmutableAnnotation withRawDetails(Optional<String> optional)
Copy the current immutable object by setting an optional value for therawDetailsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for rawDetails- Returns:
- A modified copy of
thisobject
-
withStartLine
public final ImmutableAnnotation withStartLine(int value)
Copy the current immutable object by setting a value for thestartLineattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for startLine- Returns:
- A modified copy of the
thisobject
-
withEndLine
public final ImmutableAnnotation withEndLine(int value)
Copy the current immutable object by setting a value for theendLineattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for endLine- Returns:
- A modified copy of the
thisobject
-
withStartColumn
public final ImmutableAnnotation withStartColumn(int value)
Copy the current immutable object by setting a present value for the optionalstartColumnattribute.- Parameters:
value- The value for startColumn- Returns:
- A modified copy of
thisobject
-
withStartColumn
public final ImmutableAnnotation withStartColumn(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for thestartColumnattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for startColumn- Returns:
- A modified copy of
thisobject
-
withEndColumn
public final ImmutableAnnotation withEndColumn(int value)
Copy the current immutable object by setting a present value for the optionalendColumnattribute.- Parameters:
value- The value for endColumn- Returns:
- A modified copy of
thisobject
-
withEndColumn
public final ImmutableAnnotation withEndColumn(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theendColumnattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for endColumn- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableAnnotationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:path,blobHref,annotationLevel,message,title,rawDetails,startLine,endLine,startColumn,endColumn.
-
toString
public String toString()
Prints the immutable valueAnnotationwith attribute values.
-
copyOf
public static ImmutableAnnotation copyOf(Annotation instance)
Creates an immutable copy of aAnnotationvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Annotation instance
-
builder
public static ImmutableAnnotation.Builder builder()
Creates a builder forImmutableAnnotation.ImmutableAnnotation.builder() .path(String) // requiredpath.blobHref(String) // optionalblobHref.annotationLevel(com.spotify.github.v3.checks.AnnotationLevel) // requiredannotationLevel.message(String) // requiredmessage.title(String) // optionaltitle.rawDetails(String) // optionalrawDetails.startLine(int) // requiredstartLine.endLine(int) // requiredendLine.startColumn(Integer) // optionalstartColumn.endColumn(Integer) // optionalendColumn.build();- Returns:
- A new ImmutableAnnotation builder
-
-