1. Project Clover database mar. janv. 20 2026 12:32:22 CET
  2. Package org.devacfr.maven.skins.reflow.context

File PageContext.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart8.png
45% of files have more coverage

Code metrics

0
6
3
1
65
22
3
0,5
2
3
1

Classes

Class Line # Actions
PageContext 29 6 0% 3 2
0.777777877,8%
 

Contributing tests

This file is covered by 18 tests. .

Source view

1    /*
2    * Copyright 2012-2025 Christophe Friederich
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 org.devacfr.maven.skins.reflow.context;
17   
18    import static org.devacfr.maven.skins.reflow.model.Toc.createToc;
19   
20    import javax.annotation.Nonnull;
21    import org.devacfr.maven.skins.reflow.ISkinConfig;
22    import org.devacfr.maven.skins.reflow.model.Header;
23    import org.devacfr.maven.skins.reflow.model.Toc;
24   
25    /**
26    * @author Christophe Friederich
27    * @since 2.0
28    */
 
29    public class PageContext extends Context<PageContext> {
30   
31    /** */
32    private final Toc<?> toc;
33   
34    /** */
35    private final Header header;
36   
37    /**
38    * Default constructor.
39    *
40    * @param config
41    * a config (can not be {@code null}).
42    */
 
43  26 toggle public PageContext(final @Nonnull ISkinConfig config) {
44  26 super(config, ContextType.page);
45  26 this.toc = createToc(config, null);
46  26 this.header = new Header(config);
47  26 this.addChildren(this.header, this.toc);
48    }
49   
50    /**
51    * Gets the header of page.
52    *
53    * @return Returns a {@code Header} representing the configuration of header.
54    */
 
55  0 toggle public Header getHeader() {
56  0 return header;
57    }
58   
59    /**
60    * @return Returns the {@link Toc}.
61    */
 
62  3 toggle public Toc<?> getToc() {
63  3 return toc;
64    }
65    }