Return-Path:
- You can grab the snapshot jars here: -
+
+ Download the following files and put them in your $ANT_HOME/lib
directory:
+
Client API: commons-attributes-api-SNAPSHOT.jar
+Ant task: commons-attributes-compiler-SNAPSHOT.jar
+Commons Collections 2.1: commons-collections-2.1.jar
+Xjavadoc 1.0: xjavadoc-1.0.jar
++ Download the following files: +
+Client API: commons-attributes-api-SNAPSHOT.jar
@@ -52,9 +76,9 @@Drop the client API and the ant task jars into your ${maven repository}/commons-attributes/jars/ directory, and the - maven plugin in your ${maven home}/plugins/ directory. You can now use attributes in your Java code, provided that - you declare a dependency on the client API:
+Drop the -api
and -compiler
jars into your ${maven repository}/commons-attributes/jars/
+ directory, and the Maven -plugin
in your ${maven home}/plugins/
directory.
+ You can now use attributes in your Java code, provided that you declare a dependency on the client API:
Commons Attributes enables Java programmers to use C#/.Net-style attributes in their code. Please see the Javadoc overview for a thorough explanation of the features and how the project integrates into the development process.
Download the following files and put them in your $ANT_HOME/lib
directory:
Client API: commons-attributes-api-SNAPSHOT.jar
Ant task: commons-attributes-compiler-SNAPSHOT.jar
Commons Collections 2.1: commons-collections-2.1.jar
Xjavadoc 1.0: xjavadoc-1.0.jar
Download the following files:
Client API: commons-attributes-api-SNAPSHOT.jar
Ant task: commons-attributes-compiler-SNAPSHOT.jar
Maven plugin: commons-attributes-plugin-2.0alpha.jar
Drop the -api
and -compiler
jars into your ${maven repository}/commons-attributes/jars/
directory, and the Maven -plugin
in your ${maven home}/plugins/
directory.
You can now use attributes in your Java code, provided that you declare a dependency on the client API:
The attribute compiler will act as a precompiler to the java:compile goal, so you do not need to do anything else.
Commons Attributes enables you to add attributes to your code:
As the example shows, the attributes are type-safe and provides for validation of values.
Can add attributes to classes | Yes |
Can add attributes to nested classes | Yes |
Can add attributes to methods and constructors | Yes |
Can add attributes to return values of methods | Yes |
Can add attributes to method parameters | Yes |
Can add attributes to fields | Yes |
Type safe attributes | Yes |
Attribute inheritance | Yes, add the @@Inheritable() attribue to any attribute you wish to be inheritable. |
Inheritance without access to superclass source code | Yes |
Named parameters in attribute declaration | Yes, corresponds to setter methods. A Sealable interface enables the instance to become read-only when all relevant setters have been called. |
Ability to quickly find all classes with a specific attribute | Yes, via attribute indexes. |
Ant task | Yes |
Maven plugin | Yes |
Object attributes don't have to be serializable | Yes |
Multiple attributes with same tag on an element | Yes, this is controlled by the attribute itself |
Incremental compilation | Yes |
Attribute storage | Generated classes |
Runtime code size | 21kB |
Unit test coverage | Excellent |