Class Plugin


  • public class Plugin
    extends java.lang.Object
    A list of types with a name and ClassLoader together representing a plugin that can be loaded or unloaded as a whole.
    • Constructor Summary

      Constructors 
      Constructor Description
      Plugin​(java.lang.String name, java.util.List<java.lang.reflect.Type> types, java.lang.ClassLoader classLoader)
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.ClassLoader getClassLoader()
      Returns the ClassLoader if the plugin was not unloaded.
      java.util.List<java.lang.reflect.Type> getTypes()
      Returns a list of Types if the plugin was not unloaded.
      boolean isUnloaded()
      Returns true if this plugin is unloaded, otherwise false.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Plugin

        public Plugin​(java.lang.String name,
                      java.util.List<java.lang.reflect.Type> types,
                      java.lang.ClassLoader classLoader)
        Constructs a new instance.
        Parameters:
        name - a name for the plugin
        types - a list of Types part of the plugin, cannot be null or contains nulls
        classLoader - a ClassLoader, cannot be null
    • Method Detail

      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Returns the ClassLoader if the plugin was not unloaded.
        Returns:
        the ClassLoader or null if unloaded
      • getTypes

        public java.util.List<java.lang.reflect.Type> getTypes()
        Returns a list of Types if the plugin was not unloaded.
        Returns:
        a list of Types, immutable and never contains null, or, returns null if unloaded
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isUnloaded

        public boolean isUnloaded()
        Returns true if this plugin is unloaded, otherwise false.
        Returns:
        true if this plugin is unloaded, otherwise false