package instances
Contains implicit values used by type classes.
The implicit values are used by the ShowLocal, JsonLocal and ConfigureReader type classes to print out language dependent strings, language dependent JSON strings and read configuration values respectively.
Implicit values exist for the following classes:
- ConfigureReader (read)
- Error (showLocal, jsonLocal)
- Int (showLocal, jsonLocal)
- List (showLocal, jsonLocal)
- Message (showLocal, jsonLocal)
java.time.OffsetDateTime
(showLocal, jsonLocal)java.lang.String
(showLocal, jsonLocal)java.lang.Throwable (showLocal, jsonLocal)
The method names appended in brackets are the extension methods added by the implicit values.
- Source
- package.scala
Type Members
- trait ConfigureReaderInstances extends AnyRef
Contains implicit value for ConfigureReader
Contains implicit value for ConfigureReader
The
Instances
naming convention implies the trait contains implicit values used as implicit arguments toConfigure
methods.The trait is mixed into Implicits to make the implicit values available through one import statement.
- trait ErrorExceptionInstances extends AnyRef
Contains implicit values for ErrorException
Contains implicit values for ErrorException
The
Instances
naming convention implies the trait contains implicit values used as implicit arguments toErrorException
methods.The trait is mixed into Implicits to make the implicit values available through one import statement.
- trait ErrorInstances extends AnyRef
Contains implicit values for Error
- trait IntInstances extends AnyRef
Contains implicit values for Int
- trait ListInstances extends AnyRef
Contains implicit values for List
Contains implicit values for List
The
Instances
naming convention implies the trait contains implicit values used as implicit arguments toList[_]
methods.The trait is mixed into Implicits to make the implicit values available through one import statement.
The implicit implementations are generic in nature in that they apply to any type of List. If a specific List type requires special handling then an explicit implicit implementation for that type must be provided.
- trait MessageInstances extends AnyRef
Contains implicit values for Message
- trait OffsetDateTimeInstances extends AnyRef
Contains implicit values for
java.time.OffsetDateTime
Contains implicit values for
java.time.OffsetDateTime
The
Instances
naming convention implies the trait contains implicit values used as implicit arguments toError
methods.The trait is mixed into Implicits to make the implicit values available through one import statement.
- trait StringInstances extends AnyRef
Contains implicit values for
java.lang.String
.Contains implicit values for
java.lang.String
.The
Instances
naming convention implies the trait contains implicit values used as implicit arguments toError
methods.The trait is mixed into Implicits to make the implicit values available through one import statement.
- trait ThrowableInstances extends AnyRef
Contains implicit values for
java.lang.Throwable
and subclassesContains implicit values for
java.lang.Throwable
and subclassesThe
Instances
naming convention implies the trait contains implicit values used as implicit arguments toThrowable
and subclasses methods.The trait is mixed into Implicits to make the implicit values available through one import statement.
Documentation for the Axiell Utilities Project
Overview
The Axiell Utilities Project attempts to provide a small library of classes and object applicable to most Axiell developments. The library is not geared towards any one project and so should be useful for new projects as well as existing ones.
The library is based on a few simple principles, namely:
Package structure
The
package consists of a number of utilities, where each utility provides a single piece of functionality.com.axiell.util
Notable utilities are:
Configure
generic configuration reader allowing application settings defined as resources to be interrogated.Error
generic error handling class defining a locale independent error message along with details relating to the context of the error. The context may include an exception and other relevant values.Formatter
retrieves and formats a locale specific string from a specified resource bundle. The formatting is specified in aC
printf style.Implicits
implements implicit methods and classes used to pimp methods onto existing classes (e.g.fold()
method toBoolean
class) and to provide implicit implementations for the JsonLocal and ShowLocal type classes.JsonLocal
type class used to output locale specific JSON structures. Implementations exist for Message and Error.Message
provides a locale independent mechanism for handling strings. The strings for a given locale are stored in resource bundles that are accessed when the message is to be displayed.ShowLocal
type class used to show locale specific strings. Allows Message and Error to be converted to a given language string.Dependencies
The list of dependencies are:
Typesafe Config
a generic configuration file reader. The library is used by theConfigure
class to access settings stored as resources within an application.