[Biojava-dev] bjv2 alpha 3

Michael Heuer heuermh at acm.org
Fri May 21 12:44:02 EDT 2004


On Fri, 21 May 2004, Matthew Pocock wrote:

>   org.bjv2.rdf:
>     API for representing Java classes and objects as RDFS and RDF.
>     This supports a fully pluggable architecture, so that multiple
> classes can be mapped to the same RDF type, properties can be explicitly
> mapped to RDF properties, and instances can be checked for metaData
> fields (e.g. Feature.getType() can result in different RDFS documents
> being produced for features with different types, or an instance of
> Annotation or Map may have a schema that contains information about
> which properties are present).

Sounds interesting, but what can we use this for?


>   @Utility annotation
>     This flags a class as being a utility class. This means that it must
> expose only static fields and methods, and must not be instantiable.
> More coding-style validators will follow.

While this pattern is good coding style, it causes problems in certian
environments that require no-arg constructors.

Most (if not all) of the apache projects now include a constructor like

  /**
   * <code>XxxUtils</code> should not normally be instantiated.  This
   * constructor is public to permit tools that require a JavaBean
   * instance to operate.
   */
  public XxxUtils()
  {
    // empty
  }

in utility classes.  See e.g.

> http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/ArrayUtils.html

   michael



More information about the biojava-dev mailing list