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

File FilterElementDescriptor.java

 

Coverage histogram

../../../img/srcFileCovDistChart9.png
41% of files have more coverage

Code metrics

4
16
11
1
171
66
13
0.81
1.45
11
1.18

Classes

Class Line # Actions
FilterElementDescriptor 35 16 0% 13 5
0.8387096583.9%
 

Contributing tests

This file is covered by 676 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.Method;
23    import java.util.HashMap;
24    import java.util.Map;
25   
26    /**
27    * An element of the filter.
28    * <p>
29    * An element is defined by either an <code>on</code> event of a combination of <code>begin</code> and <code>end</code>
30    * events.
31    *
32    * @version $Id: e87af0a0cd2bd38becc35fd105cd1006b6df4eff $
33    * @since 5.2M1
34    */
 
35    public class FilterElementDescriptor
36    {
37    /**
38    * Empty parameters.
39    */
40    private static final FilterElementParameterDescriptor<?>[] EMPTY_PARAMETERS =
41    new FilterElementParameterDescriptor<?>[0];
42   
43    /**
44    * @see #getName()
45    */
46    private String name;
47   
48    /**
49    * @see #getParameters()
50    */
51    private FilterElementParameterDescriptor<?>[] parameters;
52   
53    /**
54    * Used to find parameter index by name.
55    */
56    private Map<String, Integer> parametersIndex = new HashMap<String, Integer>();
57   
58    /**
59    * @see #getBeginMethod()
60    */
61    private Method beginMethod;
62   
63    /**
64    * @see #getEndMethod()
65    */
66    private Method endMethod;
67   
68    /**
69    * @see #getOnMethod()
70    */
71    private Method onMethod;
72   
73    /**
74    * @param name the name of the element
75    */
 
76  0 toggle public FilterElementDescriptor(String name)