org.jibx.runtime.impl
Class RuntimeSupport

java.lang.Object
  extended by org.jibx.runtime.impl.RuntimeSupport

public abstract class RuntimeSupport
extends java.lang.Object

Support class providing methods used by generated code.

Author:
Dennis M. Sosnoski

Constructor Summary
RuntimeSupport()
           
 
Method Summary
static java.lang.String[] expandNamespaces(java.lang.String blob, java.lang.String[] uris)
          Expand names URI indexes into an array of individual names URIs.
static java.lang.String[] splitClassNames(int count, java.lang.String blob)
          Split concatenated class names string into an array of individual class names.
static java.lang.String[] splitNames(int count, java.lang.String blob)
          Split concatenated names string into an array of individual names.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeSupport

public RuntimeSupport()
Method Detail

splitClassNames

public static java.lang.String[] splitClassNames(int count,
                                                 java.lang.String blob)
Split concatenated class names string into an array of individual class names. This is used by the generated binding factory code, to reduce the size of the generated classes and methods. It takes as input a string consisting of compacted fully-qualified class names separated by '|' delimitor characters. If the compacted name starts with one or more '.' characters the corresponding number of package name levels are taken from the last class name. Empty names are left null in the array.

Parameters:
count - number of names
blob - compacted class names separated by '|' delimitors
Returns:
expanded class names

expandNamespaces

public static java.lang.String[] expandNamespaces(java.lang.String blob,
                                                  java.lang.String[] uris)
Expand names URI indexes into an array of individual names URIs. This is used by the generated binding factory code, to reduce the size of the generated classes and methods. It takes as input a string where each character is a namespace index, biased by +2 in order to avoid the use of null characters, along with a table of corresponding namespace URIs. The character value 1 is used as a marker for the case where no namespace is associated with an index.

Parameters:
blob - string of characters representing namespace indexes
uris - namespace URIs defined in binding
Returns:
expanded class names

splitNames

public static java.lang.String[] splitNames(int count,
                                            java.lang.String blob)
Split concatenated names string into an array of individual names. This is used by the generated binding factory code, to reduce the size of the generated classes and methods. It takes as input a string consisting of names separated by '|' delimitor characters.

Parameters:
count - number of names
blob - element names separated by '|' delimitors
Returns:
expanded class names


Project Web Site