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

File DefaultFilterDescriptorManager.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

50
97
13
1
372
232
46
0.47
7.46
13
3.54

Classes

Class Line # Actions
DefaultFilterDescriptorManager 62 97 0% 46 10
0.937593.8%
 

Contributing tests

This file is covered by 668 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.internal;
21   
22    import java.lang.reflect.Method;
23    import java.lang.reflect.Parameter;
24    import java.lang.reflect.Proxy;
25    import java.lang.reflect.Type;
26    import java.util.Collections;
27    import java.util.HashSet;
28    import java.util.List;
29    import java.util.Map;
30    import java.util.Set;
31    import java.util.concurrent.ConcurrentHashMap;
32   
33    import javax.inject.Inject;
34    import javax.inject.Singleton;
35   
36    import org.apache.commons.collections4.IterableUtils;
37    import org.apache.commons.lang3.ClassUtils;
38    import org.apache.commons.lang3.ClassUtils.Interfaces;
39    import org.apache.commons.lang3.reflect.MethodUtils;
40    import org.slf4j.Logger;
41    import org.xwiki.component.annotation.Component;
42    import org.xwiki.component.util.ReflectionMethodUtils;
43    import org.xwiki.component.util.ReflectionUtils;
44    import org.xwiki.filter.FilterDescriptor;
45    import org.xwiki.filter.FilterDescriptorManager;
46    import org.xwiki.filter.FilterElementDescriptor;
47    import org.xwiki.filter.FilterElementParameterDescriptor;
48    import org.xwiki.filter.IncompatibleFilterException;
49    import org.xwiki.filter.annotation.Default;
50    import org.xwiki.filter.annotation.Name;
51    import org.xwiki.properties.ConverterManager;
52    import org.xwiki.properties.converter.ConversionException;
53   
54    /**
55    * Default implementation of {@link FilterDescriptorManager}.
56    *
57    * @version $Id: 28de4cd4f1803dadc6a47f8bdf0bd879b38918cb $
58    * @since 5.2M1
59    */
60    @Component
61    @Singleton
 
62    public class DefaultFilterDescriptorManager implements FilterDescriptorManager
63    {
64    /**
65    * The prefix of the begin events.
66    */
67    public static final String PREFIX_BEGIN = "begin";
68   
69    /**
70    * The prefix of the end events.
71    */
72    public static final String PREFIX_END = "end";
73   
74    /**
75    * The prefix of the on events.
76    */
77    public static final String PREFIX_ON = "on";
78   
79    private static final Class<?>[] CLASS_ARRAY = new Class<?>[0];
80   
81    /**
82    * The descriptors.
83    */
84    private Map<Class<?>, FilterDescriptor> descriptors = new Conc