|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RigidContextChecker | Line # 31 | 6 | 4 | 0% |
0.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
No Tests | |||
1 | /* This file is part of the project "Hilbert II" - http://www.qedeq.org | |
2 | * | |
3 | * Copyright 2000-2014, Michael Meyling <mime@qedeq.org>. | |
4 | * | |
5 | * "Hilbert II" is free software; you can redistribute | |
6 | * it and/or modify it under the terms of the GNU General Public | |
7 | * License as published by the Free Software Foundation; either | |
8 | * version 2 of the License, or (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | */ | |
15 | ||
16 | package org.qedeq.kernel.se.test; | |
17 | ||
18 | ||
19 | import java.lang.reflect.InvocationTargetException; | |
20 | ||
21 | import org.qedeq.base.test.DynamicGetter; | |
22 | import org.qedeq.kernel.se.base.module.Qedeq; | |
23 | import org.qedeq.kernel.se.common.ModuleContext; | |
24 | import org.qedeq.kernel.se.visitor.ContextChecker; | |
25 | ||
26 | /** | |
27 | * We really try to get the context in the module. | |
28 | * | |
29 | * @author Michael Meyling | |
30 | */ | |
31 | public class RigidContextChecker implements ContextChecker { | |
32 | ||
33 | 0 |
![]() |
34 | 0 | try { |
35 | 0 | DynamicGetter.get(qedeq, context.getLocationWithinModule()); |
36 | } catch (RuntimeException e) { | |
37 | 0 | System.err.println(context); |
38 | 0 | throw e; |
39 | } catch (IllegalAccessException e) { | |
40 | 0 | throw new RuntimeException(e); |
41 | } catch (InvocationTargetException e) { | |
42 | 0 | throw new RuntimeException(e); |
43 | } | |
44 | } | |
45 | ||
46 | } |
|