com.atlassian.scheduler.cron
Class CronSyntaxException.Builder

java.lang.Object
  extended by com.atlassian.scheduler.cron.CronSyntaxException.Builder
Enclosing class:
CronSyntaxException

public static class CronSyntaxException.Builder
extends Object

A builder for constructing a CronSyntaxException.


Method Summary
 CronSyntaxException build()
          Returns the completed exception.
 CronSyntaxException.Builder cause(Throwable cause)
          Sets the cause of the exception.
 CronSyntaxException.Builder cronExpression(String cronExpression)
          Sets the cron expression that caused the exception.
 CronSyntaxException.Builder errorCode(ErrorCode errorCode)
          Sets the error code for the exception.
 CronSyntaxException.Builder errorOffset(int errorOffset)
          Sets the error code for the exception.
 CronSyntaxException.Builder value(char value)
          Sets the value that caused the exception.
 CronSyntaxException.Builder value(String value)
          Sets the value that caused the exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cronExpression

public CronSyntaxException.Builder cronExpression(@Nullable
                                                  String cronExpression)
Sets the cron expression that caused the exception. If left unspecified, then "" is used.


value

public CronSyntaxException.Builder value(@Nullable
                                         String value)
Sets the value that caused the exception. For example, if the month field contained FEB-XYZ, then "XYZ" should be set for the value.


value

public CronSyntaxException.Builder value(char value)
Sets the value that caused the exception. This convenience method is equivalent to value(String.valueOf(value)).


errorCode

public CronSyntaxException.Builder errorCode(@Nullable
                                             ErrorCode errorCode)
Sets the error code for the exception. If left unspecified, then ErrorCode.INTERNAL_PARSER_FAILURE is used.


errorOffset

public CronSyntaxException.Builder errorOffset(int errorOffset)
Sets the error code for the exception. If left unspecified, then -1 is used.


cause

public CronSyntaxException.Builder cause(@Nullable
                                         Throwable cause)
Sets the cause of the exception.


build

public CronSyntaxException build()
Returns the completed exception.

Returns:
the completed exception.


Copyright © 2015 Atlassian. All rights reserved.