|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ListenerElement | Line # 36 | 9 | 0% | 9 | 2 | 88.9% |
0.8888889
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (12) | |||
| Result | |||
|
0.8888889
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.8888889
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.8888889
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.8888889
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.8888889
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.8888889
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.8888889
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.6666667
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.5555556
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.5555556
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.5555556
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
|
0.5555556
|
org.xwiki.rendering.test.integration.RenderingTest.execute
org.xwiki.rendering.test.integration.RenderingTest.execute
|
1 PASS | |
| 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.rendering.listener.descriptor; | |
| 21 | ||
| 22 | import java.lang.reflect.Method; | |
| 23 | import java.lang.reflect.Type; | |
| 24 | import java.util.ArrayList; | |
| 25 | import java.util.List; | |
| 26 | ||
| 27 | /** | |
| 28 | * An element of the listener. | |
| 29 | * <p> | |
| 30 | * An element is defined by either an <code>on</code> event of a combination of <code>begin</code> and <code>end</code> | |
| 31 | * events. | |
| 32 | * | |
| 33 | * @version $Id: 3f014dc141ff8791ecfaef3b31f3efb742b0364f $ | |
| 34 | * @since 3.3M1 | |
| 35 | */ | |
| 36 | public class ListenerElement | |
| 37 | { | |
| 38 | /** | |
| 39 | * @see #getName() | |
| 40 | */ | |
| 41 | private String name; | |
| 42 | ||
| 43 | /** | |
| 44 | * @see #getParameters() | |
| 45 | */ | |
| 46 | private List<Type> parameters = new ArrayList<Type>(); | |
| 47 | ||
| 48 | /** | |
| 49 | * @see #getBeginMethod() | |
| 50 | */ | |
| 51 | private Method beginMethod; | |
| 52 | ||
| 53 | /** | |
| 54 | * @see #getEndMethod() | |
| 55 | */ | |
| 56 | private Method endMethod; | |
| 57 | ||
| 58 | /** | |
| 59 | * @see #getOnMethod() | |
| 60 | */ | |
| 61 | private Method onMethod; | |
| 62 | ||
| 63 | /** | |
| 64 | * @param name the name of the element | |
| 65 | */ | |
| 66 | 372 |
public ListenerElement(String name) |
| 67 | { | |
| 68 | 372 | this.name = name; |
| 69 | } | |
| 70 | ||
| 71 | /** | |
| 72 | * @return the name of the element | |
| 73 | */ | |
| 74 | 0 |
public String getName() |
| 75 | { | |
| 76 | 0 | return this.name; |
| 77 | } | |
| 78 | ||
| 79 | /** | |
| 80 | * @return the parameters of the element | |
| 81 | */ | |
| 82 | 716 |
public List<Type> getParameters() |
| 83 | { | |
| 84 | 716 | return this.parameters; |
| 85 | } | |
| 86 | ||
| 87 | /** | |
| 88 | * @return the begin method, null if it's a <code>on</code> event based element | |
| 89 | */ | |
| 90 | 150 |
public Method getBeginMethod() |
| 91 | { | |
| 92 | 150 | return this.beginMethod; |
| 93 | } | |
| 94 | ||
| 95 | /** | |
| 96 | * @param beginMethod the begin method, null if it's a <code>on</code> event based element | |
| 97 | */ | |
| 98 | 240 |
public void setBeginMethod(Method beginMethod) |
| 99 | { | |
| 100 | 240 | this.beginMethod = beginMethod; |
| 101 | } | |
| 102 | ||
| 103 | /** | |
| 104 | * @return the end method, null if it's a <code>on</code> event based element | |
| 105 | */ | |
| 106 | 56 |
public Method getEndMethod() |
| 107 | { | |
| 108 | 56 | return this.endMethod; |
| 109 | } | |
| 110 | ||
| 111 | /** | |
| 112 | * @param endMethod the end method, null if it's a <code>on</code> event based element | |
| 113 | */ | |
| 114 | 240 |
public void setEndMethod(Method endMethod) |
| 115 | { | |
| 116 | 240 | this.endMethod = endMethod; |
| 117 | } | |
| 118 | ||
| 119 | /** | |
| 120 | * @return the on method, null if it's a <code>begin/end</code> event based element | |
| 121 | */ | |
| 122 | 258 |
public Method getOnMethod() |
| 123 | { | |
| 124 | 258 | return this.onMethod; |
| 125 | } | |
| 126 | ||
| 127 | /** | |
| 128 | * @param onMethod the on method, null if it's a <code>begin/end</code> event based element | |
| 129 | */ | |
| 130 | 132 |
public void setOnMethod(Method onMethod) |
| 131 | { | |
| 132 | 132 | this.onMethod = onMethod; |
| 133 | } | |
| 134 | } | |
|
||||||||||||