org.objectweb.jac.aspects.naming
Class NameGenerator

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--org.objectweb.jac.aspects.naming.NameGenerator
All Implemented Interfaces:
Cloneable, Map, Serializable

public class NameGenerator
extends Hashtable

Generate names for objects using the classname and an integer counter.

See Also:
Serialized Form

Constructor Summary
NameGenerator()
          Creates a new NameGenerator
 
Method Summary
 String generateName(String className)
           
 long getCounter(String className)
          Gets the value of a counter
static long getCounterFromName(String name)
          Parses a name and returns its counter
 void setCounter(String className, long count)
          Sets a counter
 void update(Map counters)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameGenerator

public NameGenerator()
Creates a new NameGenerator

Method Detail

generateName

public String generateName(String className)

getCounterFromName

public static long getCounterFromName(String name)
Parses a name and returns its counter


getCounter

public long getCounter(String className)
Gets the value of a counter


setCounter

public void setCounter(String className,
                       long count)
Sets a counter


update

public void update(Map counters)