• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LearnLib / learnlib / 6433387082

06 Oct 2023 03:10PM UTC coverage: 92.296% (-0.007%) from 92.303%
6433387082

push

github

mtf90
update Falk's developer id

11573 of 12539 relevant lines covered (92.3%)

1.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/drivers/mapper/src/main/java/de/learnlib/mapper/AbstractContextExecutableInputSUL.java
1
/* Copyright (C) 2013-2023 TU Dortmund
2
 * This file is part of LearnLib, http://www.learnlib.de/.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package de.learnlib.mapper;
17

18
import de.learnlib.api.SUL;
19
import de.learnlib.mapper.api.ContextExecutableInput;
20
import org.checkerframework.checker.nullness.qual.Nullable;
21

22
/**
23
 * Abstract base class for a {@link SUL} that step-wisely executes {@link ContextExecutableInput} symbols.
24
 * <p>
25
 * This class does not specify how contexts are created and disposed of, but declares abstract methods for these tasks.
26
 *
27
 * @param <I>
28
 *         input symbol type
29
 * @param <O>
30
 *         output symbol type
31
 * @param <C>
32
 *         context type
33
 */
34
public abstract class AbstractContextExecutableInputSUL<I extends ContextExecutableInput<? extends O, ? super C>, O, C>
×
35
        implements SUL<I, O> {
36

37
    private @Nullable C currentContext;
38

39
    @Override
40
    public void pre() {
41
        this.currentContext = createContext();
×
42
    }
×
43

44
    protected abstract C createContext();
45

46
    @Override
47
    public void post() {
48
        disposeContext(currentContext);
×
49
        currentContext = null;
×
50
    }
×
51

52
    protected abstract void disposeContext(C context);
53

54
    @Override
55
    public O step(I in) {
56
        return in.execute(currentContext);
×
57
    }
58
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc