Class CXMLElementBrowser


  • public class CXMLElementBrowser
    extends java.lang.Object
    Allows for browsing and finding elements part of a CXML instance.
    • Constructor Detail

      • CXMLElementBrowser

        public CXMLElementBrowser​(CXML cxml)
        Constructor.
        Parameters:
        cxml - the CXML instance
    • Method Detail

      • findHeader

        public Header findHeader()
        Returns:
        the header as a child of CXML or null if not found
      • findRequestByType

        public <T> T findRequestByType​(java.lang.Class<T> clazz)
        Parameters:
        clazz - the request type class
        Returns:
        the instance of the request type or null if not found
      • findRequest

        public Request findRequest()
        Returns:
        the request element or null if not found
      • findResponseByType

        public <T> T findResponseByType​(java.lang.Class<T> clazz)
        Finds a response by type.
        Parameters:
        clazz - the element type class
        Returns:
        the response element type or null if not found
      • findResponse

        public Response findResponse()
        Returns:
        the response instance of a CXML or null if not found
      • findElementInList

        protected <T> T findElementInList​(java.util.List<?> list,
                                          java.lang.Class<T> clazz)
      • hasResponse

        public boolean hasResponse()
        Checks whether there is Response instance.
        Returns:
        true if CXML contains element of type Response