com.quantifind.sumac.examples

SimpleAppArgs

class SimpleAppArgs extends FieldArgs

Linear Supertypes
FieldArgs, Args, Serializable, Serializable, ExternalConfig, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SimpleAppArgs
  2. FieldArgs
  3. Args
  4. Serializable
  5. Serializable
  6. ExternalConfig
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SimpleAppArgs()

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def addValidation(f: ⇒ Unit): Unit

    Definition Classes
    Args
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. var count: Int

  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def getArgs(argPrefix: String): Traversable[ArgAssignable]

    Definition Classes
    Args
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def getDefaultArgs: Traversable[ArgAssignable]

    Returns the "default" values for the arguments of this class.

    Returns the "default" values for the arguments of this class. Unrelated to the current value of those arguments. Unless overridden, "default" means whatever values are assigned by the no-arg constructor of this class.

    returns

    Definition Classes
    Args
  14. def getStringValues: Map[String, String]

    get back the current (name, value) of all arguments as strings.

    get back the current (name, value) of all arguments as strings. This does not just return the original arguments that were passed to this function -- they may have been changed from defaulting, validation, etc.

    In general, users will not need this function, but it is useful for tools built on top, eg. saving to a property file

    Definition Classes
    Args
  15. def hasSetter(f: Field): Boolean

    Definition Classes
    FieldArgs
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. def helpMessage: String

    Definition Classes
    Args
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def isNestedArgField(f: Field): Boolean

    Definition Classes
    FieldArgs
  20. def isSumacHelperField(f: Field): Boolean

    Definition Classes
    FieldArgs
  21. def isValidField(f: Field): Boolean

    Definition Classes
    FieldArgs
  22. var name: String

  23. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  26. def parse(kvPairs: Map[String, String], validation: Boolean = true): Unit

    Definition Classes
    Args
  27. def parse(args: Array[String]): Unit

    Definition Classes
    Args
  28. def parse(commandLineArgs: String): Unit

    Definition Classes
    Args
  29. def readArgs(originalArgs: Map[String, String]): Map[String, String]

    Read config from an external source, and use that to modify the set of arguments.

    Read config from an external source, and use that to modify the set of arguments. The "original" arguments are given as an argument to this function, so that this method can base its behavior on those arguments. (Eg., it can take a filename from those args.) It should return the complete set of args that should be used. It is free to choose to completely replace the original args, append to them, modify them, etc.

    in general, implementations should be abstract override with a call to super, to allow multiple external configs via the Stackable Trait Pattern

    Definition Classes
    ArgsExternalConfig
  30. def registerAnnotationValidation(annotation: Class[_ <: Annotation])(validationFunction: (Any, Any, Annotation, String) ⇒ Unit): Unit

    Definition Classes
    FieldArgs
  31. def registerAnnotationValidationUpdate(annotation: Class[_ <: Annotation])(validationFunction: (Any, Any, Annotation, String, ArgAssignable) ⇒ Unit): Unit

    Use this function to make an annotation automatically imply a validation function.

    Use this function to make an annotation automatically imply a validation function. This registers the annotation with *this* instance, so that any use of the annotation automatically adds the validation function on the field.

    In general, if you create user-defined annotation validation functions, you will want to call this in a base trait, which all your arg classes extend, so you can use those annotations anywhere.

    annotation

    the class of the annotation to add a validation function to

    validationFunction

    the function that will be called to validate every field marked w/ the annotation. The first argument is the default value of the argument, the second is the current value, the third is the annotation, and the fourth is the name of the argument (for error msgs).

    Definition Classes
    FieldArgs
  32. def registerParser[T](parser: Parser[T]): Unit

    add the ability to parse your own custom types.

    add the ability to parse your own custom types. Note that this registers the parser *globally*, not just for this object.

    Definition Classes
    Args
  33. def runValidation(): Unit

    run all validation functions.

    run all validation functions.

    Note that parse automatically runs all validation, so in general a user will not need to call this. However, if you are programatically filling in the the args of this object, you probably want to call this.

    Definition Classes
    Args
  34. def saveConfig(): Unit

    save the config back to the external source.

    save the config back to the external source. Any parameters for this method should have already been extracted from the call to readArgs

    as with readArgs, this should in general be implemented as an abstract override with a call to super

    Definition Classes
    ArgsExternalConfig
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def toString(): String

    Definition Classes
    AnyRef → Any
  37. var validationFunctions: Seq[() ⇒ Unit]

    Definition Classes
    Args
  38. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from FieldArgs

Inherited from Args

Inherited from Serializable

Inherited from Serializable

Inherited from ExternalConfig

Inherited from AnyRef

Inherited from Any

Ungrouped