javolution.lang |
Provides fundamental classes and interfaces; some of which are either missing from
the java.lang package or are not available for all platforms (including J2ME CLDC).
|
Java Source File Name | Type | Comment |
ClassInitializer.java | Class | This utility class allows for initialization of all classes
at startup to avoid initialization delays at an innapropriate time.
Note: Users might want to disable logging when initializing run-time
classes at start-up because of the presence of old classes (never used)
in the jar files for which initialization fails. |
Configurable.java | Class | This class facilitates separation of concerns between the configuration
logic and the application code.
Does your class need to know or has to assume that the configuration is
coming from system properties ??
The response is obviously NO!
Let's compare the following examples:[code]
class Document {
private static final Font DEFAULT_FONT
= Font.decode(System.getProperty("DEFAULT_FONT") != null ? System.getProperty("DEFAULT_FONT") : "Arial-BOLD-18");
...
}[/code]
With the following (using this class):[code]
class Document {
public static final Configurable DEFAULT_FONT = new Configurable(new Font("Arial", Font.BOLD, 18));
...
}[/code]
Not only the second example is cleaner, but the actual configuration
data can come from anywhere (even remotely). |
Enum.java | Class | |
Immutable.java | Interface | This interface identifies classes whose instances are not subject or
susceptible to change or variation after creation. |
MathLib.java | Class | This utility class ensures cross-platform portability of the math
library. |
Realtime.java | Interface | This interface identifies RTSJ safe
classes with predictable response time and supporting custom
javolution.context.AllocatorContext allocation policies (e.g.
javolution.context.StackContext "stack" allocations).
Instances of this class are typically created through an
javolution.context.ObjectFactory ObjectFactory . |
Reference.java | Interface | This interface represents an object reference, the reachability level
of a reference varies based on the actual reference implementation. |
Reflection.java | Class | This utility class greatly facilitates the use of reflection to invoke
constructors or methods which may or may not exist at runtime.
The constructors/methods are identified through their signatures
represented as a
String . |
Reusable.java | Interface | This interfaces identifies mutable objects capable of being used again
or repeatedly; once
Reusable.reset reset , reusable objects behave as if
they were brand-new.
Reusable instances should not allocate new internal objects after
creation except for the purpose of increasing their internal capacities. |
ValueType.java | Interface | This interface identifies objects which can be manipulated by
value; a JVM implementation may allocate instances of this class
on the stack and pass references by copy.
Realtime instances can be "explicitly" allocated on the
"stack" by executing within a
javolution.context.StackContext StackContext and creating new instances with an
javolution.context.ObjectFactory ObjectFactory . |