Do not pretty-print body class
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / NormalizedNodeMetadataResult.java
1 /*
2  * Copyright (c) 2019 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.data.impl.schema;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Optional;
12 import org.opendaylight.yangtools.rfc7952.data.api.NormalizedMetadata;
13
14 /**
15  * A NormalizedNodeResult which also holds NormalizedMetadata structure.
16  *
17  * @author Robert Varga
18  */
19 @Beta
20 public class NormalizedNodeMetadataResult extends NormalizedNodeResult {
21     private NormalizedMetadata metadata;
22
23     public final Optional<NormalizedMetadata> getMetadata() {
24         return Optional.ofNullable(metadata);
25     }
26
27     @SuppressWarnings("checkstyle:hiddenField")
28     void setResult(final NormalizedMetadata metadata) {
29         this.metadata = metadata;
30     }
31
32     @Override
33     void reset() {
34         metadata = null;
35         super.reset();
36     }
37 }