org.japano.metadata
Class MetadataProcessor

java.lang.Object
  extended by org.japano.metadata.MetadataProcessor

public class MetadataProcessor
extends java.lang.Object

Creates tag library definitions from javadoc attributes in pagenode and action sources.

Version:
$Id: MetadataProcessor.java,v 1.24 2005/11/30 03:54:38 fforw Exp $ SourceForge.net Logo
Author:
Sven Helmberger ( sven dot helmberger at gmx dot de )

Field Summary
protected static java.util.regex.Pattern ACTION_NAME_PATTERN
           
protected static java.util.regex.Pattern EXTENSION_PATTERN
           
static java.lang.String JAPANO_TAG_PREFIX
           
protected static java.util.regex.Pattern LIBNAME_PATTERN
           
static java.lang.String NEWLINE
           
static java.lang.String TAGLIB_MAP
          File which contains the URIs of all base tag libs.
protected static java.util.regex.Pattern TAGNAME_PATTERN
           
static java.lang.String TLD_SUFFIX
           
 
Constructor Summary
MetadataProcessor()
           
 
Method Summary
static Bean createBean(MetadataClass mdClass)
          Introspects the given class and returns a Bean including default parameters created from it.
static java.lang.String getPackage(MetadataClass mdClass)
           
static Parameter getParameter(MetadataMethod accessor, MetadataMethod mutator)
           
 java.lang.String getRealPath(java.lang.String location)
           
 java.lang.String getTagLibraryURI(MetadataClass mdClass)
          Returns the tag library URI for a given XClass.
static java.lang.String getTLDNameFromURI(java.lang.String libraryURI)
           
 java.lang.String getWebAppPath()
           
 void log(java.lang.String msg)
           
 void process(java.util.List typeDecls)
           
 void setAddAttributeDescriptionFix(boolean fix)
           
 void setJar(boolean isJAR)
          If set to true, enables jar mode.
 void setWebApp(java.lang.String webApp)
          Sets the Path for the web application to generate tag library definitions for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEWLINE

public static final java.lang.String NEWLINE

JAPANO_TAG_PREFIX

public static final java.lang.String JAPANO_TAG_PREFIX
See Also:
Constant Field Values

TLD_SUFFIX

public static final java.lang.String TLD_SUFFIX
See Also:
Constant Field Values

TAGNAME_PATTERN

protected static java.util.regex.Pattern TAGNAME_PATTERN

LIBNAME_PATTERN

protected static java.util.regex.Pattern LIBNAME_PATTERN

ACTION_NAME_PATTERN

protected static java.util.regex.Pattern ACTION_NAME_PATTERN

EXTENSION_PATTERN

protected static java.util.regex.Pattern EXTENSION_PATTERN

TAGLIB_MAP

public static final java.lang.String TAGLIB_MAP
File which contains the URIs of all base tag libs.

See Also:
Constant Field Values
Constructor Detail

MetadataProcessor

public MetadataProcessor()
Method Detail

setWebApp

public void setWebApp(java.lang.String webApp)
Sets the Path for the web application to generate tag library definitions for.

Parameters:
webApp - web application path

setJar

public void setJar(boolean isJAR)
If set to true, enables jar mode.


setAddAttributeDescriptionFix

public void setAddAttributeDescriptionFix(boolean fix)

process

public void process(java.util.List typeDecls)

getRealPath

public java.lang.String getRealPath(java.lang.String location)

getWebAppPath

public java.lang.String getWebAppPath()

getTagLibraryURI

public java.lang.String getTagLibraryURI(MetadataClass mdClass)
Returns the tag library URI for a given XClass. Ensures that inner classes are alwasy in the same package than the enclosing class.

Parameters:
mdClass - metadata class info
Returns:
tag library URI

getTLDNameFromURI

public static java.lang.String getTLDNameFromURI(java.lang.String libraryURI)

getPackage

public static java.lang.String getPackage(MetadataClass mdClass)

getParameter

public static Parameter getParameter(MetadataMethod accessor,
                                     MetadataMethod mutator)

createBean

public static Bean createBean(MetadataClass mdClass)
Introspects the given class and returns a Bean including default parameters created from it.

Parameters:
mdClass - Class to construct the default Bean for.
Returns:
Bean

log

public void log(java.lang.String msg)