private static ServiceTypeBase toServiceTypeBase(Class cls,boolean needCodebase) throws MarshalException {
  if (cls == null)   return null;
  SoftReference cref=(SoftReference)serviceMap.get(cls);
  ServiceTypeBase stype=null;
  if (cref != null)   stype=(ServiceTypeBase)cref.get();
  if (stype == null) {
    stype=new ServiceTypeBase(new ServiceType(cls,toServiceType(cls.getSuperclass()),toServiceType(cls.getInterfaces())),null);
    serviceMap.put(cls,new SoftReference(stype));
  }
  if (needCodebase && stype.codebase == null)   stype.setCodebase(cls);
  return stype;
}

private static ServiceTypeBase toServiceTypeBase ( Class cls , boolean needCodebase ) throws MarshalException { if ( cls == null ) return null ; SoftReference cref = ( SoftReference ) serviceMap . get ( cls ) ; ServiceTypeBase stype = null ; if ( cref != null ) stype = ( ServiceTypeBase ) cref . get ( ) ; if ( stype == null ) { stype = new ServiceTypeBase ( new ServiceType ( cls , toServiceType ( cls . getSuperclass ( ) ) , toServiceType ( cls . getInterfaces ( ) ) ) , null ) ; serviceMap . put ( cls , new SoftReference ( stype ) ) ; } if ( needCodebase && stype . codebase == null ) stype . setCodebase ( cls ) ; return stype ; }
returns a servicetypebase descriptor for a class . if needcodebase is false , the returned descriptor ' s codebase may be null .
