1 24 25 package org.objectweb.clif.util; 26 27 import java.util.Map ; 28 import java.util.HashMap ; 29 import java.math.BigInteger ; 30 31 32 36 abstract public class ItfName 37 { 38 static protected Map interfaces = new HashMap (); 39 40 45 static public String gen(String itfBaseName) 46 { 47 BigInteger lastId = (BigInteger ) interfaces.get(itfBaseName); 48 if (lastId == null) 49 { 50 lastId = BigInteger.ZERO; 51 } 52 else 53 { 54 lastId = lastId.add(BigInteger.ONE); 55 } 56 interfaces.put(itfBaseName, lastId); 57 return itfBaseName + lastId; 58 } 59 } 60 | Popular Tags |