KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > appevent > NonPortableFieldSetContext


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.appevent;
5
6 import com.tc.util.NonPortableReason;
7
8 public class NonPortableFieldSetContext extends NonPortableEventContext {
9
10   private static final long serialVersionUID = -556002400100752261L;
11
12   private final String JavaDoc fieldName;
13   private final boolean isRoot;
14
15   public NonPortableFieldSetContext(String JavaDoc targetClassName, String JavaDoc threadName,
16                                     String JavaDoc clientId, String JavaDoc fieldName, boolean isRoot) {
17     super(targetClassName, threadName, clientId);
18     this.fieldName = fieldName;
19     this.isRoot = isRoot;
20   }
21
22   public String JavaDoc getFieldName() {
23     return fieldName;
24   }
25
26   public boolean isRoot() {
27     return isRoot;
28   }
29
30   public void addDetailsTo(NonPortableReason reason) {
31     super.addDetailsTo(reason);
32     if (isRoot()) {
33       reason.addDetail("Non-portable root name", fieldName);
34     } else {
35       reason.addDetail("Non-portable field name", fieldName);
36     }
37   }
38
39 }
40
Popular Tags