return substatements;
}
- /**
- * Find first substatement of specified type.
- *
- * @param type Requested type
- * @return First matching substatement, or null if no match is found.
- *
- * @deprecated Use {@link #findFirstEffectiveSubstatement(Class)} instead.
- */
- @Deprecated
- public final <S extends EffectiveStatement<?, ?>> S firstEffective(final Class<S> type) {
- return findFirstEffectiveSubstatement(type).orElse(null);
- }
-
protected final <S extends SchemaNode> S firstSchemaNode(final Class<S> type) {
return substatements.stream().filter(type::isInstance).findFirst().map(type::cast).orElse(null);
}
StmtContext::buildDeclared));
}
- /**
- * Find first declared substatement of a particular type.
- *
- * @param type {@link DeclaredStatement} type
- * @return First effective substatement, or null if no match is found.
- * @deprecated Use {@link #findFirstDeclaredSubstatement(Class)} instead.
- */
- @Deprecated
- protected final <S extends DeclaredStatement<?>> S firstDeclared(final Class<S> type) {
- return findFirstDeclaredSubstatement(type).orElse(null);
- }
-
@Override
public String rawArgument() {
return rawArgument;
public StatementSource getStatementSource() {
return source;
}
-
- /**
- * Returns collection of explicitly declared child statements, while preserving its original ordering from original
- * source.
- *
- * @param type {@link DeclaredStatement} type
- * @return Collection of statements, which were explicitly declared in source of model.
- * @throws NullPointerException if {@code type} is null
- * @deprecated Use {@link #declaredSubstatements(Class)} instead.
- */
- @Deprecated
- protected final <S extends DeclaredStatement<?>> Collection<? extends S> allDeclared(final Class<S> type) {
- return declaredSubstatements(type);
- }
}