01: /**********************************************************************
02: Copyright (c) 2004 Andy Jefferson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14:
15: Contributors:
16: ...
17: **********************************************************************/package org.jpox.metadata;
18:
19: /**
20: * Representation of the Meta-Data for a container.
21: * This is subclasses by Array, Collection, and Map.
22: *
23: * @version $Revision: 1.7 $
24: */
25: public class ContainerMetaData extends MetaData {
26: /**
27: * Constructor.
28: * @param parent The parent Field
29: */
30: public ContainerMetaData(AbstractMemberMetaData parent) {
31: super (parent);
32: }
33:
34: /**
35: * Accessor for the parent field/property MetaData.
36: * @return Parent metadata
37: */
38: public AbstractMemberMetaData getMemberMetaData() {
39: if (parent != null) {
40: return (AbstractMemberMetaData) parent;
41: }
42: return null;
43: }
44:
45: /**
46: * Accessor for the parent field name
47: * @return Parent field name.
48: */
49: public String getFieldName() {
50: if (parent != null) {
51: return ((AbstractMemberMetaData) parent).getName();
52: }
53: return null;
54: }
55:
56: /**
57: * Accessor for the MetaDataManager of the file.
58: * @return MetaDataManager.
59: */
60: public MetaDataManager getMetaDataManager() {
61: if (parent != null) {
62: return getMemberMetaData().getAbstractClassMetaData()
63: .getMetaDataManager();
64: }
65: return null;
66: }
67: }
|