KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > config > schema > beanfactory > BeanWithErrors


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.config.schema.beanfactory;
5
6 import org.apache.xmlbeans.XmlError;
7 import org.apache.xmlbeans.XmlObject;
8
9 import com.tc.util.Assert;
10
11 /**
12  * An XML bean, plus a list of errors.
13  */

14 public class BeanWithErrors {
15   
16   private final XmlObject bean;
17   private final XmlError[] errors;
18   
19   public BeanWithErrors(XmlObject bean, XmlError[] errors) {
20     Assert.assertNotNull(bean);
21     Assert.assertNoNullElements(errors);
22     
23     this.bean = bean;
24     this.errors = errors;
25   }
26   
27   public XmlObject bean() {
28     return this.bean;
29   }
30   
31   public XmlError[] errors() {
32     return this.errors;
33   }
34
35 }
36
Popular Tags