Class ComponentLoader


  • public class ComponentLoader
    extends java.lang.Object
    • Constructor Detail

      • ComponentLoader

        public ComponentLoader()
      • ComponentLoader

        public ComponentLoader​(boolean checkRequiredInterfacesResolvable)
      • ComponentLoader

        public ComponentLoader​(java.io.File jsonFile)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • ComponentLoader

        public ComponentLoader​(java.io.File jsonFile,
                               boolean checkRequiredInterfacesResolvable)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • readFromString

        public void readFromString​(java.lang.String json)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • loadComponents

        public ComponentLoader loadComponents​(java.io.File componentDescriptionFile)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getUnresolvableRequiredInterfaces

        public java.util.Collection<java.lang.String> getUnresolvableRequiredInterfaces()
        Returns:
        Returns the collection of required interfaces that cannot be resolved by a provided interface.
      • getComponentAsJsonNode

        public com.fasterxml.jackson.databind.JsonNode getComponentAsJsonNode​(java.lang.String componentName)
        Parameters:
        componentName - The name of the component.
        Returns:
        Returns the collection of required interfaces that cannot be resolved by a provided interface.
      • getComponents

        public java.util.Collection<Component> getComponents()
        Returns:
        The collection of parsed components.
      • getComponentWithName

        public Component getComponentWithName​(java.lang.String name)
        This method searches for a component with the given name. If such a component does not exist, a NoSuchElementException is thrown.
        Parameters:
        name - The name of the component in question.
        Returns:
        The component for the given name.
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getJsonNodeComponents

        public java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.JsonNode> getJsonNodeComponents()