37 /**
38 * Base interface for all the schema components.
39 *
40 * @author
41 * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
42 */
43 public interface XSComponent
44 {
45 /** Gets the annotation associated to this component, if any. */
46 XSAnnotation getAnnotation();
47
48 /**
49 * Works like {@link #getAnnotation()}, but allow a new empty {@link XSAnnotation} to be created
50 * if not exist.
51 *
52 * @param createIfNotExist
53 * true to create a new {@link XSAnnotation} if it doesn't exist already.
54 * false to make this method behavel like {@link #getAnnotation()}.
55 *
56 * @return
57 * null if <tt>createIfNotExist==false</tt> and annotation didn't exist.
58 * Otherwise non-null.
59 */
60 XSAnnotation getAnnotation(boolean createIfNotExist);
61
62 /**
63 * Gets the foreign attributes on this schema component.
64 *
65 * <p>
66 * In general, a schema component may match multiple elements
67 * in a schema document, and those elements can individually
68 * carry foreign attributes.
69 *
70 * <p>
71 * This method returns a list of {@link ForeignAttributes}, where
72 * each {@link ForeignAttributes} object represent foreign attributes
73 * on one element.
74 *
75 * @return
76 * can be an empty list but never be null.
77 */
|
37 /**
38 * Base interface for all the schema components.
39 *
40 * @author
41 * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
42 */
43 public interface XSComponent
44 {
45 /** Gets the annotation associated to this component, if any. */
46 XSAnnotation getAnnotation();
47
48 /**
49 * Works like {@link #getAnnotation()}, but allow a new empty {@link XSAnnotation} to be created
50 * if not exist.
51 *
52 * @param createIfNotExist
53 * true to create a new {@link XSAnnotation} if it doesn't exist already.
54 * false to make this method behavel like {@link #getAnnotation()}.
55 *
56 * @return
57 * null if {@code createIfNotExist==false} and annotation didn't exist.
58 * Otherwise non-null.
59 */
60 XSAnnotation getAnnotation(boolean createIfNotExist);
61
62 /**
63 * Gets the foreign attributes on this schema component.
64 *
65 * <p>
66 * In general, a schema component may match multiple elements
67 * in a schema document, and those elements can individually
68 * carry foreign attributes.
69 *
70 * <p>
71 * This method returns a list of {@link ForeignAttributes}, where
72 * each {@link ForeignAttributes} object represent foreign attributes
73 * on one element.
74 *
75 * @return
76 * can be an empty list but never be null.
77 */
|