public void makeImmutable(){
  if (isMutable) {
    if (conditions != null) {
      int length=conditions.size();
      for (int i=0; i < length; i++) {
        Condition condition=(Condition)conditions.get(i);
        condition.makeImmutable();
      }
      conditions=Collections.unmodifiableList(conditions);
    }
    if (audienceRestrictions != null) {
      int length=audienceRestrictions.size();
      for (int i=0; i < length; i++) {
        AudienceRestriction ar=(AudienceRestriction)audienceRestrictions.get(i);
        ar.makeImmutable();
      }
      audienceRestrictions=Collections.unmodifiableList(audienceRestrictions);
    }
    if (oneTimeUses != null) {
      int length=oneTimeUses.size();
      for (int i=0; i < length; i++) {
        OneTimeUse oneTimeUse=(OneTimeUse)oneTimeUses.get(i);
        oneTimeUse.makeImmutable();
      }
      oneTimeUses=Collections.unmodifiableList(oneTimeUses);
    }
    if (proxyRestrictions != null) {
      int length=proxyRestrictions.size();
      for (int i=0; i < length; i++) {
        ProxyRestriction pr=(ProxyRestriction)proxyRestrictions.get(i);
        pr.makeImmutable();
      }
      proxyRestrictions=Collections.unmodifiableList(proxyRestrictions);
    }
    isMutable=false;
  }
}

public void makeImmutable ( ) { if ( isMutable ) { if ( conditions != null ) { int length = conditions . size ( ) ; for ( int i = 0 ; i < length ; i ++ ) { Condition condition = ( Condition ) conditions . get ( i ) ; condition . makeImmutable ( ) ; } conditions = Collections . unmodifiableList ( conditions ) ; } if ( audienceRestrictions != null ) { int length = audienceRestrictions . size ( ) ; for ( int i = 0 ; i < length ; i ++ ) { AudienceRestriction ar = ( AudienceRestriction ) audienceRestrictions . get ( i ) ; ar . makeImmutable ( ) ; } audienceRestrictions = Collections . unmodifiableList ( audienceRestrictions ) ; } if ( oneTimeUses != null ) { int length = oneTimeUses . size ( ) ; for ( int i = 0 ; i < length ; i ++ ) { OneTimeUse oneTimeUse = ( OneTimeUse ) oneTimeUses . get ( i ) ; oneTimeUse . makeImmutable ( ) ; } oneTimeUses = Collections . unmodifiableList ( oneTimeUses ) ; } if ( proxyRestrictions != null ) { int length = proxyRestrictions . size ( ) ; for ( int i = 0 ; i < length ; i ++ ) { ProxyRestriction pr = ( ProxyRestriction ) proxyRestrictions . get ( i ) ; pr . makeImmutable ( ) ; } proxyRestrictions = Collections . unmodifiableList ( proxyRestrictions ) ; } isMutable = false ; } }
makes the object immutable
