KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > config > schema > ExcludedInstrumentedClass


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.config.schema;
5
6 import com.tc.util.Assert;
7 import com.tc.util.stringification.OurStringBuilder;
8
9 /**
10  * An {@link InstrumentedClass} that represents an excluded class.
11  */

12 public class ExcludedInstrumentedClass implements InstrumentedClass {
13
14   private final String JavaDoc classExpression;
15
16   public ExcludedInstrumentedClass(String JavaDoc classExpression) {
17     Assert.assertNotBlank(classExpression);
18
19     this.classExpression = classExpression;
20   }
21
22   public boolean isInclude() {
23     return false;
24   }
25
26   public String JavaDoc classExpression() {
27     return this.classExpression;
28   }
29
30   public boolean honorTransient() {
31     throw Assert.failure("Honor-transient has no meaning on excluded classes");
32   }
33   
34   public boolean honorVolatile() {
35     throw Assert.failure("Honor-volatile has no meaning on excluded classes");
36   }
37
38   public boolean callConstructorOnLoad() {
39     throw Assert.failure("Call-constructor-on-load has no meaning on excluded classes");
40   }
41
42   public IncludeOnLoad onLoad() {
43     throw Assert.failure("Call-constructor-on-load has no meaning on excluded classes");
44   }
45
46   public String JavaDoc toString() {
47     return new OurStringBuilder(this, OurStringBuilder.COMPACT_STYLE).append("classExpression", this.classExpression)
48         .toString();
49   }
50 }
51
Popular Tags