1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.filter

File FilterElementParameterDescriptor.java

 

Coverage histogram

../../../img/srcFileCovDistChart7.png
66% of files have more coverage

Code metrics

0
13
6
1
114
41
6
0.46
2.17
6
1

Classes

Class Line # Actions
FilterElementParameterDescriptor 31 13 0% 6 6
0.6842105468.4%
 

Contributing tests

This file is covered by 672 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software 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 GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.filter;
21   
22    import java.lang.reflect.Type;
23   
24    /**
25    * A filter element parameter.
26    *
27    * @param <T> the type of the parameter
28    * @version $Id: 7601aff5efc3c5a64687bfd2acd707557091134e $
29    * @since 5.2M1
30    */
 
31    public class FilterElementParameterDescriptor<T>
32    {
33    /**
34    * @see #getIndex()
35    */
36    private int index;
37   
38    /**
39    * @see #getName()
40    */
41    private String name;
42   
43    /**
44    * @see #getType()
45    */
46    private Type type;
47   
48    /**
49    * @see #getDefaultValue()
50    */
51    private T defaultValue;
52   
53    /**
54    * @param index the index of the parameter.
55    * @param name the name of the parameter. {@code null} if no {@link org.xwiki.filter.annotation.Name} annotation has
56    * been used.
57    * @param type the type of the parameter.
58    * @param defaultValue the default value.
59    */
 
60  48638 toggle public FilterElementParameterDescriptor(int index, String name, Type type, T defaultValue)
61    {
62  48638 this.index = index;
63  48638 this.name = name;
64  48638 this.type = type;
65  48638 this.defaultValue = defaultValue;
66    }
67   
68    /**
69    * @return the index of the parameter.
70    */
 
71  54057 toggle public int getIndex()
72    {
73  54057 return this.index;
74    }
75   
76    /**
77    * @return the name of the parameter. {@code null} if no {@link org.xwiki.filter.annotation.Name} annotation has
78    * been used.
79    */
 
80  110581 toggle public String getName()
81    {
82  110581 return this.name;
83    }
84   
85    /**
86    * @return the type of the parameter.
87    */
 
88  19430 toggle public Type getType()
89    {
90  19430 return this.type;
91    }
92   
93