Class EffectiveStatementBase<A,​D extends DeclaredStatement<A>>

    • Constructor Detail

      • EffectiveStatementBase

        protected EffectiveStatementBase​(StmtContext<A,​D,​?> ctx)
        Constructor.
        Parameters:
        ctx - context of statement.
    • Method Detail

      • initSubstatements

        protected Collection<? extends EffectiveStatement<?,​?>> initSubstatements​(Collection<? extends StmtContext<?,​?,​?>> substatementsInit)
        Create a set of substatements. This method is split out so it can be overridden in ExtensionEffectiveStatementImpl to leak a not-fully-initialized instance.
        Parameters:
        substatementsInit - proposed substatements
        Returns:
        Filtered substatements
      • get

        public final <K,​V,​N extends IdentifierNamespace<K,​V>> Optional<? extends V> get​(Class<N> namespace,
                                                                                                          K identifier)
        Description copied from interface: EffectiveStatement
        Returns value associated with supplied identifier.
        Specified by:
        get in interface EffectiveStatement<A,​D extends DeclaredStatement<A>>
        Type Parameters:
        K - Identifier type
        V - Value type
        N - Namespace identifier type
        Parameters:
        namespace - Namespace type
        identifier - Identifier of element.
        Returns:
        Value if present
      • getAll

        public final <K,​V,​N extends IdentifierNamespace<K,​V>> Map<K,​V> getAll​(Class<N> namespace)
        Description copied from interface: EffectiveStatement
        Returns all local values from supplied namespace.
        Specified by:
        getAll in interface EffectiveStatement<A,​D extends DeclaredStatement<A>>
        Type Parameters:
        K - Identifier type
        V - Value type
        N - Namespace identifier type
        Parameters:
        namespace - Namespace type
        Returns:
        Key-value mappings, empty if the namespace does not exist.
      • getNamespaceContents

        @Beta
        protected <K,​V,​N extends IdentifierNamespace<K,​V>> Optional<? extends Map<K,​V>> getNamespaceContents​(@NonNull Class<N> namespace)
        Return the statement-specific contents of specified namespace, if available.
        Parameters:
        namespace - Requested namespace
        Returns:
        Namespace contents, if available.
      • firstSchemaNode

        protected final <S extends SchemaNode> S firstSchemaNode​(Class<S> type)
      • allSubstatementsOfType

        public final <T> Collection<T> allSubstatementsOfType​(Class<T> type)
      • firstSubstatementOfType

        protected final <T> @Nullable T firstSubstatementOfType​(Class<T> type)
      • firstSubstatementOfType

        protected final <R> R firstSubstatementOfType​(Class<?> type,
                                                      Class<R> returnType)
      • firstEffectiveSubstatementOfType

        protected final EffectiveStatement<?,​?> firstEffectiveSubstatementOfType​(Class<?> type)