2362N/A * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 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 * 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 * 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. 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 0N/A * Properties supported and tag syntax: 0N/A * description: string 0N/A * displayname: string 0N/A * propertyeditorclass: string (with dots: foo.bar.MyPropertyEditor 0N/A * customizerclass: string (w/dots: foo.bar.MyCustomizer) 0N/A * attribute: key1 value1 0N/A * attribute: key2 value2 0N/A * TODO: getValue and genDocletInfo needs some cleaning. 0N/A * @author Hans Muller 0N/A * @author Rich Schiavi 0N/A * @author Mark Davidson 0N/A "propertyeditorclass",
0N/A * Method called from the javadoc environment to determint the options length. 0N/A * -t template location 0N/A * -x true Enable debug output. 0N/A // remind: this needs to be cleaned up 0N/A * description: the description of this method can 0N/A * do all sorts of funky things. if it \n 0N/A * is indented like this, we have to remove 0N/A * all char spaces greater than 2 and also any hard-coded \n 0N/A * newline characters and all newlines 0N/A * displayname: theString 0N/A * propertyeditorclass: foo.bar.MyPropertyEditorClass 0N/A * customizerclass: foo.bar.MyCustomizerClass 0N/A * attribute:key1 value1 0N/A * attribute: key2 value2 0N/A * "Foo Foo.I1 Foo.I2 Bar Bar.I1 Bar.I2" 0N/A * i.e., with all the innerclasses of classes specified in the command 0N/A * line. We don't want to generate BeanInfo for any of these inner 0N/A * classes, so we ignore these by remembering what the last outer 0N/A * class was. A hack, I admit, but makes the build faster. 0N/A // Examine the javadoc tags and look for the the @beaninfo tag 0N/A // This first block looks at the javadoc for the class 0N/A // This block looks at the javadoc for the class methods. 0N/A // actually don't "introspect" - look for all 0N/A // methods with a @beaninfo tag 0N/A // dump our classes doc beaninfo 0N/A // Use the generator to create the beaninfo code for the class. 0N/A // reset the values! 0N/A * Reads the command line options. 0N/A * Side Effect, sets class variables templateDir, fileDir and DEBUG 0N/A // Parse the command line args 0N/A * Create a "BeanInfo" data structure from the tag. This is a data structure 0N/A * which contains all beaninfo data for a method or a class. 0N/A * @param text All the text after the @beaninfo tag. 0N/A * @param name Name of the property i.e., mnemonic for setMnemonic 0N/A /** here we create our doclet-beaninfo data structure, which we read in 0N/A * later if it has anything worthwhile 0N/A // Construct a new Descriptor class 0N/A * Parses the substring and returns the cleaned up value for the attribute. 0N/A * @param substring Full String of the attrib tag. 0N/A * i.e., "attribute: visualUpdate true" will return "visualUpdate true"; 0N/A /** if the ATTRIBUTE_NAMES is NOT the description, then we 0N/A * parse until newline 0N/A * if it is the description we read until the next token 0N/A * and then look for a match in the last MAXMATCH index 0N/A * and truncate the description 0N/A * if it is the attribute we wead until no more 0N/A // we want to return : key1 value1 key2 value2 0N/A // Single value properties like bound: true 0N/A // now we need to look for a match of any of the 0N/A return "invalidValue";
0N/A * Creates a HashMap containing the key value pair for the parsed values 0N/A * of the "attributes" and "enum" tags. 0N/A * ie. For attribute value: visualUpdate true 0N/A * The HashMap will have key: visualUpdate, value: true 0N/A for (
int i =
0; i <
num; i++) {
0N/A // looks for extra spaces, \n hard-coded and invisible,etc 0N/A // remove double spaces 0N/A for (
int i =
0; i <
len; i++){