return inProgressPhase;
}
- Optional<StatementContextBase<?, ?, ?>> lookupDeclaredChild(final StatementContextBase<?, ?, ?> current,
+ Optional<AbstractResumedStatement<?, ?, ?>> lookupDeclaredChild(final AbstractResumedStatement<?, ?, ?> current,
final int childId) {
if (current == null) {
return Optional.empty();
}
// Fast path: we are entering a statement which was emitted in previous phase
- StatementContextBase<?, ?, ?> existing = current.lookupSubstatement(childId);
+ AbstractResumedStatement<?, ?, ?> existing = current.lookupSubstatement(childId);
while (existing != null && StatementSource.CONTEXT == existing.getStatementSource()) {
existing = existing.lookupSubstatement(childId);
}
return Optional.ofNullable(existing);
}
- StatementContextBase<?, ?, ?> createDeclaredChild(final StatementContextBase<?, ?, ?> current, final int childId,
- final QName name, final String argument, final StatementSourceReference ref) {
+ AbstractResumedStatement<?, ?, ?> createDeclaredChild(final AbstractResumedStatement<?, ?, ?> current,
+ final int childId, final QName name, final String argument, final StatementSourceReference ref) {
StatementDefinitionContext<?, ?, ?> def = currentContext.getStatementDefinition(getRootVersion(), name);
if (def == null) {
def = currentContext.getModelDefinedStatementDefinition(name);
final Collection<ModifierImpl> currentPhaseModifiers = modifiers.get(phase);
boolean hasProgressed = tryToProgress(currentPhaseModifiers);
-
- checkNotNull(this.root, "Malformed source. Valid root element is missing.");
- final boolean phaseCompleted = root.tryToCompletePhase(phase);
+ final boolean phaseCompleted = requireNonNull(root, "Malformed source. Valid root element is missing.")
+ .tryToCompletePhase(phase);
hasProgressed |= tryToProgress(currentPhaseModifiers);
}
private PrefixToModule preLinkagePrefixes() {
- final PrefixToModuleMap preLinkagePrefixes = new PrefixToModuleMap(true);
+ final PrefixToModuleMap preLinkagePrefixes = new PrefixToModuleMap();
final Map<String, URI> prefixToNamespaceMap = getAllFromLocalStorage(ImpPrefixToNamespace.class);
if (prefixToNamespaceMap == null) {
//:FIXME if it is a submodule without any import, the map is null. Handle also submodules and includes...