Class ActorClassTreeFilter

  • All Implemented Interfaces:
    StrictClassTreeFilter

    public class ActorClassTreeFilter
    extends AbstractItemFilter
    implements StrictClassTreeFilter
    Filter for actors. Takes the generates/accepts of each actor into account and compares it against the
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_Accepts

        protected Class[] m_Accepts
        the classes that the actor must accept, null if not relevant.
      • m_Generates

        protected Class[] m_Generates
        the classes that the actor must generate, null if not relevant.
      • m_Compatibility

        protected Compatibility m_Compatibility
        for checking the compatibility.
      • m_StandalonesAllowed

        protected boolean m_StandalonesAllowed
        whether standalones are allowed.
      • m_SourcesAllowed

        protected boolean m_SourcesAllowed
        whether sources are allowed.
      • m_Restrictions

        protected Class[] m_Restrictions
        whether we are restricted to classes/interfaces.
      • m_ItemClassCache

        protected static Map<String,​Class> m_ItemClassCache
        for caching item/class relationship.
      • m_ClassActorCache

        protected static Map<Class,​Actor> m_ClassActorCache
        for caching class/instance relationship.
    • Constructor Detail

      • ActorClassTreeFilter

        public ActorClassTreeFilter()
    • Method Detail

      • setStrict

        public void setStrict​(boolean value)
        Sets whether to use strict or relaxed filtering.
        Specified by:
        setStrict in interface StrictClassTreeFilter
        Parameters:
        value - if true strict mode is enabled
      • isStrict

        public boolean isStrict()
        Returns whether strict or relaxed filtering is used.
        Specified by:
        isStrict in interface StrictClassTreeFilter
        Returns:
        true if strict mode is enabled
      • setStandalonesAllowed

        public void setStandalonesAllowed​(boolean value)
        Sets whether standalones are allowed.
        Parameters:
        value - if true then standalones are allowed
      • getStandalonesAllowed

        public boolean getStandalonesAllowed()
        Returns whether standalones are allowed.
        Returns:
        true if standalones are allowed
      • setSourcesAllowed

        public void setSourcesAllowed​(boolean value)
        Sets whether sources are allowed.
        Parameters:
        value - if true then sources are allowed
      • getSourcesAllowed

        public boolean getSourcesAllowed()
        Returns whether sources are allowed.
        Returns:
        true if sources are allowed
      • setAccepts

        public void setAccepts​(Class[] value)
        Sets the classes that the actor must accept.
        Parameters:
        value - the classes, null if to ignore
      • getAccepts

        public Class[] getAccepts()
        Returns the classes that the actor must accept.
        Returns:
        the classes, null if ignored
      • setGenerates

        public void setGenerates​(Class[] value)
        Sets the classes that the actor must generate.
        Parameters:
        value - the classes, null if to ignore
      • getGenerates

        public Class[] getGenerates()
        Returns the classes that the actor must generate.
        Returns:
        the classes, null if ignored
      • setRestrictions

        public void setRestrictions​(Class[] value)
        Sets the classes/interfaces that are allowed.
        Parameters:
        value - the classes, null if to ignore
      • getRestrictions

        public Class[] getRestrictions()
        Returns the classes/interfaces that are allowed.
        Returns:
        the classes, null if ignored
      • doFilter

        protected boolean doFilter​(String item)
        Performs the actual filtering.
        Specified by:
        doFilter in class AbstractItemFilter
        Parameters:
        item - the class to check
        Returns:
        true if class can be displayed in the ClassTree
      • toString

        public String toString()
        Returns a short representation of the filter.
        Specified by:
        toString in class AbstractItemFilter
        Returns:
        the representation