org.codehaus.aspectwerkz.metadata
Class AttributeC

java.lang.Object
  extended byorg.codehaus.aspectwerkz.metadata.AttributeC

public class AttributeC
extends java.lang.Object

Parses a given source tree and compiles "runtime attributes" (set as JavaDoc tags throughout the code) into an XML definition.

Can be called from the command line.

Validation is turned off by default. To turn it on feed the JVM with: -Daspectwerkz.definition.validate=true

Author:
Jonas Bonér

Field Summary
static java.lang.String CALLERSIDE_POINTCUT_NAME
           
static java.lang.String CFLOW_POINTCUT_NAME
           
static java.lang.String CONTROLLER_POINTCUT_NAME
           
static java.lang.String GETFIELD_POINTCUT_NAME
           
static java.lang.String METHOD_POINTCUT_NAME
           
static java.lang.String SETFIELD_POINTCUT_NAME
           
static java.lang.String THROWS_POINTCUT_NAME
           
 
Constructor Summary
AttributeC()
           
 
Method Summary
static void compile(java.lang.String sourcePath, java.lang.String fileName)
          Parses a given source tree, retrieves the runtime attributes defined in the code and creates an XML definition based on these attributes.
static void compile(java.lang.String sourcePath, java.lang.String fileName, java.lang.String definitionFileToMerge, java.lang.String uuid)
          Parses a given source tree, retrieves the runtime attributes defined in the code and creates an XML definition based on these attributes.
static org.dom4j.Document createDocument(AspectWerkzDefinition definition, java.lang.String uuid)
          Creates a DOM documents out of the definition.
static void main(java.lang.String[] args)
          Runs the compiler from the command line.
static void parseRuntimeAttributes(AspectWerkzDefinition definition, java.lang.String sourcePath)
          Parses the attributes and creates definitions for the matching attributes.
static void writeDocumentToFile(org.dom4j.Document document, java.lang.String fileName)
          Writes a DOM document to file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD_POINTCUT_NAME

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

SETFIELD_POINTCUT_NAME

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

GETFIELD_POINTCUT_NAME

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

THROWS_POINTCUT_NAME

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

CALLERSIDE_POINTCUT_NAME

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

CFLOW_POINTCUT_NAME

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

CONTROLLER_POINTCUT_NAME

public static final java.lang.String CONTROLLER_POINTCUT_NAME
See Also:
Constant Field Values
Constructor Detail

AttributeC

public AttributeC()
Method Detail

compile

public static void compile(java.lang.String sourcePath,
                           java.lang.String fileName)
Parses a given source tree, retrieves the runtime attributes defined in the code and creates an XML definition based on these attributes.

Parameters:
sourcePath - the path to the sources to compile attributes for
fileName - the full name of the file name to compile the attributes to

compile

public static void compile(java.lang.String sourcePath,
                           java.lang.String fileName,
                           java.lang.String definitionFileToMerge,
                           java.lang.String uuid)
Parses a given source tree, retrieves the runtime attributes defined in the code and creates an XML definition based on these attributes.

Parameters:
sourcePath - the path to the sources to compile attributes for
fileName - the full name of the file to compile the attributes to
definitionFileToMerge - the full name of the file to merge the compiled definition with
uuid - the UUID for the definition

parseRuntimeAttributes

public static void parseRuntimeAttributes(AspectWerkzDefinition definition,
                                          java.lang.String sourcePath)
Parses the attributes and creates definitions for the matching attributes.

Parameters:
definition - the definition
sourcePath - the path to the source dir

createDocument

public static org.dom4j.Document createDocument(AspectWerkzDefinition definition,
                                                java.lang.String uuid)
Creates a DOM documents out of the definition.

Parameters:
definition - the AspectWerkz definition
uuid - the UUID for the definition
Returns:
the DOM document

writeDocumentToFile

public static void writeDocumentToFile(org.dom4j.Document document,
                                       java.lang.String fileName)
Writes a DOM document to file.

Parameters:
document - the document
fileName - the name of the file (full path)

main

public static void main(java.lang.String[] args)
Runs the compiler from the command line.

Parameters:
args -


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.