|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
Expression.Builder | Strategy interface used to construct in-memory representations of an expression. |
Class Summary | |
BeanHelper | Helper class that introspects and provides access to information about a JavaBean. |
Characters | Specification interface for identifying Characters. |
Constructors | Specification interface for identifying Constructors. |
EnumerationChain | Simple implementation of the Composite pattern for java.util.Enumeration. |
Expression | Helper class for parsing logical expressions and combining them using the AND, OR, and NOT operations. |
Fields | Specification interface for identifying Fields. |
Methods | Specification interface for identifying Methods. |
Parameters | Specification interface for identifying ordered sequences of Types. |
Parameters.Builder | Helper class for sequentially constructing the elements of a common TokenizedStrings specification. |
Strings | Specification interface for identifying Strings or parts of Strings. |
Strings.Builder | Helper class for sequentially constructing the elements of a common Strings specification. |
Throwables | Specification interface for identifying sets of Types. |
TokenizedStrings | Specification interface for identifying Strings or parts of Strings that are delimeted by a paticular character. |
TokenizedStrings.Builder | Helper class for sequentially constructing the elements of a common TokenizedStrings specification. |
Types | Specification interface for identifying types and classes. |
Exception Summary | |
BluesException | Base exception thrown by the Blues Framework. |
ParseException | Exception thrown when a string is unable to be parsed. |
ReflectionException | Exception thrown when a reflective invocation fails. |
Common utility classes used throughout the Blues Framework.
This package serves as the functional base to the entire Blues Framework, and maintains no dependancies on any resources besides those available in a basic Java 2 runtime environment. The primary features of this package are the Specification classes, as they can greatly simplify complicated reflection analysis routines.
Specifications are objects that encapsulate a single boolean condition and can evaluate that condition for any number of canidate values. For example, a simple Specification for matching upper-case characters might look like:
class IsUpperCase { boolean isSatisfiedby(char canidate) { return Character.isUpperCase(canidate); } }
While this class by itself is of little practical value, Specifications may also provide means to form composite Specifications using the logical AND, OR, and NOT operations. Properly applied, the Specification pattern can make testing complicated binary conditions much easier and simpler to understand by encapsulating complex if-else statements in a single object.
Blues provides a set of Specifications targeted at easing the interaction with the Java language reflection API. Using the classes in this package, programmers can easily formulate complex nested conditions to be tested against language primitives like Methods and Fields. The Specifications can also parse a very AspectJ-like pattern syntax into predicates, making defining these conditions outside of source code expressive and succinct.
The following classes in this package implement the Specification pattern:
Blues provides various other utilities including a bean introspector, a composite Enumeration class, and a textual predicate expression parser.
|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |