alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td>Yes </tr> <tr> <td>Can add attributes to nested classes <td>Yes </tr> <tr> <td>Can add attributes to methods and constructors <td>Yes </tr> <tr> <td>Can add attributes to return values of methods <td>Yes </tr> <tr> <td>Can add attributes to method parameters <td>Yes </tr> <tr> <td>Can add attributes to fields <td>Yes </tr> <tr> <td>Type safe attributes <td>Yes </tr> <tr> <td>Ability to restrict targets <td>Yes, add an appropriate @@Target() attribute. </tr> <tr> <td>Attribute inheritance <td>Yes, add the @@Inheritable() attribue to any attribute you wish to be inheritable. </tr> <tr> <td>Inheritance without access to superclass source code <td>Yes </tr> <tr> <td>Named parameters in attribute declaration <td>Yes, corresponds to setter methods. A Sealable interface enables the instance to become read-only when all relevant setters have been called.</td> </tr> <tr> <td>Ability to quickly find all classes with a specific attribute <td>Yes, via attribute indexes. </tr> <tr> <td>Object attributes don't have to be serializable <td>Yes </tr> <tr> <td>Multiple attributes with same tag on an element <td>Yes, this is controlled by the attribute itself </tr> <tr> <th colspan="2"> Tools </th> </tr> <tr> <td>Ant task <td>Yes </tr> <tr> <td>Maven plugin <td>Yes </tr> <tr> <td>Javadoc Taglet <td>Yes (Note: Taglets only exist in Javadoc 1.4 and later) </tr> <tr> <td>Incremental compilation <td>Yes </tr> <tr> <td>Compile-time Validation <td>Yes </tr> <tr> <th colspan="2"> Implementation </th> </tr> <tr> <td>Attribute storage <td>Generated classes </tr> <tr> <td>Runtime code size <td>36kB </tr> <tr> <td>Unit test coverage <td>Excellent </tr> </table> </section> </body> </document>

Other Commons Attributes examples (source code examples)

Here is a short list of links related to this Commons Attributes index.xml source code file:

Commons Attributes example source code file (index.xml)

This example Commons Attributes source code file (index.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Commons Attributes tags/keywords

a, api, attributes, attributes, commons, commons, download, download, java, license, license, myattribute, users, you

The Commons Attributes index.xml source code

<?xml version="1.0"?>
<!--
=
= Copyright 2003-2004 The Apache Software Foundation
= 
= Licensed under the Apache License, Version 2.0 (the "License");
= you may not use this file except in compliance with the License.
= You may obtain a copy of the License at
= 
=     http://www.apache.org/licenses/LICENSE-2.0
= 
= Unless required by applicable law or agreed to in writing, software
= distributed under the License is distributed on an "AS IS" BASIS,
= WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
= See the License for the specific language governing permissions and
= limitations under the License.
=
-->
<document>

    <properties>
        <author email="commons-dev@jakarta.apache.org">Jakarta Commons Development Team
        <title>Overview
    </properties>

    <body>

        <section name="Overview">
            <p>
                Commons Attributes enables Java programmers to use C#/.Net-style
                attributes in their code.
            
                Please see the <a href="tutorial.html">tutorial and 
                <a href="reference.html">reference for a thorough explanation of the features
                and how the project integrates into the development process.
            </p>
        </section>

        <section name="News">
            <p>Please see the change log for summaries of code changes.

<p>2006-08-03

<ul> <li>

Attributes 2.2 is released (release notes)

</ul> <p>2004-08-15

<ul> <li>

Attributes 2.1 released!

</ul> <p>2004-07-12

<ul> <li>

Attributes promoted out of sandbox to Commons proper.

</ul> </section> <section name="Download and Installation"> <subsection name="Full Distribution"> <p>You can download the full Commons Attributes distribution here.

</subsection> <subsection name="Ant Users"> <p> Download the following files and put them in your <code>$ANT_HOME/lib directory: </p> <ul> <li> <p>Client API: commons-attributes-api-2.2.jar

</li> <li> <p>Ant task: commons-attributes-compiler-2.2.jar

</li> <li> <p>qDox 1.5: qdox-1.5.jar

</li> </ul> </subsection> <subsection name="Maven Users"> <p> Download the following files: </p> <ul> <li> <p>Client API: commons-attributes-api-2.2.jar

</li> <li> <p>Ant task: commons-attributes-compiler-2.2.jar

</li> <li> <p>Maven plugin: commons-attributes-plugin-2.2.jar

</li> </ul> <p>Drop the -api and -compiler jars into your ${maven repository}/commons-attributes/jars/ directory, and the Maven <code>-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:</p> <source> <groupId>commons-attributes <artifactId>commons-attributes-api <version>2.2 </dependency>]]> <p>The attribute compiler will act as a precompiler to the java:compile goal, so you do not need to do anything else.</p> </subsection> </section> <section name="A Quick Sample"> <p> Commons Attributes enables you to add attributes to your code: </p> <source> <p> As the example shows, the attributes are type-safe and provides for validation of values. </p> </section> <section name="Features"> <table> <tr> <th colspan="2"> API </th> </tr> <tr> <td>Can add attributes to classes
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.