01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.config.schema.beanfactory;
05:
06: import org.apache.xmlbeans.XmlError;
07: import org.apache.xmlbeans.XmlObject;
08:
09: 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: }
|