1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.filter.descriptor

File DefaultFilterStreamBeanParameterDescriptor.java

 

Coverage histogram

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

Code metrics

0
7
7
1
82
41
7
1
1
7
1

Classes

Class Line # Actions
DefaultFilterStreamBeanParameterDescriptor 32 7 0% 7 2
0.8571428785.7%
 

Contributing tests

This file is covered by 56 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.descriptor;
21   
22    import java.lang.reflect.Type;
23   
24    import org.xwiki.properties.PropertyDescriptor;
25   
26    /**
27    * The default implementation of {@link FilterStreamPropertyDescriptor}.
28    *
29    * @version $Id: 03e6959cda6bab668ab1f8e000e301efc7610d48 $
30    * @since 6.2M1
31    */
 
32    public class DefaultFilterStreamBeanParameterDescriptor<T> implements FilterStreamPropertyDescriptor<T>
33    {
34    /**
35    * The description of the property.
36    */
37    private PropertyDescriptor propertyDescriptor;
38   
39    /**
40    * @param propertyDescriptor The description of the property
41    */
 
42  6783 toggle public DefaultFilterStreamBeanParameterDescriptor(PropertyDescriptor propertyDescriptor)
43    {
44  6783 this.propertyDescriptor = propertyDescriptor;
45    }
46   
 
47  7009 toggle @Override
48    public String getId()
49    {
50  7009 return this.propertyDescriptor.getId();
51    }
52   
 
53  14 toggle @Override
54    public String getName()
55    {
56  14 return this.propertyDescriptor.getName();
57    }
58   
 
59  14 toggle @Override
60    public String getDescription()
61    {
62  14 return this.propertyDescriptor.getDescription();
63    }
64   
 
65  85 toggle @Override
66    public Type getType()
67    {
68  85 return this.propertyDescriptor.getPropertyType();
69    }
70   
 
71  24 toggle @Override
72    public T getDefaultValue()
73    {
74  24 return (T) this.propertyDescriptor.getDefaultValue();
75    }
76   
 
77  0 toggle @Override
78    public boolean isMandatory()
79    {
80  0 return this.propertyDescriptor.isMandatory();
81    }
82    }