com.jrefinery.report.io.simple
Class NameGenerator

java.lang.Object
  extended bycom.jrefinery.report.io.simple.NameGenerator

public class NameGenerator
extends java.lang.Object

The name generator is used to generate unique names for elements and bands.

Author:
Thomas Morgner.

Constructor Summary
NameGenerator()
          DefaultConstructor.
 
Method Summary
 java.lang.String generateName(java.lang.String name)
          If a name is supplied, then this method simply returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameGenerator

public NameGenerator()
DefaultConstructor.

Method Detail

generateName

public java.lang.String generateName(java.lang.String name)
If a name is supplied, then this method simply returns it. Otherwise, if name is null, then a unique name is generating by appending a number to the prefix '@anonymous'.

Parameters:
name - The name.
Returns:
a non-null name.