0N/A/*
2362N/A * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Aimport java.util.HashMap;
0N/A
0N/A/**
0N/A * Class that holds information for populating a FeatureDescriptor. For the class,
0N/A * This information represents the BeanDescriptor, for a property, it represents
0N/A * a PropertyDescriptor.
0N/A */
0N/Apublic class DocBeanInfo {
0N/A
0N/A // Values of the BeanFlags
0N/A public static final int BOUND = 1;
0N/A public static final int EXPERT = 2;
0N/A public static final int CONSTRAINED = 4;
0N/A public static final int HIDDEN = 8;
0N/A public static final int PREFERRED = 16 ;
0N/A
0N/A public String name;
0N/A public int beanflags;
0N/A public String desc;
0N/A public String displayname;
0N/A public String propertyeditorclass;
0N/A public String customizerclass;
0N/A
0N/A public HashMap attribs;
0N/A public HashMap enums;
0N/A
0N/A public DocBeanInfo(){}
0N/A
0N/A public DocBeanInfo(String p, int flags, String d,
0N/A String displayname, String pec, String cc,
0N/A HashMap attribs, HashMap enums) {
0N/A this.name = p;
0N/A this.beanflags = flags;
0N/A this.desc = d;
0N/A this.displayname = displayname;
0N/A this.propertyeditorclass = pec;
0N/A this.customizerclass = cc;
0N/A
0N/A this.attribs = attribs;
0N/A this.enums = enums;
0N/A }
0N/A
0N/A public String toString() {
0N/A StringBuffer buffer = new StringBuffer("*****");
0N/A buffer.append("\nProperty: " + name);
0N/A buffer.append("\tDescription: " + desc);
0N/A buffer.append("\nDisplayname: " + displayname);
0N/A buffer.append("\nPropertyEditorClass: " + propertyeditorclass);
0N/A buffer.append("\nCustomizerClass: " + customizerclass);
0N/A
0N/A if ((beanflags & BOUND) != 0)
0N/A buffer.append("\nBound: true");
0N/A
0N/A if ((beanflags & EXPERT) != 0)
0N/A buffer.append("\nExpert: true");
0N/A
0N/A if ((beanflags & CONSTRAINED) != 0)
0N/A buffer.append("\nConstrained: true");
0N/A
0N/A if ((beanflags & HIDDEN) !=0)
0N/A buffer.append("\nHidden: true");
0N/A
0N/A if ((beanflags & PREFERRED) !=0)
0N/A
0N/A if (attribs != null)
0N/A buffer.append(attribs.toString());
0N/A
0N/A if (enums != null)
0N/A buffer.append(enums.toString());
0N/A
0N/A return buffer.toString();
0N/A }
0N/A
0N/A}