com.twitter.app

GlobalFlag

class GlobalFlag[T] extends Flag[T]

Declare a global flag by extending this class with an object.

object MyFlag extends GlobalFlag("my", "default value", "my global flag")

All such global flag declarations in a given classpath are visible, and are used by, com.twitter.app.App.

The name of the flag is the fully-qualified classname, for example, the flag

package com.twitter.server

object port extends GlobalFlag(8080, "the TCP port to which we bind")

is accessed by the name com.twitter.server.port.

Global flags may also be set by Java system properties with keys named in the same way, however values supplied by flags override those supplied by system properties.

Annotations
@GlobalFlagVisible()
Linear Supertypes
Flag[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GlobalFlag
  2. Flag
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GlobalFlag(help: String)(implicit _f: Flaggable[T], m: Manifest[T])

  2. new GlobalFlag(default: T, help: String)(implicit _f: Flaggable[T])

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. def apply(): T

    Return this flag's current value.

    Return this flag's current value. The default value is returned when the flag has not otherwise been set.

    Definition Classes
    Flag
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def defaultString: String

    String representation of this flag's default value

    String representation of this flag's default value

    Definition Classes
    Flag
  10. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. val flaggable: Flaggable[T]

    Attributes
    protected
    Definition Classes
    Flag
  14. def get: Option[T]

    Get the value if it has been set

    Get the value if it has been set

    Definition Classes
    Flag
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def getGlobalFlag: Flag[_]

  17. def getValue: Option[T]

    Attributes
    protected
    Definition Classes
    GlobalFlagFlag
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. def isDefined: Boolean

    True if the flag has been set

    True if the flag has been set

    Definition Classes
    Flag
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. val name: String

    Definition Classes
    GlobalFlagFlag
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def noArgumentOk: Boolean

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

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

    Definition Classes
    AnyRef
  26. def parse(): Unit

    Parse this flag with no argument.

    Parse this flag with no argument.

    Definition Classes
    Flag
  27. def parse(raw: String): Unit

    Parse value raw into this flag.

    Parse value raw into this flag.

    Definition Classes
    Flag
  28. def reset(): Unit

    Reset this flag's value

    Reset this flag's value

    Definition Classes
    Flag
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    String representation of this flag in -foo='bar' format, suitable for being used on the command line.

    String representation of this flag in -foo='bar' format, suitable for being used on the command line.

    Definition Classes
    Flag → AnyRef → Any
  31. def usageString: String

    Definition Classes
    Flag
  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Flag[T]

Inherited from AnyRef

Inherited from Any

Ungrouped