Class Variables

    • Field Detail

      • SEARCH_ALL_LAYERS

        public static int SEARCH_ALL_LAYERS
    • Method Detail

      • push

        public void push()
        Add new Variables layer on top of the stack.
      • push

        public void push​(Map<String,​Iterable<? extends org.jboss.windup.graph.model.WindupVertexFrame>> frame)
        Push the given Variables layer on top of the stack.
      • pop

        public Map<String,​Iterable<? extends org.jboss.windup.graph.model.WindupVertexFrame>> pop()
        Remove the top Variables layer from the the stack.
      • peek

        public Map<String,​Iterable<? extends org.jboss.windup.graph.model.WindupVertexFrame>> peek()
        Get the top Variables layer from the stack.
      • setSingletonVariable

        public void setSingletonVariable​(String name,
                                         org.jboss.windup.graph.model.WindupVertexFrame frame)
        Type-safe wrapper around setVariable which sets only one framed vertex.
      • setVariable

        public void setVariable​(String name,
                                Iterable<? extends org.jboss.windup.graph.model.WindupVertexFrame> frames)
        Set a variable in the top variables layer to given "collection" of the vertex frames. Can't be reassigned - throws on attempt to reassign.
      • removeVariable

        public void removeVariable​(String name)
        Remove a variable in the top variables layer.
      • findSingletonVariable

        public <T extends org.jboss.windup.graph.model.WindupVertexFrame> T findSingletonVariable​(String name)
        Wrapper around findVariable(String) which gives only one framed vertex, and checks if there is 0 or 1; throws otherwise.
      • findSingletonVariable

        public <FRAMETYPE extends org.jboss.windup.graph.model.WindupVertexFrame> FRAMETYPE findSingletonVariable​(Class<FRAMETYPE> type,
                                                                                                                  String name)
        Type-safe wrapper around findVariable(String) returns a unique WindupVertexFrame.
        Throws:
        IllegalStateException - If more than one frame was found.
      • findVariable

        public Iterable<? extends org.jboss.windup.graph.model.WindupVertexFrame> findVariable​(String name)
        Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.
      • findVariable

        public Iterable<? extends org.jboss.windup.graph.model.WindupVertexFrame> findVariable​(String name,
                                                                                               int maxDepth)
        Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise. If maxDepth is set to SEARCH_ALL_LAYERS, then search all layers.
      • findVariableOfType

        public <T extends org.jboss.windup.graph.model.WindupVertexFrame> Iterable<T> findVariableOfType​(Class<T> type)
        Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return null if not found.