Class DynamicFactory.ConstructorKey

    • Constructor Detail

      • ConstructorKey

        public ConstructorKey()
    • Method Detail

      • intf

        public abstract Class<?> intf()
        Access the interface this key indexes.
        Returns:
        class of the interface
      • type

        public abstract Class<?> type​(int i)
        Access the type of class at the given parameter index.
        Parameters:
        i - index of the parameter
        Returns:
        class of the parameter at index
      • n

        public abstract int n()
        Access the number of parameters in the constructor.
        Returns:
        number of parameters
      • isUniform

        public boolean isUniform()
        Indicates whether this key has multiple parameters and they are of uniform type. If there are less then two types this method will return false. new Object[]{ Atom, Bond, Atom } // false new Object[]{ Atom, Atom, Atom } // true
        Returns:
        whether the key is uniform
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isAssignable

        public boolean isAssignable​(DynamicFactory.ConstructorKey candidate)
        Checks whether this key is assignable to the candidate.
        Parameters:
        candidate - another constructor key
        Returns:
        whether the provided candidate is assignable