Promote AbstractEffectiveStatement to model-spi
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / extension / UnrecognizedEffectiveStatement.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.extension;
9
10 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
11 import org.opendaylight.yangtools.yang.model.api.meta.StatementSource;
12 import org.opendaylight.yangtools.yang.model.api.stmt.UnrecognizedStatement;
13 import org.opendaylight.yangtools.yang.model.spi.meta.AbstractEffectiveStatement;
14
15 /**
16  * An 'implementation' of an effective UnrecognizedStatement. This class is actually never instantiated and exists
17  * only as an implementation-private marker for {@link StatementDefinition#getEffectiveRepresentationClass()}.
18  */
19 final class UnrecognizedEffectiveStatement extends AbstractEffectiveStatement<Object, UnrecognizedStatement> {
20     private UnrecognizedEffectiveStatement() {
21         // This should never be called
22     }
23
24     @Override
25     public StatementDefinition statementDefinition() {
26         throw new UnsupportedOperationException();
27     }
28
29     @Override
30     public StatementSource getStatementSource() {
31         throw new UnsupportedOperationException();
32     }
33
34     @Override
35     public String argument() {
36         throw new UnsupportedOperationException();
37     }
38
39     @Override
40     public UnrecognizedStatement getDeclared() {
41         throw new UnsupportedOperationException();
42     }
43 }