Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

AliasCompiler Class Reference

Inheritance diagram for AliasCompiler:

Inheritance graph
[legend]
Collaboration diagram for AliasCompiler:

Collaboration graph
[legend]
List of all members.

Public Methods

String writeComponent (XMLElement _current_component, String _element_name, String _configuration_var_name, Writer _writer, String _configuration_name) throws IOException

Static Private Attributes

int nb = 0

Detailed Description

XML Alias tag to runtime component java code compiler. Used by XML2Kernel through its getTagCompiler() method to write Alias tags' java code compilation.

Definition at line 40 of file AliasCompiler.java.


Member Function Documentation

String AliasCompiler::writeComponent ( XMLElement _current_component,
String _element_name,
String _configuration_var_name,
Writer _writer,
String _configuration_name ) [inline]
 

Translates a XML ALIAS element to the java code creating its corresponding alias runtime component.

Parameters:
_current_component   the Alias XML tag to be compiled
_element_name   its element name
_configuration_var_name   its containing configuration java code variable name
_writer   where to write the translated java code
_configuration_name   the alias's configuration name XML property

Reimplemented from TagCompiler.

Definition at line 55 of file AliasCompiler.java.

00060                          {
00061       
00062       String $current_tag = _current_component.getTagName();
00063       
00064       if ($current_tag.equals("ALIAS")){
00065          String $alias = _current_component.getProperty("NAME");
00066          String $var_name = "ALIAS" + (nb++); 
00067          _writer.write("         Component " + $var_name + 
00068                        " = new org.objectweb.jonathan.libs.kernel.decoders.JAlias(\"" + 
00069                        XML2Kernel.normalize($alias)+ "\",'/');\n");
00070          return $var_name;
00071       } else {
00072          throw new IOException("TAG error at line " + _current_component.getLineNr() + ":\n" +
00073                                "ALIAS excepted instead of " + $current_tag);
00074       }      
00075    }


Member Data Documentation

int AliasCompiler::nb = 0 [static, private]
 

Definition at line 42 of file AliasCompiler.java.


The documentation for this class was generated from the following file:
Generated at Fri May 31 19:23:41 2002 for Jonathan by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001