Class ComponentRequirement

    • Constructor Detail

      • ComponentRequirement

        public ComponentRequirement()
    • Method Detail

      • getFieldName

        public String getFieldName()
        Returns the field name that this component requirement will inject.
        Returns:
        the field name that this component requirement will inject
      • setFieldName

        public void setFieldName​(String fieldName)
        Sets the name of the field that will be populated by the required component.
        Parameters:
        fieldName - the name of the field to be populated
      • getRole

        public String getRole()
        Returns the role of the required component.
        Returns:
        the role of the required component
      • setRole

        public void setRole​(String role)
        Sets the role of the require component.
        Parameters:
        role - the required component's role
      • getRoleHint

        public String getRoleHint()
        Returns the role-hint of the required component.
        Returns:
        the role-hint of the required component
      • setRoleHint

        public void setRoleHint​(String roleHint)
        Sets the role-hint of the require component. Passing null or an empty string will match any available implementation.
        Parameters:
        roleHint - the required component's role-hint
      • getFieldMappingType

        public String getFieldMappingType()
        Returns the type of the field this component requirement will inject.
        Returns:
        the type of the field this component requirement will inject
      • setFieldMappingType

        public void setFieldMappingType​(String fieldType)
        Sets the type of the field that will be populated by the required component.
        Parameters:
        fieldType - the type of the field to be populated
      • isOptional

        public boolean isOptional()
        Whether this component requirement is optional and needs not be satisfied
        Returns:
        true if the requested component may be missing, false if the component is mandatory.
        Since:
        1.3.0
      • setOptional

        public void setOptional​(boolean optional)
        Controls whether a failure to satisfy this requirement can be tolerated by host component or whether construction of the host component should also fail.
        Parameters:
        optional - true if the requested component may be missing, false if the component is mandatory.
        Since:
        1.3.0
      • getHumanReadableKey

        public String getHumanReadableKey()
        Returns a human-friendly key, suitable for display.
        Returns:
        a human-friendly key
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object