1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.betwixt.strategy;
18
19 import org.apache.commons.betwixt.AttributeDescriptor;
20
21 /***
22 * Strategy to determine whether to show an attribute at all.
23 * @since 0.8
24 */
25 public interface AttributeSuppressionStrategy
26 {
27 /***
28 * Should the attribute described as given be suppressed during introspection?
29 * @param descriptor <code>AttributeDescriptor</code>, not null
30 * @return true if the attribute should be ignore,
31 * false otherwise
32 */
33 public boolean suppress(AttributeDescriptor descriptor);
34
35 /***
36 * Default strategy: show all attributes.
37 */
38 public final static AttributeSuppressionStrategy DEFAULT = new AttributeSuppressionStrategy() {
39 public boolean suppress(AttributeDescriptor description) {
40 return false;
41 }
42
43 };
44 }