All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.prowidesoftware.swift.utils.IMessageVisitor Maven / Gradle / Ivy

There is a newer version: SRU2023-10.1.16
Show newest version
/*
 * Copyright 2006-2023 Prowide
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.prowidesoftware.swift.utils;

import com.prowidesoftware.swift.model.*;

/**
 * Interface to be implemented by classes that will 'visit' a swift message.
 * 

* There method call sequence is as follows: * *

    *
  1. startMessage
  2. *
  3. startBlock1 -> value -> endBlock1 (if block 1 exists)
  4. *
  5. startBlock2 -> value -> endBlock2 (if block 2 exists)
  6. *
  7. startBlock3 -> tag (for every tag) -> endBlock3 (if block 3 exists)
  8. *
  9. startBlock4 -> tag (for every tag) -> endBlock4 (if block 4 exists)
  10. *
  11. startBlock5 -> tag (for every tag) -> endBlock5 (if block 5 exists)
  12. *
  13. startBlockUser -> tag (for every tag) -> endBlockUser (for every user defined block and every tag of that block)
  14. *
  15. endMessage
  16. *
* *

Notice that the tag and value methods are overloaded for every type of SwiftBlock * derived class. * *

NOTE: this API has changed since 4.0 with SwiftBlocks 1-5 in each start/end * method pairs. */ public interface IMessageVisitor { /** * @param b block to visit */ void startBlock1(SwiftBlock1 b); /** * @param b block to visit */ void startBlock2(SwiftBlock2 b); /** * @param b block to visit */ void startBlock3(SwiftBlock3 b); /** * @param b block to visit */ void startBlock4(SwiftBlock4 b); /** * @param b block to visit */ void startBlock5(SwiftBlock5 b); /** * @param b block to visit */ void startBlockUser(SwiftBlockUser b); /** * @param b block to visit */ void endBlock1(SwiftBlock1 b); /** * @param b block to visit */ void endBlock2(SwiftBlock2 b); /** * @param b block to visit */ void endBlock3(SwiftBlock3 b); /** * @param b block to visit */ void endBlock4(SwiftBlock4 b); /** * @param b block to visit */ void endBlock5(SwiftBlock5 b); /** * @param b block to visit */ void endBlockUser(SwiftBlockUser b); void tag(SwiftBlock3 b, Tag t); void tag(SwiftBlock4 b, Tag t); void tag(SwiftBlock5 b, Tag t); void tag(SwiftBlockUser b, Tag t); void value(SwiftBlock1 b, String v); void value(SwiftBlock2 b, String v); void startMessage(SwiftMessage m); void endMessage(SwiftMessage m); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy