The Base Classes Library provide several useful classes and utilities that are used in other projects. Of course, the library can be used in external projects as well, as it is published under the GNU Lesser General Public License 3.0.
The last version published is 1.4.0. Release Notes can be viewed here.
<dependency> <groupid>eu.ralph-schuster</groupid> <artifactid>baselib</artifactid> <version>1.4.0</version> </dependency>
- Maven Site
- Release Notes
- Java Beans – explains constraints and usage of Java Beans in this part of the library
- Class Usage – explains what and how classes of this library can be used
- V1.3.1 – Javadoc – Maven Site – Release Notes
- V1.2.9 – Javadoc – Maven Site – Release Notes
- V1.1.0 – Javadoc – Maven Site – Release Notes
- V1.0.0 – Javadoc – Maven Site – Release Notes
This module is part of the Eclipse RCP Common Feature.
Bugs and Change Requests
A Jira instance is setup for you to report bugs and request changes. All you need to do is register and create a new issue for the project and respective module (called Component in Jira).
Available Packages and Classes
An interface to formally mark Java Bean behaviour. The interface defines the methods that all beans need to implement.
Basic implementation of Java Bean behaviour. The class provides the bean infrastructure required to properly behave like a Java Bean.
An interface marking an object as being able to configure itself from a Configuration object. ConfigurationUtils provides methods that can instantiate and setup such self-configurable objects.
The package provides a complete framework that allows crypting and decrypting strings or streams as well as signing them. Most important classes are Encrypter, Decrypter, DataSigner and EncryptionUtils. Latter also provides a fast method to generate random strings such as passwords or salts.
Various static methods to convert Java objects to their byte presentation and vice versa. These methods can be used to send Java objects over streams or into files with a ASCII-safe encoding, e.g. as BASE64 encoded strings (see also EncryptionUtils).
Most-likely one of the most useful classes of all. It will find a file on disk based on it’s name. It tries to access the file directly from disk or via a ClassLoader (search in classpath). As long as you are sure that a file in available via your classpath, this class will find it.
The class provides methods to find the specific signature of a generic class at runtime as well as methods to null-safe convert simple Java type objects (int, long, float, etc) from objects representing these objects (e.g. strings). The getBoolean() method has many more option for TRUE/FALSE than the standard Boolean Java class.
This class provides methods to handle tasks around files that are available in JAR files. There are methods providing you the Manifest files as well as complete lists of files for each JAR available.
This package defines the IPasswordCallback interface which can be used whenever your application requires a password. It probably can be better implemented through the JAAS means. However, for simple password requests, this interface is quite useful. The DefaultPasswordCallback will take a password from a configuration file.
This package provide a new annotation @IgnoreTest that can be used to further control your own unit tests. The annotation can hold a list of string (which you actually define yourself) that define what specific tests shall be ignored. Your unit tests can later verify the annotation to decide whether to test a specific element or not. This is useful when you want to e.g. test all setters of your objects but some classes define additional setters that need to be excluded from this kind of test.
Null-safe version of the Apache Commons Beans class. It compares objects null-safe by using a specific property of a bean.
DefaultComparator has a static instance variable that can be used when your comparison tasks are simple ones. The comparator will use the best available comparison method (Comparable, IDisplayable – see below, IDisplayProvider – see below, toString presentation).
Some minor methods including a correct version string comparison.
Defines an interface that allows objects to return different strings for different languages which shall be used for display to a front-end user.
Similar interface as IDisplayable but allows objects to return a single string only which shall be used for display to a front-end user.
Provides an infrastructure to store JAR package information in a properties file within the JAR and collect them later at runtime. All my Maven projects provide these properties files so that the version of all packages can be retrieved from the ReleaseRepository at runtime.
A replacement for the standard java.util.Date which is basically a Calendar instance. Using this class will ease computation with dates and calendars. RsDay, RsMonth and RsYear are classes based on RsDate but will represent days, months or years only. A DateTimePeriod class completes the date classes.
Simple interface for a wrapper class which allows retrieving the wrapped object if required.