+2010-10-12 Andrew John Hughes <ahughes@redhat.com>
+
+ Import GNU Classpath (libgcj-snapshot-20100921).
+
+ * libjava/Makefile.in: Regenerated.
+ * libjava/javax/swing/text/html/StyleSheet.h,
+ * libjava/javax/swing/text/html/MinimalHTMLWriter.h,
+ * libjava/javax/swing/text/html/HTMLWriter.h,
+ * libjava/javax/xml/stream/XMLEventFactory.h,
+ * libjava/javax/xml/stream/XMLOutputFactory.h,
+ * libjava/javax/xml/stream/events/Namespace.h,
+ * libjava/javax/xml/stream/util/StreamReaderDelegate.h,
+ * libjava/javax/security/auth/kerberos/KeyImpl.h,
+ * libjava/javax/security/auth/kerberos/KerberosTicket.h:
+ Regenerated.
+ * libjava/classpath/Makefile.in,
+ * libjava/classpath/depcomp,
+ * libjava/classpath/scripts/Makefile.in,
+ * libjava/classpath/resource/Makefile.in,
+ * libjava/classpath/tools/Makefile.in:
+ Regenerated. Use libtool from top-level config directory.
+ * libjava/classpath/tools/classes/gnu/classpath/tools/StringToolkit.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml$State.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/IOToolkit.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$3.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$5.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$7.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$9.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$OptionProcessor.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportClassFile.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$21.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocProxy.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$23.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BlockSourceComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree$FileNode.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$25.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/IgnoredFileParseException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TextTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$Context.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/InheritDocTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FunctionComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AdditionExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Type.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NegateExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantDouble.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/EqualExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantChar.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Evaluator.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/DivisionExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantInteger.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantShort.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantLong.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantByte.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnaryExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantFloat.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ModuloExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantString.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AndExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Context.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantNull.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantExpression.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportNotFound.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParamTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Timer.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourceComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/CommentComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionPackage.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/StaticBlockComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ValueTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SeeTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$11.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$13.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ConstructorDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$15.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TemporaryStore.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionClass.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$17.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BracketClose.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$19.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParameterImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ScheduledClass.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportPackageFile.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$2.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SlashSlashCommentComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ErrorReporter.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$4.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$6.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MemberDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$8.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$1.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Debug.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MethodDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$20.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$22.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$24.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet$1.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageDocImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ThrowsTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/EmptyStatementComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/LinkTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/AbstractTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParseException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$10.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$12.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Whitespace.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$14.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ImportComponent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$16.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$18.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourcePositionImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/JavadocWrapper.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$1.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeVariableImpl.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/NotifyingInputStreamReader.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/MethodHelper.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/GcjhMain.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniStubPrinter.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniIncludePrinter.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/PathOptionGroup.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/Keywords.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniPrintStream.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniStubPrinter.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/Main.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniPrintStream.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/javah/ClassWrapper.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$3.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/HashFinder.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$4.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$5.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler$MethodRef.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/WrapUnWrapper.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$6.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$7.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$8.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$9.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Generator.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/GiopIo.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/MethodGenerator.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RmiMethodGenerator.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/SourceRmicCompiler.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Variables.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/CompilationError.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$10.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$11.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$12.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$13.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$14.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$15.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$16.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$17.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$18.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RMICException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$1.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$2.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$1.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$2.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$3.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/MalformedInputEvent.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletConfigurationException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$InterfaceRelation.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTag.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/TargetContext.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet$DocErrorReporterOutputStream.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$1.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$UsageType.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$NullErrorReporter.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer$TagInfo.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionColonSeparated.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$UsageType.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionString.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/CssClass.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$1.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$2.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$3.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$TreeNode.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/InvalidPackageWildcardException.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFlag.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageMatcher.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/StandardTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFile.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOption.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$IndexKey.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionGroup.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTagletPath.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageGroup.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$JarStreamInfo.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$FileStreamInfo.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CodeTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/GenericTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/ValueTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet$EmailReplacement.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/DeprecatedTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/SinceTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/TagletContext.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/VersionTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CopyrightTaglet.class,
+ * libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader.class,
+ * libjava/classpath/tools/classes/com/sun/tools/javadoc/Main.class: Regenerated.
+ * libjava/classpath/doc/Makefile.in,
+ * libjava/classpath/doc/api/Makefile.in,
+ * libjava/classpath/doc/texinfo.tex,
+ * libjava/classpath/external/Makefile.in,
+ * libjava/classpath/external/jsr166/Makefile.in,
+ * libjava/classpath/external/sax/Makefile.in,
+ * libjava/classpath/external/w3c_dom/Makefile.in,
+ * libjava/classpath/external/relaxngDatatype/Makefile.in,
+ * libjava/classpath/include/Makefile.in: Regenerated.
+ * libjava/classpath/m4/lib-prefix.m4,
+ * libjava/classpath/m4/lib-link.m4,
+ * libjava/classpath/m4/lib-ld.m4: Removed.
+ * libjava/classpath/native/jni/classpath/Makefile.in,
+ * libjava/classpath/native/jni/gstreamer-peer/Makefile.in,
+ * libjava/classpath/native/jni/midi-dssi/Makefile.in,
+ * libjava/classpath/native/jni/Makefile.in,
+ * libjava/classpath/native/jni/gconf-peer/Makefile.in,
+ * libjava/classpath/native/jni/java-io/Makefile.in,
+ * libjava/classpath/native/jni/native-lib/Makefile.in,
+ * libjava/classpath/native/jni/native-lib/cpnet.c,
+ * libjava/classpath/native/jni/java-util/Makefile.in,
+ * libjava/classpath/native/jni/java-lang/Makefile.in,
+ * libjava/classpath/native/jni/midi-alsa/Makefile.in,
+ * libjava/classpath/native/jni/java-nio/Makefile.in,
+ * libjava/classpath/native/jni/java-net/Makefile.in,
+ * libjava/classpath/native/jni/java-math/Makefile.in,
+ * libjava/classpath/native/jni/xmlj/Makefile.in,
+ * libjava/classpath/native/jni/qt-peer/Makefile.in,
+ * libjava/classpath/native/jni/gtk-peer/Makefile.in,
+ * libjava/classpath/native/Makefile.in,
+ * libjava/classpath/native/jawt/Makefile.in,
+ * libjava/classpath/native/fdlibm/Makefile.in,
+ * libjava/classpath/native/plugin/Makefile.in,
+ * libjava/classpath/lib/java/util/regex/Matcher.class,
+ * libjava/classpath/lib/java/util/TreeMap$3.class,
+ * libjava/classpath/lib/java/util/Scanner.class,
+ * libjava/classpath/lib/Makefile.in,
+ * libjava/classpath/lib/org/omg/PortableServer/_ServantActivatorStub.class,
+ * libjava/classpath/lib/org/omg/PortableServer/_ServantLocatorStub.class,
+ * libjava/classpath/lib/org/omg/CORBA/portable/InputStream.class,
+ * libjava/classpath/lib/org/omg/CORBA/portable/ObjectImpl.class,
+ * libjava/classpath/lib/org/omg/CORBA/portable/Delegate.class,
+ * libjava/classpath/lib/org/omg/CORBA/LocalObject.class,
+ * libjava/classpath/lib/org/omg/CORBA_2_3/portable/InputStream.class,
+ * libjava/classpath/lib/org/omg/CORBA_2_3/portable/OutputStream.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynSequenceStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynValueStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynStructStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynEnumStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynArrayStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynAnyFactoryStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynAnyStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynUnionStub.class,
+ * libjava/classpath/lib/org/omg/DynamicAny/_DynFixedStub.class,
+ * libjava/classpath/lib/org/ietf/jgss/GSSManager.class,
+ * libjava/classpath/lib/gnu/xml/stream/NamespaceImpl.class,
+ * libjava/classpath/lib/gnu/xml/stream/XIncludeFilter.class,
+ * libjava/classpath/lib/gnu/xml/stream/FilteredStreamReader.class,
+ * libjava/classpath/lib/gnu/xml/stream/XMLEventFactoryImpl.class,
+ * libjava/classpath/lib/gnu/xml/stream/XMLEventAllocatorImpl.class,
+ * libjava/classpath/lib/gnu/xml/stream/XMLStreamWriterImpl.class,
+ * libjava/classpath/lib/gnu/java/locale/LocaleData.class,
+ * libjava/classpath/lib/gnu/javax/swing/text/html/css/Selector.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/CharsetConfigured.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/DocumentFormat.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterUpTime.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/SidesSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PageRangesSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MediaSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OperationsSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CharsetSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/FinishingsSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CompressionSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/SidesDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MediaDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/CopiesDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/UnknownAttribute.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/DetailedStatusMessage.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobPrinterUri.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesCharset.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobStateMessage.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobId.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobMoreInfo.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobUri.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/RequestedAttributes.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/StatusMessage.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/attribute/DocumentAccessError.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/IppUtilities.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class,
+ * libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class,
+ * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode.class,
+ * libjava/classpath/lib/javax/swing/tree/VariableHeightLayoutCache.class,
+ * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PostorderEnumeration.class,
+ * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$BreadthFirstEnumeration.class,
+ * libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration.class,
+ * libjava/classpath/lib/javax/swing/tree/FixedHeightLayoutCache.class,
+ * libjava/classpath/lib/javax/swing/text/html/HTMLEditorKit.class,
+ * libjava/classpath/lib/javax/swing/text/html/StyleSheet$BoxPainter.class,
+ * libjava/classpath/lib/javax/swing/text/html/HTMLWriter.class,
+ * libjava/classpath/lib/javax/swing/text/html/TableView$RowView.class,
+ * libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet$MultiNameEnumeration.class,
+ * libjava/classpath/lib/javax/swing/text/html/MultiStyle.class,
+ * libjava/classpath/lib/javax/swing/text/html/ImageView.class,
+ * libjava/classpath/lib/javax/swing/text/html/TableView$CellView.class,
+ * libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet.class,
+ * libjava/classpath/lib/javax/swing/text/html/ImageView$1.class,
+ * libjava/classpath/lib/javax/swing/text/html/StyleSheet$ListPainter.class,
+ * libjava/classpath/lib/javax/swing/text/html/TableView.class,
+ * libjava/classpath/lib/javax/swing/text/html/StyleSheet.class,
+ * libjava/classpath/lib/javax/swing/text/html/ObjectView.class,
+ * libjava/classpath/lib/javax/swing/text/html/MinimalHTMLWriter.class,
+ * libjava/classpath/lib/javax/swing/undo/UndoableEditSupport.class,
+ * libjava/classpath/lib/javax/swing/undo/StateEdit.class,
+ * libjava/classpath/lib/javax/xml/stream/XMLEventFactory.class,
+ * libjava/classpath/lib/javax/xml/stream/events/Namespace.class,
+ * libjava/classpath/lib/javax/xml/stream/XMLInputFactory.class,
+ * libjava/classpath/lib/javax/xml/stream/util/StreamReaderDelegate.class,
+ * libjava/classpath/lib/javax/xml/stream/XMLOutputFactory.class,
+ * libjava/classpath/lib/javax/security/auth/kerberos/KerberosTicket.class,
+ * libjava/classpath/lib/javax/security/auth/kerberos/KeyImpl.class,
+ * libjava/classpath/missing,
+ * libjava/classpath/aclocal.m4,
+ * libjava/classpath/examples/Makefile.in,
+ * libjava/classpath/install-sh,
+ * libjava/gnu/xml/stream/FilteredStreamReader.h,
+ * libjava/gnu/xml/stream/XMLStreamWriterImpl.h,
+ * libjava/gnu/xml/stream/NamespaceImpl.h,
+ * libjava/gnu/xml/stream/XIncludeFilter.h,
+ * libjava/gnu/javax/swing/text/html/css/Selector.h,
+ * libjava/gnu/javax/print/ipp/attribute/RequestedAttributes.h,
+ * libjava/sources.am: Regenerated.
+
2010-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libjava/Makefile.in: Regenerate.
classpath/javax/xml/stream/events/StartElement.java \
classpath/javax/xml/stream/events/XMLEvent.java \
classpath/javax/xml/stream/util/EventReaderDelegate.java \
-classpath/javax/xml/stream/util/ReaderDelegate.java \
+classpath/javax/xml/stream/util/StreamReaderDelegate.java \
classpath/javax/xml/stream/util/XMLEventAllocator.java \
classpath/javax/xml/stream/util/XMLEventConsumer.java \
classpath/javax/xml/transform/ErrorListener.java \
* configure: Regenerate.
+2010-05-27 Andrew John Hughes <ahughes@redhat.com>
+
+ * configure.ac:
+ Disable plugin by default and warn about
+ unmaintained status when enabled.
+
+2010-05-04 Andrew John Hughes <ahughes@redhat.com>
+
+ * configure.ac:
+ Call AC_PROG_JAVA_WORKS and AC_PROG_JAVAC_WORKS
+ in place of AC_PROG_JAVA and AC_PROG_JAVAC
+ respectively, as this is the real test we want.
+ * m4/ac_prog_java.m4:
+ (AC_PROG_JAVA): Don't include AC_PROG_JAVA_WORKS.
+ * m4/ac_prog_java_works.m4:
+ (AC_PROG_JAVA_WORKS): Require AC_PROG_JAVA and be
+ defined only once. Require AC_PROG_JAVAC_WORKS for
+ compilation of test class. Remove inclusion of
+ AC_PROG_JAVAC.
+ (AC_TRY_COMPILE_JAVA): Require AC_PROG_JAVAC_WORKS
+ rather than AC_PROG_JAVAC. Be defined only once.
+ * m4/ac_prog_javac.m:
+ (AC_PROG_JAVAC): Be defined only once. Don't include
+ AC_PROG_JAVAC_WORKS.
+ * m4/ac_prog_javac_works.m4:
+ (AC_PROG_JAVAC_WORKS): Be defined only once. Require
+ AC_PROG_JAVAC.
+
2010-05-04 Andrew Haley <aph@redhat.com>
* lib/gen-classlist.sh.in: Use absolute pathnames for all the
directory names in the output file.
+2010-05-04 Andrew John Hughes <ahughes@redhat.com>
+
+ * m4/ac_prog_javac.m4:
+ Capture all output from javac --version
+ to avoid excess output. Make sure no appears
+ when javac is not gcj.
+
+2010-05-04 Andrew John Hughes <ahughes@redhat.com>
+
+ * configure.ac:
+ Add output to GMP directory detection and
+ only perform when compiling GMP.
+
+2010-05-04 Mike Stump <mikestump@comcast.net>
+
+ * configure.ac:
+ Allow prefix, libdir and includedir of GMP
+ to be specified via --with-gmp, --with-gmp-include
+ and --with-gmp-lib.
+
+2010-04-28 Andrew John Hughes <ahughes@redhat.com>
+
+ * gnu/javax/print/ipp/IppPrintService.java:
+ (printerAttr): Add generic typing.
+ (printServiceAttributeListener): Likewise.
+ (flavors): Likewise.
+ (printerUris): Likewise.
+ (IppPrintService(URI uri, String username, String password)):
+ Use generic types in initialising listener set.
+ (getPrinterAttributes()): Add generic types. Remove cast.
+ (getPrinterAttributeSet(Class<T>)): Return a set containing
+ attributes of type T. Now creates a new set and checks that
+ all elements of the original set can be cast and added to this
+ new set.
+ (getPrinterDefaultAttribute(Class<? extends Attribute>)): Add
+ generic types.
+ (processResponse()): Add generic types.
+ (getAttribute(Class<T>)): Use generic types corresponding to
+ parent interface.
+ (getSupportedAttributeCategories()): Use generic types.
+ (getSupportedAttributeValues()): Likewise.
+ (handleSupportedAttributeValuesResponse(IppResponse,Class<? extends Attribute>)):
+ Likewise.
+ (isAttributeCategorySupported(Class<? extends Attribute>)): Likewise.
+ * gnu/javax/print/ipp/IppResponse.java:
+ (parseResponse(InputStream)): Use generic types.
+ (parseAttributes(Map<Class<? extends Attribute>, Set<Attribute>, DataInputStream)):
+ Likewise.
+ (addAttribute(Map<Class<? extends Attribute>, Set<Attribute>>, Attribute): Likewise.
+ (IppResponse(URI, short)): Create lists with appropriate type parameters.
+ (getJobAttributes()): Use generic return type.
+ (getOperationAttributes()): Likewise.
+ (getPrinterAttributes()): Likewise.
+ (getUnsupportedAttributes()): Likewise.
+ * gnu/javax/print/ipp/attribute/supported/CompressionSupported.java:
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+ * gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java,
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+ * gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java,
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+ * gnu/javax/print/ipp/attribute/supported/MediaSupported.java,
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+ * gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java,
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+ * gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java,
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+ * gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java,
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+ * gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java,
+ (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
+ as set type parameter and cast when looping over it.
+
+2010-04-28 Andrew John Hughes <ahughes@redhat.com>
+
+ * gnu/javax/print/ipp/IppUtilities.java:
+ (INTEGER_CLASS_ARRAY): Use generic typing.
+ (TEXT_CLASS_ARRAY): Likewise.
+ (classesByName): Likewise.
+ (instanceByClass): Likewise.
+ (getClass(String)): Remove cast. Return generic type.
+ (getSupportedAttrName(Class<? extends Attribute>)): Remove cast.
+ Add generic type to parameter.
+ (getSupportedCategory(Class<?> extends Attribute>)): Likewise.
+ (getEnumAttribute(String,Object)): Add missing generic types on Class.
+ (getIntegerAttribute(String,int)): Likewise and on Constructor.
+ (getTextAttribute(String,byte,byte[])): Likewise.
+
+2010-04-27 Andrew John Hughes <ahughes@redhat.com>
+
+ * gnu/javax/print/ipp/IppRequest.java:
+ (write(RequestedAttributes)): Fix for change in return value
+ of RequestedAttributes.getValues().
+ * gnu/javax/print/ipp/attribute/DetailedStatusMessage.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/DocumentAccessError.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/RequestedAttributes.java:
+ (RequestedAttributes()): Use appropriate generic type with attributes
+ ArrayList.
+ (getValues()): Return an array-based snapshot of the current state of
+ attributes rather than providing direct mutable access to it.
+ * gnu/javax/print/ipp/attribute/StatusMessage.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/UnknownAttribute.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/CopiesDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/MediaDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/defaults/SidesDefault.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/AttributesCharset.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/JobId.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/JobMoreInfo.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/JobPrinterUri.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/JobStateMessage.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/job/JobUri.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/CharsetConfigured.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/DocumentFormat.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.java:
+ (getCategory()): Fix return value.
+ * gnu/javax/print/ipp/attribute/printer/PrinterUpTime.java:
+ (getCategory()): Fix return value.
+
+2010-04-27 Andrew John Hughes <ahughes@redhat.com>
+
+ * gnu/javax/print/CupsIppOperation.java,
+ * gnu/javax/print/CupsMediaMapping.java,
+ * gnu/javax/print/CupsPrintService.java,
+ * gnu/javax/print/CupsPrintServiceLookup.java,
+ * gnu/javax/print/CupsServer.java,
+ * gnu/javax/print/PrintAttributeException.java,
+ * gnu/javax/print/PrintFlavorException.java,
+ * gnu/javax/print/PrintUriException.java,
+ * gnu/javax/print/PrinterDialog.java,
+ * gnu/javax/print/ipp/DocPrintJobImpl.java,
+ * gnu/javax/print/ipp/IppDelimiterTag.java,
+ * gnu/javax/print/ipp/IppException.java,
+ * gnu/javax/print/ipp/IppMultiDocPrintService.java,
+ * gnu/javax/print/ipp/IppRequest.java,
+ * gnu/javax/print/ipp/IppResponse.java,
+ * gnu/javax/print/ipp/IppStatusCode.java,
+ * gnu/javax/print/ipp/IppUtilities.java,
+ * gnu/javax/print/ipp/IppValueTag.java,
+ * gnu/javax/print/ipp/MultiDocPrintJobImpl.java,
+ * gnu/javax/print/ipp/attribute/CharsetSyntax.java,
+ * gnu/javax/print/ipp/attribute/DefaultValueAttribute.java,
+ * gnu/javax/print/ipp/attribute/DetailedStatusMessage.java,
+ * gnu/javax/print/ipp/attribute/DocumentAccessError.java,
+ * gnu/javax/print/ipp/attribute/NaturalLanguageSyntax.java,
+ * gnu/javax/print/ipp/attribute/RequestedAttributes.java,
+ * gnu/javax/print/ipp/attribute/StatusMessage.java,
+ * gnu/javax/print/ipp/attribute/UnknownAttribute.java,
+ * gnu/javax/print/ipp/attribute/defaults/CopiesDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/MediaDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.java,
+ * gnu/javax/print/ipp/attribute/defaults/SidesDefault.java,
+ * gnu/javax/print/ipp/attribute/job/AttributesCharset.java,
+ * gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.java,
+ * gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.java,
+ * gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.java,
+ * gnu/javax/print/ipp/attribute/job/JobId.java,
+ * gnu/javax/print/ipp/attribute/job/JobMoreInfo.java,
+ * gnu/javax/print/ipp/attribute/job/JobPrinterUri.java,
+ * gnu/javax/print/ipp/attribute/job/JobStateMessage.java,
+ * gnu/javax/print/ipp/attribute/job/JobUri.java,
+ * gnu/javax/print/ipp/attribute/printer/CharsetConfigured.java,
+ * gnu/javax/print/ipp/attribute/printer/DocumentFormat.java,
+ * gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.java,
+ * gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.java,
+ * gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.java,
+ * gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.java,
+ * gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.java,
+ * gnu/javax/print/ipp/attribute/printer/PrinterUpTime.java:
+ Normalise whitespace; replace tabs with spaces and removing
+ trailing whitespace.
+
+2010-04-27 Andrew John Hughes <ahughes@redhat.com>
+
+ * gnu/javax/print/ipp/IppPrintService.java:
+ Fix whitespace. Use correct generic type for printerAttr
+ map.
+ (getPrinterAttributeSet(Class<? extends Attribute>)): Add
+ appropriate generic type.
+ * gnu/javax/print/ipp/attribute/supported/CharsetSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/CompressionSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<CompressionSupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<FinishingsSupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<JobSheetsSupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/MediaSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<MediaSupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java:
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<MultipleDocumentHandlingSupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/OperationsSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<OrientationRequestedSupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<PrintQualitySupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ (getAssociatedAttributeArray(Set<PrinterResolutionSupported>)): Add generic
+ type to set and use for-each loop.
+ * gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/SidesSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+ * gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java,
+ Fix whitespace.
+ (getCategory()): Fix return type.
+
2010-04-27 Andrew Haley <aph@redhat.com>
* java/util/concurrent/CopyOnWriteArrayList.java: Fix for empty
2010-04-27 Andrew Haley <aph@redhat.com>
* gnu/javax/print/ipp/IppResponse.java (parseAttributes): Handle
- IppValueTag.UNKNOWN.
+ IppValueTag.UNKNOWN.
* gnu/javax/print/ipp/IppRequest.java (writeOperationAttributes):
Handle RequestedAttributes.
* gnu/javax/print/ipp/IppPrintService.java (processResponse): Add
* resource/Makefile.in: Regenerate.
* scripts/Makefile.in: Regenerate.
* tools/Makefile.in: Regenerate.
+
2010-03-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgcj/38251
* tools/Makefile.am (UPDATE_TOOLS_ZIP, CREATE_TOOLS_ZIP): Exclude
.svn direcories.
+2010-01-30 Andrew John Hughes <ahughes@redhat.com>
+
+ * doc/www.gnu.org/home.wml:
+ Add newer JAPI results.
+
+2010-01-30 Andrew John Hughes <ahughes@redhat.com>
+
+ PR classpath/41686
+ * javax/security/auth/kerberos/KerberosTicket.java:
+ Fix formatting.
+ (toString()): Add full implementation.
+ (getSessionKeyType()): Implemented.
+ * javax/security/auth/kerberos/KeyImpl.java:
+ (toString()): Implemented.
+
+2010-01-30 Andrew John Hughes <ahughes@redhat.com>
+
+ * autogen.sh:
+ Allow libtool 2.* through.
+ * configure.ac:
+ Updated via autoupdate.
+ * m4/lib-ld.m4,
+ * m4/lib-link.m4,
+ * m4/lib-prefix.m4:
+ Drop old libtool macros which
+ result in build failure.
+
2010-01-18 Andreas Tobler <andreast@fgznet.ch>
* tools/Makefile.am (GJDOC_EX): Use find -name pattern -prune -o.
* tools/Makefile.in: Regenerate.
+2010-01-12 Jeroen Frijters <jeroen@frijters.net>
+
+ * java/util/zip/Inflater. java (inflate(byte[],int,int)): Fix for #41696.
+
2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
* scripts/Makefile.in: Regenerate.
* tools/Makefile.in: Regenerate.
+2009-11-18 Andrew Haley <aph@redhat.com>
+
+ * java/util/TreeMap.java (anonymous class.size()): Debogosify.
+ anonymous class.clear(): Likewise.
+
+2009-10-22 Andrew Haley <aph@redhat.com>
+
+ * native/jni/native-lib/cpnet.c (cpnet_addMembership): Fix
+ aliasing warning.
+ (cpnet_dropMembership): Likewise.
+
2009-10-22 Richard Guenther <rguenther@suse.de>
PR cp-tools/39177
(func_mode_link): Add new -bindir option, and use it to place
output DLL if specified.
+2009-07-08 Chris Burdess <dog@gnu.org>
+
+ PR xml/40663:
+ * javax/xml/stream/XMLEventFactory.java,
+ * javax/xml/stream/XMLInputFactory.java,
+ * javax/xml/stream/XMLOutputFactory.java,
+ * javax/xml/stream/events/Namespace.java: Update API to match final
+ version of StAX.
+ * javax/xml/stream/util/ReaderDelegate.java: Removed.
+ * javax/xml/stream/util/StreamReaderDelegate.java: Added (renamed
+ from ReaderDelegate)
+ * gnu/xml/stream/FilteredStreamReader.java,
+ * gnu/xml/stream/NamespaceImpl.java,
+ * gnu/xml/stream/XIncludeFilter.java,
+ * gnu/xml/stream/XMLEventAllocatorImpl.java,
+ * gnu/xml/stream/XMLEventFactoryImpl.java: Update implementation to
+ match final version of StAX API.
+
+2009-07-06 Ludovic Claude <ludovic.claude@laposte.net>
+
+ PR xml/40653:
+ * gnu/xml/stream/XMLStreamWriterImpl.java:
+ Weaken testing of namespace prefix to match
+ reference implementation and spec.
+
+2009-07-07 Andrew John Hughes <ahughes@redhat.com>
+
+ PR classpath/40630
+ * java/util/Scanner.java:
+ (myCoreNext(boolean, Pattern)): Set tmp2 to
+ null if the string is empty (i.e. we are at
+ the end of the file).
+ * java/util/regex/Matcher.java:
+ (toMatchResult()): Check that match is non-null
+ before attempting to clone it.
+
+2009-07-07 Andrew John Hughes <ahughes@redhat.com>
+
+ * java/util/Scanner.java,
+ * java/util/regex/Matcher.java:
+ Replace tab characters with spaces.
+
2009-06-29 Andrew Haley <aph@redhat.com>
PR java/40590
New methods.
(moveToPackage): Use printName().
+2009-03-29 Mark Wielaard <mark@klomp.org>
+
+ * doc/www.gnu.org/faq/faq.wml: Fix link to cp-hacking.html.
+
+2009-03-29 Mark Wielaard <mark@klomp.org>
+
+ * m4/ac_prog_antlr.m4: Check whether ANTLR_JAR is empty.
+
+2009-03-26 Andrew John Hughes <ahughes@redhat.com>
+
+ PR classpath/39408:
+ * tools/gnu/classpath/tools/javah/ClassWrapper.java:
+ (linkSupers()): Make package-private.
+ * tools/gnu/classpath/tools/javah/JniIncludePrinter.java:
+ (writeFields(ClassWrapper, JniPrintStream)):
+ Link in data from superclass before searching for fields.
+
+2009-03-20 Andrew John Hughes <ahughes@redhat.com>
+
+ * tools/gnu/classpath/tools/javah/ClassWrapper.java,
+ * tools/gnu/classpath/tools/javah/CniPrintStream.java,
+ * tools/gnu/classpath/tools/javah/CniStubPrinter.java,
+ * tools/gnu/classpath/tools/javah/GcjhMain.java,
+ * tools/gnu/classpath/tools/javah/JniIncludePrinter.java,
+ * tools/gnu/classpath/tools/javah/JniPrintStream.java,
+ * tools/gnu/classpath/tools/javah/JniStubPrinter.java,
+ * tools/gnu/classpath/tools/javah/Keywords.java,
+ * tools/gnu/classpath/tools/javah/Main.java,
+ * tools/gnu/classpath/tools/javah/MethodHelper.java,
+ * tools/gnu/classpath/tools/javah/PathOptionGroup.java:
+ Fix generic issues in gjavah.
+
+2009-03-17 Andrew John Hughes <ahughes@redhat.com>
+
+ * tools/gnu/classpath/tools/FileSystemClassLoader.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java,
+ * tools/gnu/classpath/tools/gjdoc/ErrorReporter.java,
+ * tools/gnu/classpath/tools/gjdoc/TemporaryStore.java,
+ * tools/gnu/classpath/tools/gjdoc/WritableType.java,
+ * tools/gnu/classpath/tools/taglets/AuthorTaglet.java,
+ * tools/gnu/classpath/tools/taglets/CopyrightTaglet.java,
+ * tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java,
+ * tools/gnu/classpath/tools/taglets/GenericTaglet.java,
+ * tools/gnu/classpath/tools/taglets/SinceTaglet.java,
+ * tools/gnu/classpath/tools/taglets/VersionTaglet.java:
+ Switch to UNIX line endings.
+
+2009-03-17 Andrew John Hughes <ahughes@redhat.com>
+
+ * tools/com/sun/tools/javadoc/Main.java,
+ * tools/gnu/classpath/tools/FileSystemClassLoader.java,
+ * tools/gnu/classpath/tools/IOToolkit.java,
+ * tools/gnu/classpath/tools/MalformedInputEvent.java,
+ * tools/gnu/classpath/tools/MalformedInputListener.java,
+ * tools/gnu/classpath/tools/NotifyingInputStreamReader.java,
+ * tools/gnu/classpath/tools/StringToolkit.java,
+ * tools/gnu/classpath/tools/doclets/AbstractDoclet.java,
+ * tools/gnu/classpath/tools/doclets/DocletConfigurationException.java,
+ * tools/gnu/classpath/tools/doclets/DocletOption.java,
+ * tools/gnu/classpath/tools/doclets/DocletOptionColonSeparated.java,
+ * tools/gnu/classpath/tools/doclets/DocletOptionFile.java,
+ * tools/gnu/classpath/tools/doclets/DocletOptionFlag.java,
+ * tools/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.java,
+ * tools/gnu/classpath/tools/doclets/DocletOptionString.java,
+ * tools/gnu/classpath/tools/doclets/InlineTagRenderer.java,
+ * tools/gnu/classpath/tools/doclets/InvalidPackageWildcardException.java,
+ * tools/gnu/classpath/tools/doclets/PackageGroup.java,
+ * tools/gnu/classpath/tools/doclets/PackageMatcher.java,
+ * tools/gnu/classpath/tools/doclets/StandardTaglet.java,
+ * tools/gnu/classpath/tools/doclets/TagletPrinter.java,
+ * tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java,
+ * tools/gnu/classpath/tools/doclets/htmldoclet/CssClass.java,
+ * tools/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.java,
+ * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java,
+ * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.java,
+ * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.java,
+ * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java,
+ * tools/gnu/classpath/tools/gjdoc/AbstractTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.java,
+ * tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java,
+ * tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ConstructorDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/Debug.java,
+ * tools/gnu/classpath/tools/gjdoc/DirectoryTree.java,
+ * tools/gnu/classpath/tools/gjdoc/DocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ErrorReporter.java,
+ * tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/GjdocPackageDoc.java,
+ * tools/gnu/classpath/tools/gjdoc/GjdocRootDoc.java,
+ * tools/gnu/classpath/tools/gjdoc/InheritDocTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/JavadocWrapper.java,
+ * tools/gnu/classpath/tools/gjdoc/LinkTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/Main.java,
+ * tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/MethodDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ParamTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ParameterImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ParseException.java,
+ * tools/gnu/classpath/tools/gjdoc/Parser.java,
+ * tools/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/RootDocImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/SeeTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/SourcePositionImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/TagContainer.java,
+ * tools/gnu/classpath/tools/gjdoc/TagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/TemporaryStore.java,
+ * tools/gnu/classpath/tools/gjdoc/TextTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ThrowsTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/Timer.java,
+ * tools/gnu/classpath/tools/gjdoc/TimerDoclet.java,
+ * tools/gnu/classpath/tools/gjdoc/TypeImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/TypeVariableImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/ValueTagImpl.java,
+ * tools/gnu/classpath/tools/gjdoc/WritableType.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/AdditionExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/AndExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BinaryExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantByte.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantChar.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantDouble.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantFloat.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantInteger.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantLong.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantNull.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantShort.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ConstantString.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/Context.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/DivisionExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/EqualExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/Expression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/LessThanExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ModuloExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/NegateExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/NotExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/Type.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/UnaryExpression.java,
+ * tools/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.java,
+ * tools/gnu/classpath/tools/java2xhtml/Java2xhtml.java,
+ * tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java,
+ * tools/gnu/classpath/tools/rmic/CompilationError.java,
+ * tools/gnu/classpath/tools/rmic/Generator.java,
+ * tools/gnu/classpath/tools/rmic/GiopIo.java,
+ * tools/gnu/classpath/tools/rmic/HashFinder.java,
+ * tools/gnu/classpath/tools/rmic/Main.java,
+ * tools/gnu/classpath/tools/rmic/MethodGenerator.java,
+ * tools/gnu/classpath/tools/rmic/RMICException.java,
+ * tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java,
+ * tools/gnu/classpath/tools/rmic/RmicBackend.java,
+ * tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java,
+ * tools/gnu/classpath/tools/rmic/Variables.java,
+ * tools/gnu/classpath/tools/rmic/WrapUnWrapper.java,
+ * tools/gnu/classpath/tools/serialver/SerialVer.java,
+ * tools/gnu/classpath/tools/taglets/AuthorTaglet.java,
+ * tools/gnu/classpath/tools/taglets/CodeTaglet.java,
+ * tools/gnu/classpath/tools/taglets/CopyrightTaglet.java,
+ * tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java,
+ * tools/gnu/classpath/tools/taglets/GenericTaglet.java,
+ * tools/gnu/classpath/tools/taglets/GnuExtendedTaglet.java,
+ * tools/gnu/classpath/tools/taglets/SinceTaglet.java,
+ * tools/gnu/classpath/tools/taglets/TagletContext.java,
+ * tools/gnu/classpath/tools/taglets/ValueTaglet.java,
+ * tools/gnu/classpath/tools/taglets/VersionTaglet.java:
+ Fix license headers to GPLv2+Classpath exception.
+
+2009-03-09 Andrew John Hughes <ahughes@redhat.com>
+
+ * gnu/javax/swing/text/html/css/Selector.java:
+ Use CPStringBuilder. Use typed list of maps
+ rather than an array for type safety.
+ * javax/swing/text/html/HTMLEditorKit.java,
+ * javax/swing/text/html/HTMLWriter.java:
+ Add generic typing where appropriate.
+ * javax/swing/text/html/ImageView.java:
+ Remove unused AttributeSet variables.
+ * javax/swing/text/html/MinimalHTMLWriter.java:
+ Switch to an ArrayDeque to avoid unnecessary
+ internal synchronisation on a private variable.
+ Add generic typing.
+ * javax/swing/text/html/MultiAttributeSet.java:
+ Add generic typing.
+ * javax/swing/text/html/MultiStyle.java:
+ Add generic typing, make class package-private
+ as not part of the standard classes.
+ * javax/swing/text/html/ObjectView.java,
+ * javax/swing/text/html/StyleSheet.java:
+ Add generic typing.
+ * javax/swing/text/html/TableView.java:
+ Remove unused variable.
+ * javax/swing/tree/DefaultMutableTreeNode.java:
+ Add generic typing, mute warnings where necessary.
+ * javax/swing/tree/FixedHeightLayoutCache.java:
+ Add generic typing.
+ * javax/swing/tree/TreeNode.java:
+ Mute warnings where necessary.
+ * javax/swing/tree/VariableHeightLayoutCache.java,
+ * javax/swing/undo/StateEdit.java,
+ * javax/swing/undo/UndoableEditSupport.java,
+ * org/ietf/jgss/GSSManager.java:
+ Add generic typing.
+
+2009-02-14 Andrew John Hughes <ahughes@redhat.com>
+
+ * org/omg/CORBA/LocalObject.java,
+ * org/omg/CORBA/portable/Delegate.java,
+ * org/omg/CORBA/portable/InputStream.java,
+ * org/omg/CORBA/portable/ObjectImpl.java,
+ * org/omg/CORBA_2_3/portable/InputStream.java,
+ * org/omg/CORBA_2_3/portable/OutputStream.java,
+ * org/omg/DynamicAny/_DynAnyFactoryStub.java,
+ * org/omg/DynamicAny/_DynAnyStub.java,
+ * org/omg/DynamicAny/_DynArrayStub.java,
+ * org/omg/DynamicAny/_DynEnumStub.java,
+ * org/omg/DynamicAny/_DynFixedStub.java,
+ * org/omg/DynamicAny/_DynSequenceStub.java,
+ * org/omg/DynamicAny/_DynStructStub.java,
+ * org/omg/DynamicAny/_DynUnionStub.java,
+ * org/omg/DynamicAny/_DynValueStub.java,
+ * org/omg/PortableServer/_ServantActivatorStub.java,
+ * org/omg/PortableServer/_ServantLocatorStub.java:
+ Turn off warnings where Class is used; forced
+ to use raw type for API compatibility.
+
+2009-02-06 Andrew John Hughes <ahughes@redhat.com>
+
+ * NEWS:
+ Add stub for 0.99.
+ * configure.ac:
+ Bump to 0.99.
+ * doc/www.gnu.org/announce/20090205.wml,
+ * doc/www.gnu.org/downloads/downloads.wml,
+ * doc/www.gnu.org/newsitems.txt:
+ Update website.
+
2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2009-02-05 Andrew John Hughes <ahughes@redhat.com>
* NEWS: Add VM updates.
-
+
2009-02-05 Andrew John Hughes <ahughes@redhat.com>
* NEWS: Updated.
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
-The simplest way to compile this package is:
+ The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
- the package.
+ the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
all sorts of other programs in order to regenerate files that came
with the distribution.
- 6. Often, you can also type `make uninstall' to remove the installed
- files again.
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
Compilers and Options
=====================
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-Optional Features
-=================
-
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
Particular systems
==================
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
- ./configure CC="cc -Ae"
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
./configure CC="cc -nodtk"
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
Specifying the System Type
==========================
where SYSTEM can have one of these forms:
- OS KERNEL-OS
+ OS
+ KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
`configure' can determine that directory automatically.
`--prefix=DIR'
- Use DIR as the installation prefix. *Note Installation Names::
+ Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
../../config.rpath ../../config.sub ../../depcomp \
../../install-sh ../../ltmain.sh ../../missing \
../../mkinstalldirs ../../ylwrap AUTHORS COPYING ChangeLog \
- INSTALL NEWS TODO compile config.guess config.sub depcomp \
- install-sh ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh ltconfig \
+ INSTALL NEWS TODO compile config.guess config.rpath config.sub \
+ depcomp install-sh ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh ltconfig \
ltmain.sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+New in release 0.99 (XXX XX, XXXX)
+
New in release 0.98 (Feb 05, 2009)
* Native support for BigInteger is now provided using the GMP
m4_include([../../config/depstand.m4])
m4_include([../../config/lead-dot.m4])
+m4_include([../../config/lib-ld.m4])
+m4_include([../../config/lib-link.m4])
+m4_include([../../config/lib-prefix.m4])
m4_include([../../config/multi.m4])
m4_include([../../config/no-executables.m4])
m4_include([../../config/override.m4])
m4_include([m4/ax_func_which_gethostbyname_r.m4])
m4_include([m4/gcc_attribute.m4])
m4_include([m4/iconv.m4])
-m4_include([m4/lib-ld.m4])
-m4_include([m4/lib-link.m4])
-m4_include([m4/lib-prefix.m4])
m4_include([m4/pkg.m4])
if ${LIBTOOLIZE} --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`${LIBTOOLIZE} --version | sed 's/^.*[^0-9.]\([0-9]\{1,\}\.[0-9.]\{1,\}\).*/\1/'`
case $libtool_version in
- 1.5*)
+ 1.5*|2.*)
have_libtool=true
;;
esac
--- /dev/null
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2010 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | k*bsd*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case $cc_basename in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ library_names_spec='$libname.a'
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd1*)
+ ;;
+ freebsd* | dragonfly*)
+ case "$host_os" in
+ freebsd[123]*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+ esac
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ nto-qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for GNU Classpath 0.98.
+# Generated by GNU Autoconf 2.64 for GNU Classpath 0.99-pre.
#
# Report bugs to <classpath@gnu.org>.
#
# Identity of this package.
PACKAGE_NAME='GNU Classpath'
PACKAGE_TARNAME='classpath'
-PACKAGE_VERSION='0.98'
-PACKAGE_STRING='GNU Classpath 0.98'
+PACKAGE_VERSION='0.99-pre'
+PACKAGE_STRING='GNU Classpath 0.99-pre'
PACKAGE_BUGREPORT='classpath@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/classpath/'
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU Classpath 0.98 to adapt to many kinds of systems.
+\`configure' configures GNU Classpath 0.99-pre to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU Classpath 0.98:";;
+ short | recursive ) echo "Configuration of GNU Classpath 0.99-pre:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Classpath configure 0.98
+GNU Classpath configure 0.99-pre
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU Classpath $as_me 0.98, which was
+It was created by GNU Classpath $as_me 0.99-pre, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
+
ac_aux_dir=
for ac_dir in ../.. "$srcdir"/../..; do
for ac_t in install-sh install.sh shtool; do
# Define the identity of the package.
PACKAGE='classpath'
- VERSION='0.98'
+ VERSION='0.99-pre'
cat >>confdefs.h <<_ACEOF
*) COMPILE_PLUGIN=yes ;;
esac
else
- COMPILE_PLUGIN=yes
+ COMPILE_PLUGIN=no
fi
if test "x${COMPILE_PLUGIN}" = xyes; then
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11821 "configure"
+#line 11822 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11927 "configure"
+#line 11928 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
if test "x${COMPILE_GMP}" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP directories" >&5
+$as_echo_n "checking for GMP directories... " >&6; }
+ if test "x$with_gmp" != x; then
+ gmplibs="-L$with_gmp/lib -lgmp"
+ gmpinc="-I$with_gmp/include"
+ if test "x$with_gmp_include" != x; then
+ gmpinc="-I$with_gmp_include $gmpinc"
+ fi
+ if test "x$with_gmp_lib" != x; then
+ gmplibs="-L$with_gmp_lib $gmplibs"
+ fi
+ else
+ with_gmp="/usr"
+ gmplibs="-lgmp"
+ gmpinc="-I/usr/include"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc" >&5
+$as_echo "prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_mul_si in -lgmp" >&5
$as_echo_n "checking for __gmpz_mul_si in -lgmp... " >&6; }
if test "${ac_cv_lib_gmp___gmpz_mul_si+set}" = set; then :
fi
test "x$JAVA" = x && as_fn_error "no acceptable Java virtual machine found in \$PATH" "$LINENO" 5
-# Extract the first word of "uudecode$EXEEXT", so it can be a program name with args.
-set dummy uudecode$EXEEXT; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_uudecode+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$uudecode"; then
- ac_cv_prog_uudecode="$uudecode" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_uudecode="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-uudecode=$ac_cv_prog_uudecode
-if test -n "$uudecode"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $uudecode" >&5
-$as_echo "$uudecode" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x$uudecode = xyes; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if uudecode can decode base 64 file" >&5
-$as_echo_n "checking if uudecode can decode base 64 file... " >&6; }
-if test "${ac_cv_prog_uudecode_base64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-cat << \EOF > Test.uue
-begin-base64 644 Test.class
-yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
-bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
-bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s
-YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG
-aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB
-AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB
-AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ=
-====
-EOF
-if uudecode$EXEEXT Test.uue; then
- ac_cv_prog_uudecode_base64=yes
-else
- echo "configure: 23737: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
- echo "configure: failed file was:" >&5
- cat Test.uue >&5
- ac_cv_prog_uudecode_base64=no
-fi
-rm -f Test.uue
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_uudecode_base64" >&5
-$as_echo "$ac_cv_prog_uudecode_base64" >&6; }
-fi
-if test x$ac_cv_prog_uudecode_base64 != xyes; then
- rm -f Test.class
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I have to compile Test.class from scratch" >&5
-$as_echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;}
- if test x$ac_cv_prog_javac_works = xno; then
- as_fn_error "Cannot compile java source. $JAVAC does not work properly" "$LINENO" 5
- fi
- if test x$ac_cv_prog_javac_works = x; then
ECJ_OPTS="-warn:-deprecation,serial,unusedImport"
JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
$as_echo_n "(cached) " >&6
else
-if $JAVAC --version | grep gcj > /dev/null; then
+if $JAVAC --version 2>&1 | grep gcj >&5 ; then
ac_cv_prog_javac_is_gcj=yes;
JAVAC="$JAVAC $GCJ_OPTS";
+else
+ ac_cv_prog_javac_is_gcj=no;
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_is_gcj" >&5
$as_echo "$ac_cv_prog_javac_is_gcj" >&6; }
GCJ_JAVAC_FALSE=
fi
-if test "$enable_java_maintainer_mode" = yes; then
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVAC works" >&5
$as_echo_n "checking if $JAVAC works... " >&6; }
JAVA_TEST=Object.java
CLASS_TEST=Object.class
cat << \EOF > $JAVA_TEST
-/* #line 23882 "configure" */
+/* #line 23829 "configure" */
package java.lang;
public class Object
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_works" >&5
$as_echo "$ac_cv_prog_javac_works" >&6; }
+
+
+# Extract the first word of "uudecode$EXEEXT", so it can be a program name with args.
+set dummy uudecode$EXEEXT; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_uudecode+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$uudecode"; then
+ ac_cv_prog_uudecode="$uudecode" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_uudecode="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+uudecode=$ac_cv_prog_uudecode
+if test -n "$uudecode"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $uudecode" >&5
+$as_echo "$uudecode" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
+if test x$uudecode = xyes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if uudecode can decode base 64 file" >&5
+$as_echo_n "checking if uudecode can decode base 64 file... " >&6; }
+if test "${ac_cv_prog_uudecode_base64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+cat << \EOF > Test.uue
+begin-base64 644 Test.class
+yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
+bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
+bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s
+YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG
+aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB
+AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB
+AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ=
+====
+EOF
+if uudecode$EXEEXT Test.uue; then
+ ac_cv_prog_uudecode_base64=yes
+else
+ echo "configure: 23922: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
+ echo "configure: failed file was:" >&5
+ cat Test.uue >&5
+ ac_cv_prog_uudecode_base64=no
+fi
+rm -f Test.uue
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_uudecode_base64" >&5
+$as_echo "$ac_cv_prog_uudecode_base64" >&6; }
+fi
+if test x$ac_cv_prog_uudecode_base64 != xyes; then
+ rm -f Test.class
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I have to compile Test.class from scratch" >&5
+$as_echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;}
+ if test x$ac_cv_prog_javac_works = xno; then
+ as_fn_error "Cannot compile java source. $JAVAC does not work properly" "$LINENO" 5
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVA works" >&5
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
-/* [#]line 23929 "configure" */
+/* [#]line 23950 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);
} }
EOF
if test x$ac_cv_prog_uudecode_base64 != xyes; then
+
if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
$as_echo "$ac_cv_prog_java_works" >&6; }
-
fi
if test "x${COMPILE_GJDOC}" = xyes; then
if test -z "$JAVA"; then
as_fn_error "Failed to find either an antlr binary or a suitable Java runtime for ANTLR." "$LINENO" 5
else
- ANTLR="$JAVA -classpath $ANTLR_JAR antlr.Tool"
+ if test -z "$ANTLR_JAR"; then
+ as_fn_error "Failed to find either an antlr binary or a suitable antlr jar file." "$LINENO" 5
+ else
+ ANTLR="$JAVA -classpath $ANTLR_JAR antlr.Tool"
+ fi
fi
fi
if test "x${use_glibj_zip}" = xfalse || \
test "x${EXAMPLESDIR}" != x || \
test "x${TOOLSDIR}" != x && \
- test "x${build_class_files}" != xno; then
-
-ECJ_OPTS="-warn:-deprecation,serial,unusedImport"
-JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
-GCJ_OPTS="-g"
-if test "x$JAVAPREFIX" = x; then
- test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_JAVAC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$JAVAC"; then
- ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_JAVAC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-JAVAC=$ac_cv_prog_JAVAC
-if test -n "$JAVAC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
-$as_echo "$JAVAC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$JAVAC" && break
-done
-
-else
- test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C"
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_JAVAC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$JAVAC"; then
- ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_JAVAC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-JAVAC=$ac_cv_prog_JAVAC
-if test -n "$JAVAC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
-$as_echo "$JAVAC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$JAVAC" && break
-done
-test -n "$JAVAC" || JAVAC="$JAVAPREFIX"
-
-fi
-test "x$JAVAC" = x && as_fn_error "no acceptable Java compiler found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVAC is a version of gcj" >&5
-$as_echo_n "checking if $JAVAC is a version of gcj... " >&6; }
-if test "${ac_cv_prog_javac_is_gcj+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-if $JAVAC --version | grep gcj > /dev/null; then
- ac_cv_prog_javac_is_gcj=yes;
- JAVAC="$JAVAC $GCJ_OPTS";
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_is_gcj" >&5
-$as_echo "$ac_cv_prog_javac_is_gcj" >&6; }
-JAVAC_IS_GCJ=$ac_cv_prog_javac_is_gcj
-
- if test x"${JAVAC_IS_GCJ}" = xyes; then
- GCJ_JAVAC_TRUE=
- GCJ_JAVAC_FALSE='#'
-else
- GCJ_JAVAC_TRUE='#'
- GCJ_JAVAC_FALSE=
-fi
-
-if test "$enable_java_maintainer_mode" = yes; then
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $JAVAC works" >&5
-$as_echo_n "checking if $JAVAC works... " >&6; }
-if test "${ac_cv_prog_javac_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-JAVA_TEST=Object.java
-CLASS_TEST=Object.class
-cat << \EOF > $JAVA_TEST
-/* #line 24255 "configure" */
-package java.lang;
-
-public class Object
-{
- static <T> void doStuff()
- {
- }
-}
-EOF
-if test x$JAVAC_IS_GCJ = xyes; then
- CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST"
-else
- CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST"
-fi
-if { ac_try='$CMD'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } >/dev/null 2>&1; then
- ac_cv_prog_javac_works=yes
-else
- as_fn_error "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
- echo "configure: failed program was:" >&5
- cat $JAVA_TEST >&5
-fi
-rm -f $JAVA_TEST $CLASS_TEST
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_works" >&5
-$as_echo "$ac_cv_prog_javac_works" >&6; }
-
-fi
-
+ test "x${build_class_files}" != xno && \
+ test "${enable_java_maintainer_mode}" = yes; then
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
- /* #line 24294 "configure" */
+ /* #line 24158 "configure" */
public class Test
{
public static void main(String args)
rm -f $JAVA_TEST $CLASS_TEST
+else
+ if no; then
+ GCJ_JAVAC_TRUE=
+ GCJ_JAVAC_FALSE='#'
+else
+ GCJ_JAVAC_TRUE='#'
+ GCJ_JAVAC_FALSE=
+fi
+
fi
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU Classpath $as_me 0.98, which was
+This file was extended by GNU Classpath $as_me 0.99-pre, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-GNU Classpath config.status 0.98
+GNU Classpath config.status 0.99-pre
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
if test x$use_escher != xtrue; then
echo gnu/java/awt/peer/x/.*java$ >> lib/standard.omit
fi
+
+if test "x${COMPILE_PLUGIN}" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have enabled the browser plugin. Please note that this is no longer maintained as part of GNU Classpath; development has moved to the IcedTea project." >&5
+$as_echo "$as_me: WARNING: You have enabled the browser plugin. Please note that this is no longer maintained as part of GNU Classpath; development has moved to the IcedTea project." >&2;}
+fi
dnl define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl
-AC_INIT([GNU Classpath],[0.98],[classpath@gnu.org],[classpath])
+AC_INIT([GNU Classpath],[0.99-pre],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java)
+AC_CONFIG_MACRO_DIR([m4])
dnl GCJ LOCAL
AC_CONFIG_AUX_DIR(../..)
AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
dnl -----------------------------------------------------------
-dnl Plugin (enabled by default)
+dnl Plugin (disabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([plugin],
[AS_HELP_STRING(--disable-plugin,compile gcjwebplugin (disabled by --disable-plugin) [default=yes])],
no) COMPILE_PLUGIN=no ;;
*) COMPILE_PLUGIN=yes ;;
esac],
- [COMPILE_PLUGIN=yes])
+ [COMPILE_PLUGIN=no])
AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes)
dnl -----------------------------------------------------------
dnl Initialize libtool
AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
+LT_INIT
AC_PROG_AWK
AC_PROG_CC
AM_PROG_CC_C_O
dnl Check for MSG_NOSIGNAL
dnl **********************************************************************
AC_MSG_CHECKING(for MSG_NOSIGNAL)
- AC_TRY_COMPILE([#include <sys/socket.h>],
- [ int f = MSG_NOSIGNAL; ],
- [ AC_MSG_RESULT(yes)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[ int f = MSG_NOSIGNAL; ]])],[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,
- [Define this symbol if you have MSG_NOSIGNAL]) ],
- [ AC_MSG_RESULT(no)]
- )
+ [Define this symbol if you have MSG_NOSIGNAL]) ],[ AC_MSG_RESULT(no)
+ ])
dnl **********************************************************************
dnl Check for SO_NOSIGPIPE (Darwin equivalent for MSG_NOSIGNAL)
dnl **********************************************************************
AC_MSG_CHECKING(for SO_NOSIGPIPE )
- AC_TRY_COMPILE([#include <sys/socket.h>],
- [ int f = SO_NOSIGPIPE; ],
- [ AC_MSG_RESULT(yes)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[ int f = SO_NOSIGPIPE; ]])],[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SO_NOSIGPIPE, 1,
- [Define this symbol if you have SO_NOSIGPIPE]) ],
- [ AC_MSG_RESULT(no)]
- )
+ [Define this symbol if you have SO_NOSIGPIPE]) ],[ AC_MSG_RESULT(no)
+ ])
dnl **********************************************************************
dnl Check for MSG_WAITALL
dnl **********************************************************************
AC_MSG_CHECKING(for MSG_WAITALL)
- AC_TRY_COMPILE([#include <sys/socket.h>],
- [ int f = MSG_WAITALL; ],
- [ AC_MSG_RESULT(yes)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[ int f = MSG_WAITALL; ]])],[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MSG_WAITALL, 1,
- [Define this symbol if you have MSG_WAITALL]) ],
- [ AC_MSG_RESULT(no)]
- )
+ [Define this symbol if you have MSG_WAITALL]) ],[ AC_MSG_RESULT(no)
+ ])
dnl Check for plugin support headers and libraries.
if test "x${COMPILE_PLUGIN}" = xyes; then
fi
if test "x${COMPILE_GMP}" = xyes; then
+ AC_MSG_CHECKING([for GMP directories])
+ if test "x$with_gmp" != x; then
+ gmplibs="-L$with_gmp/lib -lgmp"
+ gmpinc="-I$with_gmp/include"
+ if test "x$with_gmp_include" != x; then
+ gmpinc="-I$with_gmp_include $gmpinc"
+ fi
+ if test "x$with_gmp_lib" != x; then
+ gmplibs="-L$with_gmp_lib $gmplibs"
+ fi
+ else
+ with_gmp="/usr"
+ gmplibs="-lgmp"
+ gmpinc="-I/usr/include"
+ fi
+ AC_MSG_RESULT([prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc])
AC_CHECK_LIB(gmp, __gmpz_mul_si,
[GMP_CFLAGS="$gmpinc"
GMP_LIBS="$gmplibs" ],
if test "x${TOOLSDIR}" != x; then
dnl GCJ LOCAL
if test "x${COMPILE_WRAPPERS}" = xno && test "x${enable_java_maintainer_mode}" = xyes; then
- AC_PROG_JAVA
+ AC_PROG_JAVA_WORKS
fi
dnl END GCJ LOCAL
if test "x${COMPILE_GJDOC}" = xyes; then
if test "x${use_glibj_zip}" = xfalse || \
test "x${EXAMPLESDIR}" != x || \
test "x${TOOLSDIR}" != x && \
- test "x${build_class_files}" != xno; then
- AC_PROG_JAVAC
+ test "x${build_class_files}" != xno && \
+ test "${enable_java_maintainer_mode}" = yes; then dnl GCJ_LOCAL
+ AC_PROG_JAVAC_WORKS
CLASSPATH_JAVAC_MEM_CHECK
+else
+ AM_CONDITIONAL(GCJ_JAVAC, no)
fi
dnl -----------------------------------------------------------
if test x$use_escher != xtrue; then
echo gnu/java/awt/peer/x/.*java$ >> lib/standard.omit
fi
+
+if test "x${COMPILE_PLUGIN}" = "xyes" ; then
+ AC_MSG_WARN([You have enabled the browser plugin. Please note that this is no longer maintained as part of GNU Classpath; development has moved to the IcedTea project.])
+fi
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2007-03-29.01
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
depmode=dashmstdout
fi
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
-' ' ' >> $depfile
- echo >> $depfile
+' ' ' >> "$depfile"
+ echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
+ >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
- sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
- cleared=no
- for arg in "$@"; do
+ cleared=no eat=no
+ for arg
+ do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
IFS=" "
for arg
do
case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
;;
esac
done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
none)
exec "$@"
;;
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
This file contains important information you will need to know if you
are going to hack on the GNU Classpath project code.
-Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005,2007 Free Software Foundation, Inc.
+Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
@ifnotplaintext
@dircategory GNU Libraries
% texinfo.tex -- TeX macros to handle Texinfo files.
-%
+%
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2008-11-17.21}
+\def\texinfoversion{2009-08-14.15}
%
-% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008 Free Software Foundation, Inc.
+% 2007, 2008, 2009 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
\let\ptextop=\top
{\catcode`\'=\active
\global\let\ptexquoteright'}% Math-mode def from plain.tex.
+\let\ptexraggedright=\raggedright
% If this character appears in an error message or help string, it
% starts a new line in the output.
% We don't want .vr (or whatever) entries like this:
% \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
- % it needs to be
+ % it needs to be
% {\code {{\tt \backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\def\?{?\spacefactor=\endofsentencespacefactor\space}
% @frenchspacing on|off says whether to put extra space after punctuation.
-%
+%
\def\onword{on}
\def\offword{off}
%
% that's what we do).
% double active backslashes.
-%
+%
{\catcode`\@=0 \catcode`\\=\active
@gdef@activebackslashdouble{%
@catcode`@\=@active
% us) handles it with this amazing macro to replace tokens, with minor
% changes for Texinfo. It is included here under the GPL by permission
% from the author, Heiko Oberdiek.
-%
+%
% #1 is the tokens to replace.
% #2 is the replacement.
% #3 is the control sequence with the string.
-%
+%
\def\HyPsdSubst#1#2#3{%
\def\HyPsdReplace##1#1##2\END{%
##1%
\ifpdf
%
- % Color manipulation macros based on pdfcolor.tex.
- \def\cmykDarkRed{0.28 1 1 0.35}
- \def\cmykBlack{0 0 0 1}
+ % Color manipulation macros based on pdfcolor.tex,
+ % except using rgb instead of cmyk; the latter is said to render as a
+ % very dark gray on-screen and a very dark halftone in print, instead
+ % of actual black.
+ \def\rgbDarkRed{0.50 0.09 0.12}
+ \def\rgbBlack{0 0 0}
+ %
+ % k sets the color for filling (usual text, etc.);
+ % K sets the color for stroking (thin rules, e.g., normal _'s).
+ \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
- \def\pdfsetcolor#1{\pdfliteral{#1 k}}
% Set color, and create a mark which defines \thiscolor accordingly,
% so that \makeheadline knows which color to restore.
\def\setcolor#1{%
\pdfsetcolor{#1}%
}
%
- \def\maincolor{\cmykBlack}
+ \def\maincolor{\rgbBlack}
\pdfsetcolor{\maincolor}
\edef\thiscolor{\maincolor}
\def\lastcolordefs{}
%
% by default, use a color that is dark enough to print on paper as
% nearly black, but still distinguishable for online viewing.
- \def\urlcolor{\cmykDarkRed}
- \def\linkcolor{\cmykDarkRed}
+ \def\urlcolor{\rgbDarkRed}
+ \def\linkcolor{\rgbDarkRed}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
% tried to figure out what each command should do in the context
% of @url. for now, just make @/ a no-op, that's the only one
% people have actually reported a problem with.
- %
+ %
\normalturnoffactive
\def\@{@}%
\let\/=\empty
\makevalueexpandable
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
\leavevmode\setcolor{\urlcolor}%
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
\setcolor{\linkcolor}#1\endlink}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\else
+ % non-pdf mode
\let\pdfmkdest = \gobble
\let\pdfurl = \gobble
\let\endlink = \relax
% Definitions for a main text size of 11pt. This is the default in
% Texinfo.
-%
+%
\def\definetextfontsizexi{%
% Text fonts (11.2pt, magstep1).
\def\textnominalsize{11pt}
% section, chapter, etc., sizes following suit. This is for the GNU
% Press printing of the Emacs 22 manual. Maybe other manuals in the
% future. Used with @smallbook, which sets the leading to 12pt.
-%
+%
\def\definetextfontsizex{%
% Text fonts (10pt).
\def\textnominalsize{10pt}
\setfont\secsf\sfbshape{12}{1000}{OT1}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep1}{OT1}
-\font\seci=cmmi12
+\font\seci=cmmi12
\font\secsy=cmsy10 scaled \magstep1
\def\sececsize{1200}
% We provide the user-level command
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
-%
+%
\def\xword{10}
\def\xiword{11}
%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
- %
+ %
\begingroup \globaldefs=1
\ifx\textsizearg\xword \definetextfontsizex
\else \ifx\textsizearg\xiword \definetextfontsizexi
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{9.5pt}}
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
% Set the fonts to use with the @small... environments.
\let\smallexamplefonts = \smallfonts
%
% By the way, for comparison, here's what fits with @example (10pt):
% 8.5x11=71 smallbook=60 a4=75 a5=58
-%
-% I wish the USA used A4 paper.
% --karl, 24jan03.
-
% Set up the default fonts, so we can use them for creating boxes.
%
\definetextfontsizexi
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+ \csname markup#1true\endcsname
+ \def\currentmarkupstyle{#1}%
+ \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+ \expandafter\def\expandafter\markupstylesetup
+ \expandafter{\markupstylesetup #1}%
+ \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+ \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+ \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+
+\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
+\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
+
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report. xpdf does work with the
+% regular 0x27.
+%
+\def\codequoteright{%
+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+ '%
+ \else \char'15 \fi
+ \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+%
+\def\codequoteleft{%
+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+ % [Knuth] pp. 380,381,391
+ % \relax disables Spanish ligatures ?` and !` of \tt font.
+ \relax`%
+ \else \char'22 \fi
+ \else \char'22 \fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
-
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
%% serif) and @ii for TeX italic
% @var is set to this for defun arguments.
\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
-% like \smartslanted except unconditionally use \sl. We never want
+% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
\let\dfn=\smartslanted
\let\emph=\smartitalic
-% @b, explicit bold.
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}} % roman font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @b, explicit bold. Also @strong.
\def\b#1{{\bf #1}}
\let\strong=\b
\catcode`@=\other
\def\endofsentencespacefactor{3000}% default
+% @t, explicit typewriter.
\def\t#1{%
{\tt \rawbackslash \plainfrenchspacing #1}%
\null
}
+
+% @samp.
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
-\setfont\keyrm\rmshape{8}{1000}{OT1}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
- \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
- \vbox{\hrule\kern-0.4pt
- \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
- \kern-0.4pt\hrule}%
- \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-\def\key #1{{\setupmarkupstyle{key}\nohyphenation \uppercase{#1}}\null}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
+
+% ctrl is no longer a Texinfo command.
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
% @file, @option are the same as @samp.
% each of the four underscores in __typeof__. This is undesirable in
% some manuals, especially if they don't have long identifiers in
% general. @allowcodebreaks provides a way to control this.
-%
+%
\newif\ifallowcodebreaks \allowcodebreakstrue
\def\keywordtrue{true}
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
% `example' (@kbd uses ttsl only inside of @example and friends),
\def\wordexample{example}
\def\wordcode{code}
-% Default is `distinct.'
+% Default is `distinct'.
\kbdinputstyle distinct
\def\xkey{\key}
\let\email=\uref
\fi
-% Check if we are currently using a typewriter font. Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
-
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
%
\def\dmn#1{\thinspace #1}
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
% @l was never documented to mean ``switch to the Lisp font'',
% and it is not used as such in any manual I can find. We need it for
% Polish suppressed-l. --karl, 22sep96.
%\def\l#1{{\li #1}\null}
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}} % roman font
-\def\sc#1{{\smallcaps#1}} % smallcaps font
-\def\ii#1{{\it #1}} % italic font
-
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
-%
+%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
{\selectfonts\lsize #1}%
% @abbr for "Comput. J." and the like.
% No font change, but don't do end-of-sentence spacing.
-%
+%
\def\abbr#1{\doabbr #1,,\finish}
\def\doabbr#1,#2,#3\finish{%
{\plainfrenchspacing #1}%
\fi
}
+
+\message{glyphs,}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{%
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
%
\def\pounds{{\it\$}}
% Theiling, which support regular, slanted, bold and bold slanted (and
% "outlined" (blackboard board, sort of) versions, which we don't need).
% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
-%
+%
% Although only regular is the truly official Euro symbol, we ignore
% that. The Euro is designed to be slightly taller than the regular
% font height.
-%
+%
% feymr - regular
% feymo - slanted
% feybr - bold
% feybo - bold slanted
-%
+%
% There is no good (free) typewriter version, to my knowledge.
% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
% Hmm.
-%
+%
% Also doesn't work in math. Do we need to do math with euro symbols?
% Hope not.
-%
-%
+%
+%
\def\euro{{\eurofont e}}
\def\eurofont{%
% We set the font at each command, rather than predefining it in
% \textfonts and the other font-switching commands, so that
% installations which never need the symbol don't have to have the
% font installed.
- %
+ %
% There is only one designed size (nominal 10pt), so we always scale
% that to the current nominal size.
- %
+ %
% By the way, simply using "at 1em" works for cmr10 and the like, but
% does not work for cmbx10 and other extended/shrunken fonts.
- %
+ %
\def\eurosize{\csname\curfontsize nominalsize\endcsname}%
%
- \ifx\curfontstyle\bfstylename
+ \ifx\curfontstyle\bfstylename
% bold:
\font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
- \else
+ \else
% regular:
\font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
\fi
\thiseurofont
}
-% Hacks for glyphs from the EC fonts similar to \euro. We don't
-% use \let for the aliases, because sometimes we redefine the original
-% macro, and the alias should reflect the redefinition.
+% Glyphs from the EC fonts. We don't use \let for the aliases, because
+% sometimes we redefine the original macro, and the alias should reflect
+% the redefinition.
+%
+% Use LaTeX names for the Icelandic letters.
+\def\DH{{\ecfont \char"D0}} % Eth
+\def\dh{{\ecfont \char"F0}} % eth
+\def\TH{{\ecfont \char"DE}} % Thorn
+\def\th{{\ecfont \char"FE}} % thorn
+%
\def\guillemetleft{{\ecfont \char"13}}
\def\guillemotleft{\guillemetleft}
\def\guillemetright{{\ecfont \char"14}}
% we have the precomposed glyphs for the most common cases. We put the
% tests to use those glyphs in the single \ogonek macro so we have fewer
% dummy definitions to worry about for index entries, etc.
-%
+%
% ogonek is also used with other letters in Lithuanian (IOU), but using
% the precomposed glyphs for those is not so easy since they aren't in
% the same EC font.
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
%
+% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
\def\ecfont{%
% We can't distinguish serif/sans and italic/slanted, but this
% is used for crude hacks anyway (like adding French and German
% Laurent Siebenmann reports \Orb undefined with:
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
% so we'll define it if necessary.
-%
+%
\ifx\Orb\undefined
\def\Orb{\mathhexbox20D}
\fi
% cause the example and the item to crash together. So we use this
% bizarre value of 10001 as a signal to \aboveenvbreak to insert
% \parskip glue after all. Section titles are handled this way also.
- %
+ %
\penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
\parindent=0pt
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
+ %
+ % Try typesetting the item mark that if the document erroneously says
+ % something like @itemize @samp (intending @table), there's an error
+ % right away at the @itemize. It's not the best error message in the
+ % world, but it's better than leaving it to the @item. This means if
+ % the user wants an empty mark, they have to say @w{} not just @w.
\def\itemcontents{#1}%
+ \setbox0 = \hbox{\itemcontents}%
+ %
% @itemize with no arg is equivalent to @itemize @bullet.
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+ %
\let\item=\itemizeitem
}
\ifnum\lastpenalty<10000 \parskip=0in \fi
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+ %
\vadjust{\penalty 1200}}% not good to break after first line of item.
\flushcr
}
%
% @headitem starts a heading row, which we typeset in bold.
% Assignments have to be global since we are inside the implicit group
-% of an alignment entry. Note that \everycr resets \everytab.
-\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+% of an alignment entry. \everycr resets \everytab so we don't have to
+% undo it ourselves.
+\def\headitemfont{\b}% for people to use in the template row; not changeable
+\def\headitem{%
+ \checkenv\multitable
+ \crcr
+ \global\everytab={\bf}% can't use \headitemfont since the parsing differs
+ \the\everytab % for the first item
+}%
%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
-% we encounter the problem it was intended to solve again.
+% we again encounter the problem the 1sp was intended to solve.
% --karl, nathan@acm.org, 20apr99.
\def\tab{\checkenv\multitable &\the\everytab}%
% processing continues to some further point. On the other hand, it
% seems \endinput does not hurt in the printed index arg, since that
% is still getting written without apparent harm.
- %
+ %
% Sample source (mac-idx3.tex, reported by Graham Percival to
% help-texinfo, 22may06):
% @macro funindex {WORD}
% @end macro
% ...
% @funindex commtest
- %
+ %
% The above is not enough to reproduce the bug, but it gives the flavor.
- %
+ %
% Sample whatsit resulting:
% .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
- %
+ %
% So:
\let\endinput = \empty
%
% Non-English letters.
\definedummyword\AA
\definedummyword\AE
+ \definedummyword\DH
\definedummyword\L
- \definedummyword\OE
\definedummyword\O
+ \definedummyword\OE
+ \definedummyword\TH
\definedummyword\aa
\definedummyword\ae
+ \definedummyword\dh
+ \definedummyword\exclamdown
\definedummyword\l
- \definedummyword\oe
\definedummyword\o
- \definedummyword\ss
- \definedummyword\exclamdown
- \definedummyword\questiondown
+ \definedummyword\oe
\definedummyword\ordf
\definedummyword\ordm
+ \definedummyword\questiondown
+ \definedummyword\ss
+ \definedummyword\th
%
% Although these internal commands shouldn't show up, sometimes they do.
\definedummyword\bf
\definedummyword\code
\definedummyword\command
\definedummyword\dfn
+ \definedummyword\email
\definedummyword\emph
\definedummyword\env
\definedummyword\file
% Non-English letters.
\def\AA{AA}%
\def\AE{AE}%
+ \def\DH{DZZ}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
+ \def\TH{ZZZ}%
\def\aa{aa}%
\def\ae{ae}%
+ \def\dh{dzz}%
+ \def\exclamdown{!}%
\def\l{l}%
\def\oe{oe}%
- \def\o{o}%
- \def\ss{ss}%
- \def\exclamdown{!}%
- \def\questiondown{?}%
\def\ordf{a}%
\def\ordm{o}%
+ \def\o{o}%
+ \def\questiondown{?}%
+ \def\ss{ss}%
+ \def\th{zzz}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
\def\bullet{bullet}%
\def\comma{,}%
\def\copyright{copyright}%
- \def\registeredsymbol{R}%
\def\dots{...}%
\def\enddots{...}%
\def\equiv{==}%
\def\error{error}%
\def\euro{euro}%
+ \def\expansion{==>}%
\def\guillemetleft{<<}%
\def\guillemetright{>>}%
\def\guilsinglleft{<}%
\def\guilsinglright{>}%
- \def\expansion{==>}%
\def\minus{-}%
- \def\pounds{pounds}%
\def\point{.}%
+ \def\pounds{pounds}%
\def\print{-|}%
\def\quotedblbase{"}%
\def\quotedblleft{"}%
\def\quoteleft{`}%
\def\quoteright{'}%
\def\quotesinglbase{,}%
+ \def\registeredsymbol{R}%
\def\result{=>}%
- \def\textdegree{degrees}%
+ \def\textdegree{o}%
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
% makeinfo does not expand macros in the argument to @deffn, which ends up
% writing an index entry, and texindex isn't prepared for an index sort entry
% that starts with \.
- %
+ %
% Since macro invocations are followed by braces, we can just redefine them
% to take a single TeX argument. The case of a macro invocation that
% goes to end-of-line is not handled.
- %
+ %
\macrolist
}
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
- %
+ %
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
\gdef\chaplevelprefix{\the\chapno.}%
\resetallfloatnos
%
- \message{\putwordChapter\space \the\chapno}%
+ % \putwordChapter can contain complex things in translations.
+ \toks0=\expandafter{\putwordChapter}%
+ \message{\the\toks0 \space \the\chapno}%
%
% Write the actual heading.
\chapmacro{#1}{Ynumbered}{\the\chapno}%
\global\let\subsubsection = \numberedsubsubsec
}
-\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
+%
\def\appendixzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\appendixno by 1
\gdef\chaplevelprefix{\appendixletter.}%
\resetallfloatnos
%
- \def\appendixnum{\putwordAppendix\space \appendixletter}%
- \message{\appendixnum}%
+ % \putwordAppendix can contain complex things in translations.
+ \toks0=\expandafter{\putwordAppendix}%
+ \message{\the\toks0 \space \appendixletter}%
%
\chapmacro{#1}{Yappendix}{\appendixletter}%
%
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
+ \parindent=0pt\ptexraggedright
\rmisbold #1\hfill}}%
\bigskip \par\penalty 200\relax
\suppressfirstparagraphindent
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\appendixletter}%
- \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum:
+ % \noexpand\putwordAppendix avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
+ \noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\else
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\the\chapno}%
- \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum:
+ % \noexpand\putwordChapter avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
+ \noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\fi\fi\fi
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
%
\def\unnchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
+ \parindent=0pt\ptexraggedright
\rmisbold #1\hfill}}\bigskip \par\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
\fi\fi\fi
%
+ % Go into vertical mode. Usually we'll already be there, but we
+ % don't want the following whatsit to end up in a preceding paragraph
+ % if the document didn't happen to have a blank line.
+ \par
+ %
% Output the mark. Pass it through \safewhatsit, to take care of
% the preceding space.
\safewhatsit\domark
\nobreak
%
% Output the actual section heading.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 % zero if no section number
\unhbox0 #1}%
}%
% glue accumulate. (Not a breakpoint because it's preceded by a
% discardable item.)
\vskip-\parskip
- %
+ %
% This is purely so the last item on the list is a known \penalty >
% 10000. This is so \startdefun can avoid allowing breakpoints after
% section headings. Otherwise, it would insert a valid breakpoint between:
- %
+ %
% @section sec-whatever
% @deffn def-whatever
\penalty 10001
% These characters do not print properly in the Computer Modern roman
% fonts, so we must take special care. This is more or less redundant
% with the Texinfo input format setup at the end of this file.
-%
+%
\def\activecatcodes{%
\catcode`\"=\active
\catcode`\$=\active
% redefined for the two-volume lispref. We always output on
% \jobname.toc even if this is redefined.
-%
+%
\def\tocreadfilename{\jobname.toc}
% Normal (long) toc.
\message{environments,}
% @foo ... @end foo.
-% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
-% define and register \INITMACRO to be called on markup style changes.
-% \INITMACRO can check \currentmarkupstyle for the innermost
-% style and the set of \ifmarkupSTYLE switches for all styles
-% currently in effect.
-\newif\ifmarkupvar
-\newif\ifmarkupsamp
-\newif\ifmarkupkey
-%\newif\ifmarkupfile % @file == @samp.
-%\newif\ifmarkupoption % @option == @samp.
-\newif\ifmarkupcode
-\newif\ifmarkupkbd
-%\newif\ifmarkupenv % @env == @code.
-%\newif\ifmarkupcommand % @command == @code.
-\newif\ifmarkuptex % @tex (and part of @math, for now).
-\newif\ifmarkupexample
-\newif\ifmarkupverb
-\newif\ifmarkupverbatim
-
-\let\currentmarkupstyle\empty
-
-\def\setupmarkupstyle#1{%
- \csname markup#1true\endcsname
- \def\currentmarkupstyle{#1}%
- \markupstylesetup
-}
-
-\let\markupstylesetup\empty
-
-\def\defmarkupstylesetup#1{%
- \expandafter\def\expandafter\markupstylesetup
- \expandafter{\markupstylesetup #1}%
- \def#1%
-}
-
-% Markup style setup for left and right quotes.
-\defmarkupstylesetup\markupsetuplq{%
- \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
- \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
-}
-
-\defmarkupstylesetup\markupsetuprq{%
- \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
- \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
-}
-
-{
-\catcode`\'=\active
-\catcode`\`=\active
-
-\gdef\markupsetuplqdefault{\let`\lq}
-\gdef\markupsetuprqdefault{\let'\rq}
-
-\gdef\markupsetcodequoteleft{\let`\codequoteleft}
-\gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
-}
-
-\let\markupsetuplqcode \markupsetcodequoteleft
-\let\markupsetuprqcode \markupsetcodequoteright
-\let\markupsetuplqexample \markupsetcodequoteleft
-\let\markupsetuprqexample \markupsetcodequoteright
-\let\markupsetuplqverb \markupsetcodequoteleft
-\let\markupsetuprqverb \markupsetcodequoteright
-\let\markupsetuplqverbatim \markupsetcodequoteleft
-\let\markupsetuprqverbatim \markupsetcodequoteright
-
-\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report. xpdf does work with the
-% regular 0x27.
-%
-\def\codequoteright{%
- \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
- \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
- '%
- \else \char'15 \fi
- \else \char'15 \fi
-}
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
-%
-\def\codequoteleft{%
- \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
- \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
- % [Knuth] pp. 380,381,391
- % \relax disables Spanish ligatures ?` and !` of \tt font.
- \relax`%
- \else \char'22 \fi
- \else \char'22 \fi
-}
-
-% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
-\def\noligaturesquoteleft{\relax\lq}
-
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-%
-% Since these characters are used in examples, they should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-%
-\def\point{$\star$}
-\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
-\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% The @error{} command.
-% Adapted from the TeXbook's \boxit.
-%
-\newbox\errorbox
-%
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
-%
-\setbox\errorbox=\hbox to \dimen0{\hfil
- \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
- \advance\hsize by -2\dimen2 % Rules.
- \vbox{%
- \hrule height\dimen2
- \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
- \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
- \kern3pt\vrule width\dimen2}% Space to right.
- \hrule height\dimen2}
- \hfil}
-%
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
-
% @tex ... @end tex escapes into raw Tex temporarily.
% One exception: @ is still an escape character, so that @end tex works.
% But \@ or @@ will get a plain tex @ character.
% This macro is called at the beginning of all the @example variants,
% inside a group.
+\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
\hfuzz = 12pt % Don't be fussy
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
\parskip = 0pt
+ % Turn off paragraph indentation but redefine \indent to emulate
+ % the normal \indent.
+ \nonfillparindent=\parindent
\parindent = 0pt
+ \let\indent\nonfillindent
+ %
\emergencystretch = 0pt % don't try to avoid overfull boxes
\ifx\nonarrowing\relax
\advance \leftskip by \lispnarrowing
\let\exdent=\nofillexdent
}
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
% If you want all examples etc. small: @set dispenvsize small.
% If you want even small examples the full size: @set dispenvsize nosmall.
% This affects the following displayed environments:
\let\Eflushright = \afterenvbreak
+% @raggedright does more-or-less normal line breaking but no right
+% justification. From plain.tex.
+\envdef\raggedright{%
+ \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+}
+\let\Eraggedright\par
+
+\envdef\raggedleft{%
+ \parindent=0pt \leftskip0pt plus2em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedleft\par
+
+\envdef\raggedcenter{%
+ \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedcenter\par
+
+
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins. We keep \parskip nonzero in general, since
% we're doing normal filling. So, when using \aboveenvbreak and
% This does \let #1 = #2, with \csnames; that is,
% \let \csname#1\endcsname = \csname#2\endcsname
% (except of course we have to play expansion games).
-%
+%
\def\cslet#1#2{%
\expandafter\let
\csname#1\expandafter\endcsname
\closein 1
\endgroup % end raw TeX
\endgroup}
-}
%
% If they passed de_DE, and txi-de_DE.tex doesn't exist,
% try txi-de.tex.
-%
-\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+%
+\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
\openin 1 txi-#1.tex
\ifeof 1
\errhelp = \nolanghelp
\errmessage{Cannot read language file txi-#1.tex}%
\else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
}
+}% end of special _ catcode
%
\newhelp\nolanghelp{The given language definition file cannot be found or
is empty. Maybe you need to install it? Putting it in the current
% This macro is called from txi-??.tex files; the first argument is the
% \language name to set (without the "\lang@" prefix), the second and
% third args are \{left,right}hyphenmin.
-%
+%
% The language names to pass are determined when the format is built.
% See the etex.log file created at that time, e.g.,
% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
-%
+%
% With TeX Live 2008, etex now includes hyphenation patterns for all
% available languages. This means we can support hyphenation in
% Texinfo, at least to some extent. (This still doesn't solve the
% accented characters problem.)
-%
+%
\catcode`@=11
\def\txisetlanguage#1#2#3{%
% do not set the language if the name is undefined in the current TeX.
\setnonasciicharscatcode\active
\lattwochardefs
%
- \else \ifx \declaredencoding \latone
+ \else \ifx \declaredencoding \latone
\setnonasciicharscatcode\active
\latonechardefs
%
\setnonasciicharscatcode\active
\utfeightchardefs
%
- \else
+ \else
\message{Unknown document encoding #1, ignoring.}%
%
\fi % utfeight
% A message to be logged when using a character that isn't available
% the default font encoding (OT1).
-%
+%
\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
% Take account of \c (plain) vs. \, (Texinfo) difference.
%
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
- \gdef^^a0{~}
+ \gdef^^a0{~}
\gdef^^a1{\exclamdown}
- \gdef^^a2{\missingcharmsg{CENT SIGN}}
+ \gdef^^a2{\missingcharmsg{CENT SIGN}}
\gdef^^a3{{\pounds}}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
\gdef^^a5{\missingcharmsg{YEN SIGN}}
- \gdef^^a6{\missingcharmsg{BROKEN BAR}}
+ \gdef^^a6{\missingcharmsg{BROKEN BAR}}
\gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\copyright}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\copyright}
\gdef^^aa{\ordf}
\gdef^^ab{\guillemetleft}
\gdef^^ac{$\lnot$}
- \gdef^^ad{\-}
- \gdef^^ae{\registeredsymbol}
+ \gdef^^ad{\-}
+ \gdef^^ae{\registeredsymbol}
\gdef^^af{\={}}
%
\gdef^^b0{\textdegree}
\gdef^^c2{\^A}
\gdef^^c3{\~A}
\gdef^^c4{\"A}
- \gdef^^c5{\ringaccent A}
+ \gdef^^c5{\ringaccent A}
\gdef^^c6{\AE}
\gdef^^c7{\cedilla C}
\gdef^^c8{\`E}
\gdef^^ce{\^I}
\gdef^^cf{\"I}
%
- \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
+ \gdef^^d0{\DH}
\gdef^^d1{\~N}
\gdef^^d2{\`O}
\gdef^^d3{\'O}
\gdef^^db{\^U}
\gdef^^dc{\"U}
\gdef^^dd{\'Y}
- \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
+ \gdef^^de{\TH}
\gdef^^df{\ss}
%
\gdef^^e0{\`a}
\gdef^^ee{\^{\dotless i}}
\gdef^^ef{\"{\dotless i}}
%
- \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
+ \gdef^^f0{\dh}
\gdef^^f1{\~n}
\gdef^^f2{\`o}
\gdef^^f3{\'o}
\gdef^^fb{\^u}
\gdef^^fc{\"u}
\gdef^^fd{\'y}
- \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
+ \gdef^^fe{\th}
\gdef^^ff{\"y}
}
\gdef^^ce{\^I}
\gdef^^cf{\v D}
%
- \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
+ \gdef^^d0{\DH}
\gdef^^d1{\'N}
\gdef^^d2{\v N}
\gdef^^d3{\'O}
\gdef^^d6{\"O}
\gdef^^d7{$\times$}
\gdef^^d8{\v R}
- \gdef^^d9{\ringaccent U}
+ \gdef^^d9{\ringaccent U}
\gdef^^da{\'U}
\gdef^^db{\H U}
\gdef^^dc{\"U}
\gdef^^ee{\^\i}
\gdef^^ef{\v d}
%
- \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
+ \gdef^^f0{\dh}
\gdef^^f1{\'n}
\gdef^^f2{\v n}
\gdef^^f3{\'o}
}
% UTF-8 character definitions.
-%
+%
% This code to support UTF-8 is based on LaTeX's utf8.def, with some
% changes for Texinfo conventions. It is included here under the GPL by
% permission from Frank Mittelbach and the LaTeX team.
-%
+%
\newcount\countUTFx
\newcount\countUTFy
\newcount\countUTFz
\DeclareUnicodeCharacter{00CE}{\^I}
\DeclareUnicodeCharacter{00CF}{\"I}
+ \DeclareUnicodeCharacter{00D0}{\DH}
\DeclareUnicodeCharacter{00D1}{\~N}
\DeclareUnicodeCharacter{00D2}{\`O}
\DeclareUnicodeCharacter{00D3}{\'O}
\DeclareUnicodeCharacter{00DB}{\^U}
\DeclareUnicodeCharacter{00DC}{\"U}
\DeclareUnicodeCharacter{00DD}{\'Y}
+ \DeclareUnicodeCharacter{00DE}{\TH}
\DeclareUnicodeCharacter{00DF}{\ss}
\DeclareUnicodeCharacter{00E0}{\`a}
\DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
\DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
+ \DeclareUnicodeCharacter{00F0}{\dh}
\DeclareUnicodeCharacter{00F1}{\~n}
\DeclareUnicodeCharacter{00F2}{\`o}
\DeclareUnicodeCharacter{00F3}{\'o}
\DeclareUnicodeCharacter{00FB}{\^u}
\DeclareUnicodeCharacter{00FC}{\"u}
\DeclareUnicodeCharacter{00FD}{\'y}
+ \DeclareUnicodeCharacter{00FE}{\th}
\DeclareUnicodeCharacter{00FF}{\"y}
\DeclareUnicodeCharacter{0100}{\=A}
\message{and turning on texinfo input format.}
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
% Define macros to output various characters with catcode for normal text.
\catcode`\"=\other
\catcode`\~=\other
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
% the literal character `\'.
-%
+%
@def@normalturnoffactive{%
@let\=@normalbackslash
@let"=@normaldoublequote
@catcode`@`=@active
@markupsetuplqdefault
@markupsetuprqdefault
-
+
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
@c page-delimiter: "^\\\\message"
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
-/* CupsIppOperation.java --
+/* CupsIppOperation.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* See: CUPS Implementation of IPP, chapter 3.2<br>
* http://www.cups.org/doc-1.1/ipp.html
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class CupsIppOperation
{
/** Get the default destination - since CUPS 1.0 */
- public static final int CUPS_GET_DEFAULT = 0x4001;
-
+ public static final int CUPS_GET_DEFAULT = 0x4001;
+
/** Get all of the available printers - since CUPS 1.0 */
public static final int CUPS_GET_PRINTERS = 0x4002;
-
+
/** Add or modify a printer - since CUPS 1.0 */
public static final int CUPS_ADD_MODIFY_PRINTER = 0x4003;
-
+
/** Delete a printer - since CUPS 1.0 */
public static final int CUPS_DELETE_PRINTER = 0x4004;
-
+
/** Get all of the available printer classes - since CUPS 1.0 */
public static final int CUPS_GET_CLASSES = 0x4005;
-
+
/** Add or modify a printer class - since CUPS 1.0 */
public static final int CUPS_ADD_MODIFY_CLASS = 0x4006;
-
+
/** Delete a printer class - since CUPS 1.0 */
public static final int CUPS_DELETE_CLASS = 0x4007;
-
+
/** Accept jobs on a printer or printer class - since CUPS 1.0 */
public static final int CUPS_ACCEPT_JOBS = 0x4008;
-
+
/** Reject jobs on a printer or printer class - since CUPS 1.0 */
public static final int CUPS_REJECT_JOBS = 0x4009;
-
+
/** Set the default destination - since CUPS 1.0 */
public static final int CUPS_SET_DEFAULT = 0x400A;
-
+
/** Get all of the available PPDs - since CUPS 1.1 */
public static final int CUPS_GET_DEVICES = 0x400B;
-
+
/** Get all of the available PPDs - since CUPS 1.1 */
public static final int CUPS_GET_PPDS = 0x400C;
-
+
/** Move a job to a different printer - since CUPS 1.1 */
public static final int CUPS_MOVE_JOB = 0x400D;
-
-
+
+
private CupsIppOperation()
- {
+ {
// not to be instantiated
}
-
+
}
-/* CupsMediaMapping.java --
+/* CupsMediaMapping.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* for use of media attribute translation between Java JPS API and
* CUPS.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class CupsMediaMapping
{
- // the mapping map
+ // the mapping map
private static final HashMap ippByCups = new HashMap();
/**
{
ippByCups.put("Postcard", MediaSizeName.JAPANESE_POSTCARD);
ippByCups.put("Statement", MediaSizeName.INVOICE);
-
+
ippByCups.put("Letter", MediaSizeName.NA_LETTER);
ippByCups.put("Executive", MediaSizeName.EXECUTIVE);
ippByCups.put("Legal", MediaSizeName.NA_LEGAL);
-
+
ippByCups.put("A0", MediaSizeName.ISO_A0);
ippByCups.put("A1", MediaSizeName.ISO_A1);
ippByCups.put("A2", MediaSizeName.ISO_A2);
ippByCups.put("A8", MediaSizeName.ISO_A8);
ippByCups.put("A9", MediaSizeName.ISO_A9);
ippByCups.put("A10", MediaSizeName.ISO_A10);
-
+
ippByCups.put("B0", MediaSizeName.JIS_B0);
ippByCups.put("B1", MediaSizeName.JIS_B1);
ippByCups.put("B2", MediaSizeName.JIS_B2);
ippByCups.put("B8", MediaSizeName.JIS_B8);
ippByCups.put("B9", MediaSizeName.JIS_B9);
ippByCups.put("B10", MediaSizeName.JIS_B10);
-
+
ippByCups.put("ISOB0", MediaSizeName.ISO_B0);
ippByCups.put("ISOB1", MediaSizeName.ISO_B1);
ippByCups.put("ISOB2", MediaSizeName.ISO_B2);
ippByCups.put("EnvISOB8", MediaSizeName.ISO_B8);
ippByCups.put("EnvISOB9", MediaSizeName.ISO_B9);
ippByCups.put("EnvISOB10", MediaSizeName.ISO_B10);
-
+
ippByCups.put("C0", MediaSizeName.ISO_C0);
ippByCups.put("C1", MediaSizeName.ISO_C1);
ippByCups.put("C2", MediaSizeName.ISO_C2);
ippByCups.put("Env12", MediaSizeName.NA_NUMBER_12_ENVELOPE);
ippByCups.put("Env14", MediaSizeName.NA_NUMBER_14_ENVELOPE);
ippByCups.put("c8x10", MediaSizeName.NA_8X10);
-
+
ippByCups.put("EnvDL", MediaSizeName.ISO_DESIGNATED_LONG);
ippByCups.put("DL", MediaSizeName.ISO_DESIGNATED_LONG);
ippByCups.put("EnvC0", MediaSizeName.ISO_C0);
ippByCups.put("EnvC3", MediaSizeName.ISO_C3);
ippByCups.put("EnvC4", MediaSizeName.ISO_C4);
ippByCups.put("EnvC5", MediaSizeName.ISO_C5);
- ippByCups.put("EnvC6", MediaSizeName.ISO_C6);
+ ippByCups.put("EnvC6", MediaSizeName.ISO_C6);
}
-
+
/**
* Returns the IPP media name of the given cups name.
- *
+ *
* @param cupsName the name in cups
* @return The IPP name if a mapping is known, <code>null</code> otherwise.
*/
{
return (String) ippByCups.get(cupsName);
}
-
+
/**
* Returns the mapping map for iteration.
- *
+ *
* @return The mapping map as unmodifiable map.
*/
public static final Map getMappingMap()
return Collections.unmodifiableMap(ippByCups);
}
- private CupsMediaMapping()
+ private CupsMediaMapping()
{
// not to be instantiated
}
import javax.print.attribute.AttributeSet;
/**
- * Implementation of the PrintService/MultiDocPrintService
+ * Implementation of the PrintService/MultiDocPrintService
* interface for Cups printers (supports Cups 1.1 and up)
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class CupsPrintService extends IppMultiDocPrintService
/**
* Creates a <code>CupsPrintService</code> object.
- *
+ *
* @param uri the URI of the IPP printer.
* @param username the user of this print service.
* @param password the password of the user.
- *
+ *
* @throws IppException if an error during connection occurs.
*/
public CupsPrintService(URI uri, String username, String password)
throws IppException
{
super(uri, username, password);
- }
-
+ }
+
/**
* Overridden for CUPS specific handling of the media attribute.
*/
- protected Object handleSupportedAttributeValuesResponse(IppResponse response,
+ protected Object handleSupportedAttributeValuesResponse(IppResponse response,
Class category)
{
- // TODO Implement different behaviour of cups here - actually the Media
+ // TODO Implement different behaviour of cups here - actually the Media
// printing attribute stuff. For now just use IPP reference implementation.
return super.handleSupportedAttributeValuesResponse(response, category);
}
{
// TODO Implement media attribute behaviour for cups here
//if (category.equals(Media.class)
-
+
return super.getDefaultAttributeValue(category);
}
/**
* The platform default implementation based on CUPS.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class CupsPrintServiceLookup extends PrintServiceLookup
-{
- private CupsServer server;
+{
+ private CupsServer server;
/**
* Default constructor checking security access.
SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPrintJobAccess();
-
+
// use the localhost cups server
server = new CupsServer(null, null);
}
/**
* This is the printer marked as default in CUPS.
- *
+ *
* @return The default lookup service or
* <code>null</code> if there is no default.
*/
try
{
return server.getDefaultPrinter();
- }
+ }
catch (IppException e)
{
// if discovery fails treat as if there is none
return null;
- }
+ }
}
-
+
/**
* All printers and printer classes of the CUPS server are checked.
* If flavors or attributes are null the constraint is not used.
- *
+ *
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
- *
+ *
* @return The multidoc print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
AttributeSet attributes)
{
ArrayList result = new ArrayList();
- PrintService[] services = getPrintServices();
-
+ PrintService[] services = getPrintServices();
+
for (int i=0; i < services.length; i++)
{
if (checkMultiDocPrintService(flavors, attributes, services[i]))
- result.add(services[i]);
+ result.add(services[i]);
}
-
+
return (MultiDocPrintService[]) result.toArray(
new MultiDocPrintService[result.size()]);
}
/**
* These are all printers and printer classes of the CUPS server.
- *
- * @return All known print services regardless of supported features,
+ *
+ * @return All known print services regardless of supported features,
* or an array of length 0 if none is available.
*/
public PrintService[] getPrintServices()
{
ArrayList result = new ArrayList();
-
+
try
{
result.addAll(server.getAllPrinters());
result.addAll(server.getAllClasses());
}
catch (IppException e)
- {
+ {
// ignore as this method cannot throw exceptions
// if print service discovery fails - bad luck
}
return (PrintService[]) result.toArray(new PrintService[result.size()]);
}
-
-
+
+
/**
* All printers and printer classes of the CUPS server are checked.
* If flavor or attributes are null the constraint is not used.
- *
+ *
* @param flavor the document flavor which has to be supported.
* @param attributes the attributes which have to be supported.
- *
+ *
* @return The print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
{
ArrayList result = new ArrayList();
PrintService[] services = getPrintServices();
-
+
for (int i=0; i < services.length; i++)
{
if (checkPrintService(flavor, attributes, services[i]))
result.add(services[i]);
}
-
+
return (PrintService[]) result.toArray(new PrintService[result.size()]);
}
-
+
/**
* Checks the given print service - own method so it can be used also
* to check application registered print services from PrintServiceLookup.
- *
+ *
* @param flavor the document flavor which has to be supported.
* @param attributes the attributes which have to be supported.
* @param service the service to check
- *
- * @return <code>true</code> if all constraints match, <code>false</code>
+ *
+ * @return <code>true</code> if all constraints match, <code>false</code>
* otherwise.
*/
public boolean checkPrintService(DocFlavor flavor, AttributeSet attributes,
{
if (attributes == null || attributes.size() == 0)
return allAttributesSupported;
-
+
Attribute[] atts = attributes.toArray();
for (int i = 0; i < atts.length; i++)
{
}
return allAttributesSupported;
}
-
+
return false;
}
-
+
/**
* Checks the given print service - own method so it can be used also
* to check application registered print services from PrintServiceLookup.
- *
+ *
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
* @param service the service to check
- *
- * @return <code>true</code> if all constraints match, <code>false</code>
+ *
+ * @return <code>true</code> if all constraints match, <code>false</code>
* otherwise.
*/
- public boolean checkMultiDocPrintService(DocFlavor[] flavors,
+ public boolean checkMultiDocPrintService(DocFlavor[] flavors,
AttributeSet attributes, PrintService service)
- {
+ {
if (service instanceof MultiDocPrintService)
- {
+ {
boolean allFlavorsSupported = true;
boolean allAttributesSupported = true;
-
+
if (flavors == null || flavors.length != 0)
allFlavorsSupported = true;
else
}
}
}
-
+
if (attributes == null || attributes.size() == 0)
allAttributesSupported = true;
else
}
}
}
-
+
if (allAttributesSupported && allFlavorsSupported)
return true;
- }
-
+ }
+
return false;
}
-/* CupsServer.java --
+/* CupsServer.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* compatible server. It mainly consists of its URI and optional
* user and password combination if access is restricted.
* <p>
- * It provides methods for retrival of valid CUPS printer uris
+ * It provides methods for retrival of valid CUPS printer uris
* that are used to construct IppPrintService objects.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class CupsServer
{
- /**
+ /**
* The URI of the CUPS server.
* This is something like: http://localhost:631
*/
private transient URI uri;
-
+
/**
* The optional username.
*/
private transient String username;
-
+
/**
* The optional password for the user.
*/
/**
* Creates a <code>CupsServer</code> object which
- * tries to connect to a cups server.
+ * tries to connect to a cups server.
*
* If <code>gnu.javax.print.server</code> is explicitly set, then
* that hostname will be used. Otherwise it will default to localhost.
- *
+ *
* @param username the username
* @param password the password for the username.
*/
this.uri = null;
try
{
- String serv = System.getProperty("gnu.javax.print.server");
- if( serv != null )
- this.uri = new URI("http://"+serv+":631");
+ String serv = System.getProperty("gnu.javax.print.server");
+ if( serv != null )
+ this.uri = new URI("http://"+serv+":631");
}
catch(URISyntaxException use)
{
- throw new RuntimeException("gnu.javax.print.CupsServer value is not a valid hostname.");
+ throw new RuntimeException("gnu.javax.print.CupsServer value is not a valid hostname.");
}
catch(SecurityException se)
{
try
{
- if( this.uri == null )
- this.uri = new URI("http://localhost:631");
+ if( this.uri == null )
+ this.uri = new URI("http://localhost:631");
}
catch (URISyntaxException e)
{
// does not happen
}
}
-
+
/**
* Creates a <code>CupsServer</code> object which
* tries to connect to a running cups server on the
* given URI.
- *
+ *
* @param uri the URI of the server.
* @param username the username
* @param password the password for the username.
this.username = username;
this.password = password;
}
-
+
/**
* Requests the default printer from this CUPS server.
* This is always returned as IppPrintService.
- *
+ *
* @return The default printer.
* @throws IppException if problems during request/response processing occur.
*/
public IppPrintService getDefaultPrinter() throws IppException
- {
+ {
IppResponse response = null;
-
+
try
{
- IppRequest request = new IppRequest(uri, username, password);
- request.setOperationID((short)CupsIppOperation.CUPS_GET_DEFAULT);
- request.setOperationAttributeDefaults();
-
- RequestedAttributes requestedAttrs
+ IppRequest request = new IppRequest(uri, username, password);
+ request.setOperationID((short)CupsIppOperation.CUPS_GET_DEFAULT);
+ request.setOperationAttributeDefaults();
+
+ RequestedAttributes requestedAttrs
= new RequestedAttributes("printer-uri-supported");
request.addOperationAttribute(requestedAttrs);
-
+
response = request.send();
- }
+ }
catch (IOException e)
{
throw new IppException("IOException in IPP request/response.", e);
- }
-
+ }
+
Map printerAttributes = (Map) response.getPrinterAttributes().get(0);
Set uris = (Set) printerAttributes.get(PrinterUriSupported.class);
PrinterUriSupported uri = (PrinterUriSupported) uris.toArray()[0];
-
- IppPrintService service
+
+ IppPrintService service
= new CupsPrintService(uri.getURI(), username, password);
-
+
return service;
}
-
+
/**
* Requests all printers from this CUPS server.
- *
+ *
* @return The list of available printers.
* @throws IppException if problems during request/response processing occur.
*/
public List getAllPrinters() throws IppException
- {
+ {
IppResponse response = null;
-
+
try
{
- IppRequest request = new IppRequest(uri, username, password);
- request.setOperationID((short)CupsIppOperation.CUPS_GET_PRINTERS);
+ IppRequest request = new IppRequest(uri, username, password);
+ request.setOperationID((short)CupsIppOperation.CUPS_GET_PRINTERS);
request.setOperationAttributeDefaults();
-
- RequestedAttributes requestedAttrs
+
+ RequestedAttributes requestedAttrs
= new RequestedAttributes("printer-uri-supported");
request.addOperationAttribute(requestedAttrs);
-
+
response = request.send();
- }
+ }
catch (IOException e)
{
throw new IppException("IOException in IPP request/response.", e);
- }
+ }
List prAttr = response.getPrinterAttributes();
List services = new ArrayList();
-
+
for (int i=0; i < prAttr.size(); i++)
{
Map printerAttributes = (Map) prAttr.get(i);
// do nothing, we only catch the IppException which could be
// thrown during instantiation as single printers may be discovered
// correctly but not usable due to other security restrictions
- }
- }
-
+ }
+ }
+
return services;
}
-
+
/**
* Requests all classes from this CUPS server. Classes in cups are
- * collections of printers. This means jobs directed to a class
+ * collections of printers. This means jobs directed to a class
* are forwarded to the first available printer of the collection.
- *
+ *
* @return The list of available classes.
* @throws IppException if problems during request/response processing occur.
*/
public List getAllClasses() throws IppException
- {
+ {
IppResponse response = null;
-
+
try
{
- IppRequest request = new IppRequest(uri, username, password);
- request.setOperationID((short)CupsIppOperation.CUPS_GET_CLASSES);
+ IppRequest request = new IppRequest(uri, username, password);
+ request.setOperationID((short)CupsIppOperation.CUPS_GET_CLASSES);
request.setOperationAttributeDefaults();
-
- RequestedAttributes requestedAttrs
+
+ RequestedAttributes requestedAttrs
= new RequestedAttributes("printer-uri-supported");
request.addOperationAttribute(requestedAttrs);
-
+
response = request.send();
- }
+ }
catch (IOException e)
{
throw new IppException("IOException in IPP request/response.", e);
- }
-
+ }
+
List prAttr = response.getPrinterAttributes();
- List services = new ArrayList();
-
+ List services = new ArrayList();
+
for (int i=0; i < prAttr.size(); i++)
{
Map printerAttributes = (Map) prAttr.get(i);
Set uris = (Set) printerAttributes.get(PrinterUriSupported.class);
PrinterUriSupported uri = (PrinterUriSupported) uris.toArray()[0];
-
+
try
{
CupsPrintService cups = new CupsPrintService(uri.getURI(),
// do nothing, we only catch the IppException which could be
// thrown during instantiation as single printers may be discovered
// correctly but not usable due to other security restrictions
- }
- }
-
+ }
+ }
+
return services;
}
-/* PrintAttributeException.java --
+/* PrintAttributeException.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* A <code>PrintException</code> further refining the exception
* cause by providing an implementation of the print exception
* interface <code>AttributeException</code>.
- *
+ *
* @see javax.print.PrintException
* @see javax.print.AttributeException
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class PrintAttributeException extends PrintException
+public final class PrintAttributeException extends PrintException
implements AttributeException
{
private Class[] categories;
private Attribute[] values;
-
+
/**
* Constructs a <code>PrintAttributeException</code>
* with the given unsupported attributes and/or values.
- *
- * @param unsupportedAttributes the unsupported categories,
+ *
+ * @param unsupportedAttributes the unsupported categories,
* may be <code>null</code>.
- * @param unsupportedValues the unsupported attribute values,
+ * @param unsupportedValues the unsupported attribute values,
* may be <code>null</code>.
*/
public PrintAttributeException(Class[] unsupportedAttributes,
/**
* Constructs a <code>PrintAttributeException</code>
* with the given unsupported attributes and/or values.
- *
+ *
* @param e chained exception
- * @param unsupportedAttributes the unsupported categories,
+ * @param unsupportedAttributes the unsupported categories,
* may be <code>null</code>.
- * @param unsupportedValues the unsupported attribute values,
+ * @param unsupportedValues the unsupported attribute values,
* may be <code>null</code>.
*/
public PrintAttributeException(Exception e,
/**
* Constructs a <code>PrintAttributeException</code>
* with the given unsupported attributes and/or values.
- *
+ *
* @param s detailed message
- * @param unsupportedAttributes the unsupported categories,
+ * @param unsupportedAttributes the unsupported categories,
* may be <code>null</code>.
- * @param unsupportedValues the unsupported attribute values,
+ * @param unsupportedValues the unsupported attribute values,
* may be <code>null</code>.
*/
public PrintAttributeException(String s,
/**
* Constructs a <code>PrintAttributeException</code>
* with the given unsupported attributes and/or values.
- *
+ *
* @param s detailed message
* @param e chained exception
- * @param unsupportedAttributes the unsupported categories,
+ * @param unsupportedAttributes the unsupported categories,
* may be <code>null</code>.
- * @param unsupportedValues the unsupported attribute values,
+ * @param unsupportedValues the unsupported attribute values,
* may be <code>null</code>.
*/
public PrintAttributeException(String s, Exception e,
-/* PrintFlavorException.java --
+/* PrintFlavorException.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* A <code>PrintException</code> further refining the exception
* cause by providing an implementation of the print exception
* interface <code>FlavorException</code>.
- *
+ *
* @see javax.print.PrintException
* @see javax.print.FlavorException
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public class PrintFlavorException extends PrintException
+public class PrintFlavorException extends PrintException
implements FlavorException
{
private DocFlavor[] flavors;
-
+
/**
* Constructs a <code>PrintFlavorException</code>
* with the given unsupported doc flavor array
- *
+ *
* @param unsupportedFlavors the unsupported document flavors.
*/
public PrintFlavorException(DocFlavor[] unsupportedFlavors)
/**
* Constructs a <code>PrintFlavorException</code>
* with the given unsupported doc flavor array
- *
+ *
* @param e chained exception
* @param unsupportedFlavors the unsupported document flavors.
*/
/**
* Constructs a <code>PrintFlavorException</code>
* with the given unsupported doc flavor array
- *
+ *
* @param s detailed message
* @param unsupportedFlavors the unsupported document flavors.
*/
/**
* Constructs a <code>PrintFlavorException</code>
* with the given unsupported doc flavor array
- *
+ *
* @param s detailed message
* @param e chained exception
* @param unsupportedFlavors the unsupported document flavors.
*/
- public PrintFlavorException(String s, Exception e,
+ public PrintFlavorException(String s, Exception e,
DocFlavor[] unsupportedFlavors)
{
super(s, e);
-/* PrintUriException.java --
+/* PrintUriException.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* A <code>PrintException</code> further refining the exception
* cause by providing an implementation of the print exception
* interface <code>URIException</code>.
- *
+ *
* @see javax.print.PrintException
* @see javax.print.URIException
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class PrintUriException extends PrintException
+public final class PrintUriException extends PrintException
implements URIException
{
private int reason;
*
* @param reason the reason for the exception.
* @param unsupportedUri the URI which is unsupported.
- *
+ *
* @see URIException
*/
public PrintUriException(int reason, URI unsupportedUri)
{
super();
this.reason = reason;
- uri = unsupportedUri;
+ uri = unsupportedUri;
}
/**
* Constructs a <code>PrintUriException</code> with the given reason
* and unsupported URI instance.
- *
+ *
* @param e chained exception
* @param reason the reason for the exception.
* @param unsupportedUri the URI which is unsupported.
{
super(e);
this.reason = reason;
- uri = unsupportedUri;
+ uri = unsupportedUri;
}
/**
* Constructs a <code>PrintUriException</code> with the given reason
* and unsupported URI instance.
- *
+ *
* @param s detailed message
* @param reason the reason for the exception.
* @param unsupportedUri the URI which is unsupported.
{
super(s);
this.reason = reason;
- uri = unsupportedUri;
+ uri = unsupportedUri;
}
/**
* Constructs a <code>PrintUriException</code> with the given reason
* and unsupported URI instance.
- *
+ *
* @param s detailed message
* @param e chained exception
* @param reason the reason for the exception.
* @param unsupportedUri the URI which is unsupported.
*/
- public PrintUriException(String s, Exception e,
+ public PrintUriException(String s, Exception e,
int reason, URI unsupportedUri)
{
super(s, e);
this.reason = reason;
- uri = unsupportedUri;
+ uri = unsupportedUri;
}
/**
* Implementation of the PrinterDialog used by
* {@link javax.print.ServiceUI} for visual selection
* of print services and its attributes.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PrinterDialog extends JDialog implements ActionListener
{
-
+
/**
* The General Panel used in the printing dialog.
* @author Wolfgang Baer (WBaer@gmx.de)
* Handles the copies attribute.
* @author Wolfgang Baer (WBaer@gmx.de)
*/
- final class CopiesAndSorted extends JPanel
+ final class CopiesAndSorted extends JPanel
implements ChangeListener, ActionListener
- {
- private JCheckBox sort;
+ {
+ private JCheckBox sort;
private JSpinner copies;
private JLabel copies_lb;
private SpinnerNumberModel copiesModel;
-
+
CopiesAndSorted()
{
- copies_lb = new JLabel(getLocalizedString("lb.copies"));
+ copies_lb = new JLabel(getLocalizedString("lb.copies"));
sort = new JCheckBox(getLocalizedString("cb.sort"));
sort.addActionListener(this);
-
+
copiesModel = new SpinnerNumberModel(1, 1, 9999, 1);
copies = new JSpinner(copiesModel);
copies.addChangeListener(this);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.insets = new Insets(5, 5, 5, 5);
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.copies")));
-
+
c.anchor = GridBagConstraints.WEST;
-
+
c.gridx = 0;
c.gridy = 0;
add(copies_lb, c);
-
+
c.gridx = 1;
c.gridy = 0;
add(copies, c);
-
+
c.gridx = 0;
c.gridy = 1;
add(sort, c);
}
-
+
// copies jspinner state
public void stateChanged(ChangeEvent event)
{
int value = ((Integer) copies.getValue()).intValue();
atts.add(new Copies(value));
-
+
if (value > 1 && categorySupported(SheetCollate.class))
sort.setEnabled(true);
else
- sort.setEnabled(false);
+ sort.setEnabled(false);
}
// sorted checkbox state
* selected attributes are supported.
*/
void updateForSelectedService()
- {
+ {
if (categorySupported(Copies.class))
{
copies.setEnabled(true);
copies_lb.setEnabled(true);
-
+
Copies copies = (Copies) attribute(Copies.class);
if (copies != null)
copiesModel.setValue(new Integer(copies.getValue()));
-
- if (((Integer)copiesModel.getValue()).intValue() > 1
+
+ if (((Integer)copiesModel.getValue()).intValue() > 1
&& categorySupported(SheetCollate.class))
{
sort.setEnabled(true);
Attribute collate = attribute(SheetCollate.class);
if (collate != null && collate.equals(SheetCollate.COLLATED))
- sort.setSelected(true);
+ sort.setSelected(true);
}
else
sort.setEnabled(false);
}
else
{
- copies.setEnabled(false);
+ copies.setEnabled(false);
copies_lb.setEnabled(false);
}
}
* Handles the print ranges attribute.
* @author Wolfgang Baer (WBaer@gmx.de)
*/
- final class PrintRange extends JPanel
+ final class PrintRange extends JPanel
implements ActionListener, FocusListener
- {
- private JLabel to;
- private JRadioButton all_rb, pages_rb;
+ {
+ private JLabel to;
+ private JRadioButton all_rb, pages_rb;
private JTextField from_tf, to_tf;
-
+
PrintRange()
- {
+ {
to = new JLabel(getLocalizedString("lb.to"));
to.setEnabled(false);
-
+
all_rb = new JRadioButton(getLocalizedString("rbt.all"));
all_rb.setSelected(true);
all_rb.setActionCommand("ALL");
pages_rb.setActionCommand("PAGES");
pages_rb.setEnabled(false);
pages_rb.addActionListener(this);
-
+
ButtonGroup group = new ButtonGroup();
group.add(all_rb);
group.add(pages_rb);
-
+
from_tf = new JTextField("1", 4);
from_tf.setEnabled(false);
from_tf.addFocusListener(this);
to_tf = new JTextField("1", 4);
to_tf.setEnabled(false);
to_tf.addFocusListener(this);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.printrange")));
-
+
c.insets = new Insets(15, 5, 5, 5);
c.gridx = 0;
c.gridy = 0;
add(all_rb, c);
-
+
c.insets = new Insets(5, 5, 15, 5);
c.gridx = 0;
c.gridy = 1;
add(pages_rb, c);
-
+
c.gridx = 1;
c.gridy = 1;
add(from_tf, c);
-
+
c.gridx = 2;
c.gridy = 1;
add(to, c);
-
+
c.insets = new Insets(5, 5, 15, 15);
c.gridx = 3;
c.gridy = 1;
add(to_tf, c);
}
-
+
// focus pagerange
public void focusGained(FocusEvent event)
{
updatePageRanges();
}
-
+
public void focusLost(FocusEvent event)
{
updatePageRanges();
}
-
+
// updates the range after user changed it
private void updatePageRanges()
{
int lower = Integer.parseInt(from_tf.getText());
int upper = Integer.parseInt(to_tf.getText());
-
+
if (lower > upper)
{
upper = lower;
- to_tf.setText("" + lower);
+ to_tf.setText("" + lower);
}
-
+
PageRanges range = new PageRanges(lower, upper);
atts.add(range);
}
// page range change
public void actionPerformed(ActionEvent e)
- {
+ {
// if ALL is selected we must use a full-range object
if (e.getActionCommand().equals("ALL"))
{
from_tf.setEnabled(false);
to.setEnabled(false);
to_tf.setEnabled(false);
-
+
atts.add(new PageRanges(1, Integer.MAX_VALUE));
}
else
to.setEnabled(true);
to_tf.setEnabled(true);
all_rb.setSelected(false);
- }
+ }
}
-
+
/**
* Called to update for new selected
* print service. Tests if currently
{
from_tf.setEnabled(true);
to.setEnabled(true);
- to_tf.setEnabled(true);
+ to_tf.setEnabled(true);
all_rb.setSelected(false);
pages_rb.setSelected(true);
-
+
int[][] members = range.getMembers();
- // Although passed in attributes may contain more than one
+ // Although passed in attributes may contain more than one
// range we only take the first one
from_tf.setText("" + members[0][0]);
to_tf.setText("" + members[0][1]);
* and its location and description attributes.
* @author Wolfgang Baer (WBaer@gmx.de)
*/
- final class PrintServices extends JPanel
+ final class PrintServices extends JPanel
implements ActionListener
- {
+ {
private JLabel name, status, typ, info;
- private JLabel statusValue, typValue, infoValue;
- private JButton attributes;
- private JComboBox services_cob;
+ private JLabel statusValue, typValue, infoValue;
+ private JButton attributes;
+ private JComboBox services_cob;
private JCheckBox fileRedirection_cb;
-
+
PrintServices()
{
name = new JLabel(getLocalizedString("lb.name"));
typValue = new JLabel();
infoValue = new JLabel();
statusValue = new JLabel();
-
+
attributes = new JButton(getLocalizedString("bt.attributes"));
attributes.setEnabled(false);
attributes.setActionCommand("ATTRIBUTES");
attributes.addActionListener(this);
-
+
services_cob = new JComboBox(getPrintServices());
services_cob.setActionCommand("SERVICE");
services_cob.addActionListener(this);
-
+
fileRedirection_cb = new JCheckBox(getLocalizedString("cb.output"));
fileRedirection_cb.setEnabled(false);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.printservice")));
-
+
c.insets = new Insets(5, 5, 5, 5);
c.anchor = GridBagConstraints.LINE_END;
c.gridx = 0;
c.gridy = 0;
add(name, c);
-
+
c.gridx = 0;
c.gridy = 1;
add(status, c);
-
+
c.gridx = 0;
c.gridy = 2;
add(typ, c);
-
+
c.gridx = 0;
c.gridy = 3;
add(info, c);
-
+
c.gridx = 2;
c.gridy = 3;
c.weightx = 1;
add(fileRedirection_cb, c);
-
+
c.anchor = GridBagConstraints.LINE_START;
c.fill = GridBagConstraints.HORIZONTAL;
c.gridx = 1;
c.gridy = 0;
c.weightx = 1.5;
add(services_cob, c);
-
+
c.gridx = 1;
c.gridy = 1;
c.gridwidth = 2;
c.weightx = 1;
add(statusValue, c);
-
+
c.gridx = 1;
c.gridy = 2;
c.gridwidth = 2;
c.weightx = 1;
add(typValue, c);
-
+
c.gridx = 1;
c.gridy = 3;
c.gridwidth = 2;
c.weightx = 1;
add(infoValue, c);
-
+
c.gridx = 2;
c.gridy = 0;
c.weightx = 1.5;
add(attributes, c);
}
-
+
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().equals("SERVICE"))
}
else if (e.getActionCommand().equals("ATTRIBUTES"))
{
- // TODO LowPriority-Enhancement: As tests have shown this button
+ // TODO LowPriority-Enhancement: As tests have shown this button
// is even gray and not enabled under Windows - Its a good place
- // to provide a classpath specific browsing dialog for all
- // attributes not in the default printing dialog.
+ // to provide a classpath specific browsing dialog for all
+ // attributes not in the default printing dialog.
}
- }
-
+ }
+
/**
* Called to update for new selected
* print service. Tests if currently
PrinterMakeAndModel att1 =
getSelectedPrintService().getAttribute(PrinterMakeAndModel.class);
typValue.setText(att1 == null ? "" : att1.getValue());
-
- PrinterInfo att2 =
+
+ PrinterInfo att2 =
getSelectedPrintService().getAttribute(PrinterInfo.class);
infoValue.setText(att2 == null ? "" : att2.getValue());
-
+
PrinterIsAcceptingJobs att3 =
getSelectedPrintService().getAttribute(PrinterIsAcceptingJobs.class);
PrinterState att4 =
getSelectedPrintService().getAttribute(PrinterState.class);
-
- String status = att4.toString();
+
+ String status = att4.toString();
if (att3 == PrinterIsAcceptingJobs.ACCEPTING_JOBS)
status += " - " + getLocalizedString("lb.acceptingjobs");
else if (att3 == PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS)
status += " - " + getLocalizedString("lb.notacceptingjobs");
-
+
statusValue.setText(status);
-
+
if (categorySupported(Destination.class))
{
fileRedirection_cb.setEnabled(false);
}
}
-
+
}
private PrintServices printserv_panel;
* Constructs the General Panel.
*/
public GeneralPanel()
- {
+ {
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
printserv_panel = new PrintServices();
add(Box.createRigidArea(new Dimension(0, 12)));
add(layout_panel);
}
-
+
/**
* Calls update on all internal panels to adjust
* for a new selected print service.
final class Orientation extends JPanel implements ActionListener
{
private JRadioButton portrait, landscape, rev_portrait, rev_landscape;
-
+
Orientation()
{
portrait = new JRadioButton(getLocalizedString("rbt.portrait"));
rev_portrait.addActionListener(this);
rev_landscape = new JRadioButton(getLocalizedString("rbt.revlandscape"));
rev_landscape.addActionListener(this);
-
+
ButtonGroup group = new ButtonGroup();
group.add(portrait);
group.add(landscape);
group.add(rev_portrait);
group.add(rev_landscape);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.orientation")));
-
+
c.insets = new Insets(5, 5, 5, 5);
c.gridx = 0;
c.gridy = 0;
add(portrait, c);
-
+
c.gridx = 0;
c.gridy = 1;
add(landscape, c);
-
+
c.gridx = 0;
c.gridy = 2;
add(rev_portrait, c);
-
+
c.gridx = 0;
c.gridy = 3;
add(rev_landscape, c);
}
-
+
// event handling orientation
public void actionPerformed(ActionEvent e)
{
else if (e.getSource() == rev_portrait)
atts.add(OrientationRequested.REVERSE_PORTRAIT);
else
- atts.add(OrientationRequested.REVERSE_LANDSCAPE);
+ atts.add(OrientationRequested.REVERSE_LANDSCAPE);
}
-
+
/**
* Called to update for new selected
* print service. Tests if currently
landscape.setEnabled(true);
rev_landscape.setEnabled(true);
rev_portrait.setEnabled(true);
-
+
Attribute orientation = attribute(OrientationRequested.class);
if (orientation != null)
{
portrait.setSelected(true);
else if (orientation.equals(OrientationRequested.REVERSE_PORTRAIT))
rev_portrait.setSelected(true);
- else
+ else
rev_landscape.setSelected(true);
}
else
portrait.setSelected(true);
else if (defaultValue.equals(OrientationRequested.REVERSE_PORTRAIT))
rev_portrait.setSelected(true);
- else
+ else
rev_landscape.setSelected(true);
}
}
landscape.setEnabled(false);
rev_landscape.setEnabled(false);
rev_portrait.setEnabled(false);
- }
+ }
}
}
{
private JLabel size_lb, source_lb;
private JComboBox size, source;
-
+
MediaTypes()
{
size_lb = new JLabel(getLocalizedString("lb.size"));
source_lb = new JLabel(getLocalizedString("lb.source"));
-
+
size = new JComboBox();
size.setEditable(false);
size.addActionListener(this);
source = new JComboBox();
source.setEditable(false);
size.addActionListener(this);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.medias")));
-
+
c.insets = new Insets(5, 5, 5, 5);
c.anchor = GridBagConstraints.LINE_END;
c.gridx = 0;
c.gridy = 0;
add(size_lb, c);
-
+
c.gridx = 0;
c.gridy = 1;
add(source_lb, c);
-
+
c.anchor = GridBagConstraints.LINE_START;
c.fill = GridBagConstraints.HORIZONTAL;
c.gridx = 1;
c.gridy = 0;
c.weightx = 1.5;
add(size, c);
-
+
c.gridx = 1;
c.gridy = 1;
c.weightx = 1.5;
add(source, c);
}
-
+
public void actionPerformed(ActionEvent event)
- {
+ {
if (event.getSource() == size)
{
Object obj = size.getSelectedItem();
if (obj instanceof Media)
- atts.add((Media) obj);
+ atts.add((Media) obj);
}
-
+
// we ignore source events currently
- // as only the automatic selection is used.
+ // as only the automatic selection is used.
}
-
+
/**
* Called to update for new selected
* print service. Tests if currently
* selected attributes are supported.
*/
void updateForSelectedService()
- {
+ {
if (categorySupported(Media.class))
{
Media[] medias = (Media[]) getSelectedPrintService()
.getSupportedAttributeValues(Media.class, flavor, null);
-
+
size.removeAllItems();
if (medias.length == 0)
- size.addItem(getLocalizedString("lb.automatically"));
+ size.addItem(getLocalizedString("lb.automatically"));
else
for (int i=0; i < medias.length; i++)
size.addItem(medias[i]);
-
+
Media media = (Media) attribute(Media.class);
if (media != null)
size.setSelectedItem(media);
-
+
// this is currently ignored
source.removeAllItems();
source.addItem(getLocalizedString("lb.automatically"));
{
size.removeAllItems();
source.removeAllItems();
-
+
size.addItem(getLocalizedString("lb.automatically"));
source.addItem(getLocalizedString("lb.automatically"));
}
{
private JLabel left, right, top, bottom;
private JTextField left_tf, right_tf, top_tf, bottom_tf;
-
+
Margins()
{
left = new JLabel(getLocalizedString("lb.left"));
right = new JLabel(getLocalizedString("lb.right"));
top = new JLabel(getLocalizedString("lb.top"));
bottom = new JLabel(getLocalizedString("lb.bottom"));
-
+
left_tf = new JTextField(7);
left_tf.addFocusListener(this);
right_tf = new JTextField(7);
top_tf.addFocusListener(this);
bottom_tf = new JTextField(7);
bottom_tf.addFocusListener(this);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.margins")));
-
+
c.insets = new Insets(5, 5, 5, 5);
c.gridx = 0;
c.gridy = 0;
add(left, c);
-
+
c.gridx = 1;
c.gridy = 0;
add(right, c);
-
+
c.insets = new Insets(5, 5, 5, 5);
c.gridx = 0;
c.gridy = 1;
add(left_tf, c);
-
+
c.gridx = 1;
c.gridy = 1;
add(right_tf, c);
-
+
c.insets = new Insets(10, 5, 5, 5);
c.gridx = 0;
c.gridy = 2;
add(top, c);
-
+
c.gridx = 1;
c.gridy = 2;
add(bottom, c);
-
+
c.insets = new Insets(0, 5, 5, 5);
c.gridx = 0;
c.gridy = 3;
add(top_tf, c);
-
+
c.gridx = 1;
c.gridy = 3;
add(bottom_tf, c);
}
-
+
public void focusGained(FocusEvent event)
{
updateMargins();
}
-
+
public void focusLost(FocusEvent event)
{
updateMargins();
}
-
+
// updates the margins after user changed it
private void updateMargins()
{
// We currently do not support this attribute
// as it is not in the IPP spec and therefore not in CUPS
}
-
+
/**
* Called to update for new selected
* print service. Tests if currently
left_tf.setEnabled(true);
right_tf.setEnabled(true);
top_tf.setEnabled(true);
- bottom_tf.setEnabled(true);
+ bottom_tf.setEnabled(true);
}
else
{
left_tf.setEnabled(false);
right_tf.setEnabled(false);
top_tf.setEnabled(false);
- bottom_tf.setEnabled(false);
- }
+ bottom_tf.setEnabled(false);
+ }
}
}
private Orientation orientation_panel;
private Margins margins_panel;
- /**
- * Constructs the page setup user interface.
+ /**
+ * Constructs the page setup user interface.
*/
public PageSetupPanel()
{
add(Box.createRigidArea(new Dimension(0, 12)));
add(layout_panel);
}
-
+
/**
* Calls update on all internal panels to adjust
* for a new selected print service.
{
private JRadioButton low, normal, high;
private ButtonGroup group;
-
+
Quality()
{
low = new JRadioButton(getLocalizedString("rbt.low"));
normal.addActionListener(this);
high = new JRadioButton(getLocalizedString("rbt.high"));
high.addActionListener(this);
-
+
group = new ButtonGroup();
group.add(low);
group.add(normal);
group.add(high);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.quality")));
-
+
c.fill = GridBagConstraints.HORIZONTAL;
c.insets = new Insets(5, 5, 5, 5);
c.gridx = 0;
c.gridy = 0;
add(low, c);
-
+
c.gridx = 0;
c.gridy = 1;
add(normal, c);
-
+
c.gridx = 0;
c.gridy = 2;
add(high, c);
}
-
+
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == low)
else if (e.getSource() == normal)
atts.add(PrintQuality.NORMAL);
else
- atts.add(PrintQuality.HIGH);
+ atts.add(PrintQuality.HIGH);
}
-
+
/**
* Called to update for new selected
* print service. Tests if currently
low.setEnabled(true);
normal.setEnabled(true);
high.setEnabled(true);
-
- Object defaultValue = defaultValue(PrintQuality.class);
+
+ Object defaultValue = defaultValue(PrintQuality.class);
Attribute quality = attribute(PrintQuality.class);
-
+
if (quality != null)
{
if (quality.equals(PrintQuality.DRAFT))
low.setSelected(true);
else if (quality.equals(PrintQuality.NORMAL))
normal.setSelected(true);
- else
+ else
high.setSelected(true);
}
else
low.setSelected(true);
else if (defaultValue.equals(PrintQuality.NORMAL))
normal.setSelected(true);
- else
+ else
high.setSelected(true);
- }
+ }
}
else
{
low.setEnabled(false);
normal.setEnabled(false);
high.setEnabled(false);
- }
+ }
}
}
-
+
/**
* Handles the job attributes as requesting username, jobname etc.
* @author Wolfgang Baer (WBaer@gmx.de)
*/
final class JobAttributes extends JPanel
implements ActionListener, ChangeListener, FocusListener
- {
- private JLabel jobname, username, priority_lb;
- private JTextField jobname_tf, username_tf;
- private JCheckBox cover;
+ {
+ private JLabel jobname, username, priority_lb;
+ private JTextField jobname_tf, username_tf;
+ private JCheckBox cover;
private JSpinner priority;
private SpinnerNumberModel model;
-
+
JobAttributes()
{
jobname = new JLabel(getLocalizedString("lb.jobname"));
username = new JLabel(getLocalizedString("lb.username"));
priority_lb = new JLabel(getLocalizedString("lb.priority"));
-
+
cover = new JCheckBox(getLocalizedString("cb.cover"));
cover.addActionListener(this);
-
+
model = new SpinnerNumberModel(1, 1, 100, 1);
priority = new JSpinner(model);
priority.addChangeListener(this);
-
+
jobname_tf = new JTextField();
jobname_tf.addFocusListener(this);
username_tf = new JTextField();
username_tf.addFocusListener(this);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.jobattributes")));
-
+
c.insets = new Insets(10, 5, 10, 5);
c.gridx = 0;
c.gridy = 0;
add(cover, c);
-
+
c.anchor = GridBagConstraints.LINE_END;
c.gridx = 1;
c.gridy = 0;
c.weightx = 2;
add(priority_lb, c);
-
+
c.gridx = 2;
c.gridy = 0;
c.weightx = 0.5;
add(priority, c);
-
+
c.anchor = GridBagConstraints.LINE_END;
c.gridx = 0;
c.gridy = 1;
add(jobname, c);
-
+
c.gridx = 0;
c.gridy = 2;
add(username, c);
-
+
c.anchor = GridBagConstraints.CENTER;
c.fill = GridBagConstraints.HORIZONTAL;
c.gridx = 1;
c.gridwidth = 2;
c.weightx = 1.5;
add(jobname_tf, c);
-
+
c.insets = new Insets(10, 5, 15, 5);
c.gridx = 1;
c.gridy = 2;
add(username_tf, c);
}
-
+
public void actionPerformed(ActionEvent event)
{
if (cover.isSelected())
else
atts.add(JobSheets.NONE);
}
-
+
public void stateChanged(ChangeEvent event)
{
int value = ((Integer) priority.getValue()).intValue();
- atts.add(new JobPriority(value));
+ atts.add(new JobPriority(value));
}
-
+
public void focusGained(FocusEvent event)
- {
+ {
updateTextfields(event);
}
-
+
public void focusLost(FocusEvent event)
{
updateTextfields(event);
}
-
+
private void updateTextfields(FocusEvent event)
{
if (event.getSource() == jobname_tf)
*/
void updateForSelectedService()
{
- // JobPriority
+ // JobPriority
if (categorySupported(JobPriority.class))
{
JobPriority prio = (JobPriority) attribute(JobPriority.class);
- JobPriority value = (JobPriority) defaultValue(JobPriority.class);
+ JobPriority value = (JobPriority) defaultValue(JobPriority.class);
priority.setEnabled(true);
if (prio != null)
model.setValue(new Integer(prio.getValue()));
else
model.setValue(new Integer(value.getValue()));
- }
+ }
else
- priority.setEnabled(false);
-
+ priority.setEnabled(false);
+
// Requesting username
if (categorySupported(RequestingUserName.class))
{
Attribute user = attribute(RequestingUserName.class);
Object value = defaultValue(RequestingUserName.class);
- username.setEnabled(true);
+ username.setEnabled(true);
if (user != null)
username_tf.setText(user.toString());
else
username_tf.setText(value.toString());
}
else
- username.setEnabled(false);
-
+ username.setEnabled(false);
+
// Job Name
if (categorySupported(JobName.class))
{
Attribute job = attribute(JobName.class);
Object value = defaultValue(JobName.class);
- jobname.setEnabled(true);
+ jobname.setEnabled(true);
if (job != null)
jobname_tf.setText(job.toString());
else
jobname_tf.setText(value.toString());
}
else
- jobname.setEnabled(false);
-
+ jobname.setEnabled(false);
+
// Job sheets
if (categorySupported(JobSheets.class))
{
Attribute sheet = attribute(JobSheets.class);
Object value = defaultValue(JobSheets.class);
- cover.setEnabled(true);
+ cover.setEnabled(true);
if (sheet != null)
{
if (sheet.equals(JobSheets.NONE))
cover.setSelected(false);
- else
+ else
cover.setSelected(true);
}
else
}
}
else
- cover.setEnabled(false);
+ cover.setEnabled(false);
}
}
-
+
/**
* Handles the sides attributes.
* @author Wolfgang Baer (WBaer@gmx.de)
*/
final class SidesPanel extends JPanel implements ActionListener
- {
+ {
private JRadioButton oneside, calendar, duplex;
-
+
SidesPanel()
- {
+ {
oneside = new JRadioButton(getLocalizedString("rbt.onesided"));
oneside.addActionListener(this);
calendar = new JRadioButton(getLocalizedString("rbt.calendar"));
calendar.addActionListener(this);
duplex = new JRadioButton(getLocalizedString("rbt.duplex"));
duplex.addActionListener(this);
-
+
ButtonGroup group = new ButtonGroup();
group.add(oneside);
group.add(calendar);
group.add(duplex);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.sides")));
-
+
c.insets = new Insets(5, 5, 5, 5);
c.gridx = 0;
c.gridy = 0;
add(oneside, c);
-
+
c.gridx = 0;
c.gridy = 1;
add(calendar, c);
-
+
c.gridx = 0;
c.gridy = 2;
add(duplex, c);
}
-
+
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == calendar)
else
atts.add(Sides.TWO_SIDED_LONG_EDGE);
}
-
+
/**
* Called to update for new selected
* print service. Tests if currently
oneside.setEnabled(true);
calendar.setEnabled(true);
duplex.setEnabled(true);
-
- Object defaultValue = defaultValue(Sides.class);
+
+ Object defaultValue = defaultValue(Sides.class);
Attribute sides = attribute(Sides.class);
if (sides != null)
{
}
}
else
- {
+ {
oneside.setEnabled(false);
calendar.setEnabled(false);
duplex.setEnabled(false);
- }
+ }
}
}
-
+
/**
* Handles the chromaticity attributes.
* @author Wolfgang Baer (WBaer@gmx.de)
final class Color extends JPanel implements ActionListener
{
private JRadioButton bw, color;
-
+
Color()
{
bw = new JRadioButton(getLocalizedString("rbt.blackwhite"));
bw.addActionListener(this);
color = new JRadioButton(getLocalizedString("rbt.color"));
color.addActionListener(this);
-
+
ButtonGroup group = new ButtonGroup();
group.add(bw);
group.add(color);
-
+
GridBagLayout layout = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
-
+
setLayout(layout);
setBorder(new TitledBorder(getLocalizedString("title.color")));
-
+
c.fill = GridBagConstraints.HORIZONTAL;
c.insets = new Insets(5, 5, 5, 5);
c.gridx = 0;
c.gridy = 0;
add(bw, c);
-
+
c.gridx = 0;
c.gridy = 1;
add(color, c);
}
-
+
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == bw)
- atts.add(Chromaticity.MONOCHROME);
+ atts.add(Chromaticity.MONOCHROME);
else
atts.add(Chromaticity.COLOR);
}
-
+
/**
* Called to update for new selected
* print service. Tests if currently
if (categorySupported(Chromaticity.class))
{
bw.setEnabled(true);
- color.setEnabled(true);
-
- Object defaultValue = defaultValue(Chromaticity.class);
+ color.setEnabled(true);
+
+ Object defaultValue = defaultValue(Chromaticity.class);
Attribute chromaticity = attribute(Chromaticity.class);
if (chromaticity != null)
{
if (chromaticity.equals(Chromaticity.MONOCHROME))
bw.setSelected(true);
- else
+ else
color.setSelected(true);
}
else
{
if (defaultValue.equals(Chromaticity.MONOCHROME))
bw.setSelected(true);
- else
+ else
color.setSelected(true);
}
}
else
- {
+ {
bw.setEnabled(false);
color.setEnabled(false);
}
}
}
-
+
private Quality quality_panel;
private JobAttributes jobAttr_panel;
private SidesPanel sides_panel;
private Color chromaticy_panel;
-
+
/**
* Creates the panel for appearance attributes.
*/
public AppearancePanel()
{
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-
+
quality_panel = new Quality();
jobAttr_panel = new JobAttributes();
sides_panel = new SidesPanel();
chromaticy_panel = new Color();
-
+
JPanel layout_panel = new JPanel();
layout_panel.setLayout(new BoxLayout(layout_panel, BoxLayout.LINE_AXIS));
layout_panel.add(chromaticy_panel);
layout_panel.add(Box.createRigidArea(new Dimension(10, 0)));
layout_panel.add(quality_panel);
-
+
JPanel layout2_panel = new JPanel();
layout2_panel.setLayout(new BoxLayout(layout2_panel, BoxLayout.LINE_AXIS));
layout2_panel.add(sides_panel);
layout2_panel.add(Box.createRigidArea(new Dimension(10, 0)));
layout2_panel.add(jobAttr_panel);
-
+
setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
add(layout_panel);
add(Box.createRigidArea(new Dimension(0, 12)));
add(layout2_panel);
}
-
+
/**
* Calls update on all internal panels to adjust
* for a new selected print service.
private GeneralPanel general_panel;
private PageSetupPanel pagesetup_panel;
private AppearancePanel appearance_panel;
-
+
private PrintService[] services;
private PrintService defaultService;
private PrintService selectedService;
private DocFlavor flavor;
private PrintRequestAttributeSet attributes;
-
- private boolean onlyPageDialog;
- private PrintRequestAttributeSet atts;
-
+
+ private boolean onlyPageDialog;
+ private PrintRequestAttributeSet atts;
+
private final static ResourceBundle messages;
static
- {
+ {
messages = ResourceBundle.getBundle("gnu/javax/print/PrinterDialog");
}
-
+
// TODO LowPriority: Include checks so that if a specific value formerly
// selected is no more supported by the new service changes to the default.
-
+
/**
* Class private constructs a printer dialog.
- *
+ *
* @param gc the screen to use. <code>null</code> is default screen.
* @param services the print services to browse (not null).
* @param defaultService the default service. If <code>null</code>
* the first of the print services in the services array will be used.
* @param flavor the flavours to be printed.
- * @param attributes the attributes requested. Will be updated
+ * @param attributes the attributes requested. Will be updated
* by selections done by the user in the dialog.
* @param onlyPageDialog if true a page settings only dialog is constructed.
- *
+ *
* @throws HeadlessException if GraphicsEnvironment is headless
*/
- private PrinterDialog(GraphicsConfiguration gc, PrintService[] services,
- PrintService defaultService, DocFlavor flavor,
+ private PrinterDialog(GraphicsConfiguration gc, PrintService[] services,
+ PrintService defaultService, DocFlavor flavor,
PrintRequestAttributeSet attributes, boolean onlyPageDialog, String title)
throws HeadlessException
{
super((Frame)null, title, true, gc);
-
+
setResizable(false);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
for(int i=0; i < services.length; i++)
if (services[i].isDocFlavorSupported(flavor))
list.add(services[i]);
-
+
if (defaultService != null
&& (! list.contains(defaultService)))
defaultService = (PrintService) list.get(0);
-
+
PrintService[] newServices = new PrintService[list.size()];
this.services = (PrintService[]) list.toArray(newServices);
}
else
this.services = services;
-
+
if (defaultService == null)
this.defaultService = services[0];
else
this.defaultService = defaultService;
-
+
this.selectedService = this.defaultService;
this.flavor = flavor;
-
+
// the attributes given by the user
this.attributes = attributes;
// the one to work with during browsing
this.atts = new HashPrintRequestAttributeSet(attributes);
-
+
this.onlyPageDialog = onlyPageDialog;
-
- initUI(onlyPageDialog);
+
+ initUI(onlyPageDialog);
pack();
updateAll();
}
-
+
/**
* Constructs a page settings only dialog.
- *
+ *
* @param gc the screen to use. <code>null</code> is default screen.
* @param service the print service for the page dialog.
* the first of the print services in the services array will be used.
* @param flavor the flavours to be printed.
- * @param attributes the attributes requested. Will be updated
- * by selections done by the user in the dialog.
- *
+ * @param attributes the attributes requested. Will be updated
+ * by selections done by the user in the dialog.
+ *
* @throws HeadlessException if GraphicsEnvironment is headless
*/
- public PrinterDialog(GraphicsConfiguration gc, PrintService service,
+ public PrinterDialog(GraphicsConfiguration gc, PrintService service,
DocFlavor flavor, PrintRequestAttributeSet attributes)
throws HeadlessException
{
- this(gc, new PrintService[] {service}, service, flavor, attributes,
- true, getLocalizedString("title.pagedialog"));
+ this(gc, new PrintService[] {service}, service, flavor, attributes,
+ true, getLocalizedString("title.pagedialog"));
}
-
+
/**
* Constructs a printer dialog.
- *
+ *
* @param gc the screen to use. <code>null</code> is default screen.
* @param services the print services to browse (not null).
* @param defaultService the default service. If <code>null</code>
* the first of the print services in the services array will be used.
* @param flavor the flavours to be printed.
- * @param attributes the attributes requested. Will be updated
- * by selections done by the user in the dialog.
- *
+ * @param attributes the attributes requested. Will be updated
+ * by selections done by the user in the dialog.
+ *
* @throws HeadlessException if GraphicsEnvironment is headless
*/
- public PrinterDialog(GraphicsConfiguration gc, PrintService[] services,
- PrintService defaultService, DocFlavor flavor,
+ public PrinterDialog(GraphicsConfiguration gc, PrintService[] services,
+ PrintService defaultService, DocFlavor flavor,
PrintRequestAttributeSet attributes)
throws HeadlessException
{
- this(gc, services, defaultService, flavor, attributes,
+ this(gc, services, defaultService, flavor, attributes,
false, getLocalizedString("title.printdialog"));
}
// initializes the gui parts
private void initUI(boolean onlyPageDialog)
- {
+ {
JPanel buttonPane = new JPanel();
-
+
if (onlyPageDialog)
{
JPanel pane = new JPanel();
pane.setLayout(new BorderLayout());
pagesetup_panel = new PageSetupPanel();
pane.add(pagesetup_panel, BorderLayout.CENTER);
-
+
ok_bt = new JButton(getLocalizedString("bt.OK"));
ok_bt.addActionListener(this);
cancel_bt = new JButton(getLocalizedString("bt.cancel"));
- cancel_bt.addActionListener(this);
-
- getContentPane().add(pane, BorderLayout.CENTER);
+ cancel_bt.addActionListener(this);
+
+ getContentPane().add(pane, BorderLayout.CENTER);
}
else
{
// Put everything together
getContentPane().add(pane, BorderLayout.CENTER);
}
-
+
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
buttonPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
buttonPane.add(Box.createHorizontalGlue());
buttonPane.add(ok_bt);
buttonPane.add(Box.createRigidArea(new Dimension(5, 0)));
buttonPane.add(cancel_bt);
-
+
getContentPane().add(buttonPane, BorderLayout.PAGE_END);
}
{
return selectedService;
}
-
+
/**
* Sets the currently selected print service.
- *
+ *
* @param service the service selected.
*/
protected void setSelectedPrintService(PrintService service)
{
selectedService = service;
}
-
+
/**
* Returns the print service array.
* @return The print services.
{
return services;
}
-
+
/**
* Calls update on all panels to adjust
* for a new selected print service.
void updateAll()
{
pagesetup_panel.update();
-
+
if (! onlyPageDialog)
{
general_panel.update();
appearance_panel.update();
- }
+ }
}
-
+
boolean categorySupported(Class category)
{
return getSelectedPrintService().
isAttributeCategorySupported(category);
}
-
+
Object defaultValue(Class category)
{
return getSelectedPrintService().
getDefaultAttributeValue(category);
}
-
+
Attribute attribute(Class category)
{
return atts.get(category);
}
-
- /**
+
+ /**
* Action handler for Print/Cancel buttons.
* If cancel is pressed we reset the attributes
* and the selected service.
- *
+ *
* @param e the ActionEvent
*/
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == ok_bt)
{
- setVisible(false);
+ setVisible(false);
attributes.addAll(atts);
dispose();
}
else
{
- setVisible(false);
+ setVisible(false);
selectedService = null;
dispose();
}
}
-
+
/**
* Retrieves localized messages from the resource bundle.
- *
+ *
* @param key the key
* @return The localized value for the key.
*/
import javax.print.event.PrintJobListener;
/**
- * Implementation of the DocPrintJob interface. Implementation is
+ * Implementation of the DocPrintJob interface. Implementation is
* specific to the <code>IppPrintService</code> implementation.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class DocPrintJobImpl implements CancelablePrintJob
{
/** The print service this job is bound to. */
private IppPrintService service;
-
+
/** The set of print job listeners. */
private HashSet printJobListener = new HashSet();
-
+
/** The print job attributes listeners. */
private ArrayList attributesListener = new ArrayList();
/** The print job attributes listeners associated attribute set. */
private ArrayList attributesListenerAttributes = new ArrayList();
-
+
/** The username. */
private String username;
/** The password of the user. */
private String password;
-
+
/** Returned job uri. */
private JobUri jobUri = null;
/** Returned job id. */
private JobId jobId = null;
-
+
/** The requesting-username for later canceling */
private RequestingUserName requestingUser;
-
+
/** The print job sets. */
private PrintJobAttributeSet oldSet = new HashPrintJobAttributeSet();
private PrintJobAttributeSet currentSet = new HashPrintJobAttributeSet();
-
- /**
+
+ /**
* State variable if we already started printing.
*/
private boolean printing = false;
-
+
// TODO Implement complete PrintJobListener notification
// TODO Implement PrintJobAttributeListener notification
/**
* Constructs a DocPrintJobImpl instance bound to the given print service.
- *
+ *
* @param service the print service instance.
* @param user the user of this print service.
* @param passwd the password of the user.
{
if (listener == null)
return;
-
+
attributesListener.add(listener);
attributesListenerAttributes.add(attributes);
}
{
if (listener == null)
return;
-
+
printJobListener.add(listener);
}
{
if (printing)
throw new PrintException("already printing");
-
+
printing = true;
-
+
DocAttributeSet docAtts = doc.getAttributes();
DocFlavor flavor = doc.getDocFlavor();
-
+
if (flavor == null || (!service.isDocFlavorSupported(flavor)))
{
notifyPrintJobListeners(new PrintJobEvent(this, PrintJobEvent.JOB_FAILED));
throw new PrintFlavorException("Invalid flavor", new DocFlavor[] {flavor});
}
-
- // merge attributes as doc attributes take precendence
+
+ // merge attributes as doc attributes take precendence
// over the print request attributes
HashAttributeSet mergedAtts = new HashAttributeSet();
-
+
if (attributes != null)
mergedAtts.addAll(attributes);
if (docAtts != null)
mergedAtts.addAll(docAtts);
-
+
// check for requesting-user-name -add the
// executing username if no other is specified
- // save user name so we can make a cancel operation under same user
+ // save user name so we can make a cancel operation under same user
if (! mergedAtts.containsKey(RequestingUserName.class))
{
mergedAtts.add(IppPrintService.REQUESTING_USER_NAME);
}
else
{
- requestingUser = (RequestingUserName)
+ requestingUser = (RequestingUserName)
mergedAtts.get(RequestingUserName.class);
}
-
+
// same for job-name
if (! mergedAtts.containsKey(JobName.class))
mergedAtts.add(IppPrintService.JOB_NAME);
-
+
IppResponse response = null;
-
+
try
{
PrinterURI printerUri = service.getPrinterURI();
String printerUriStr = "http" + printerUri.toString().substring(3);
-
+
URI uri = null;
try
{
uri = new URI(printerUriStr);
}
- catch (URISyntaxException e)
+ catch (URISyntaxException e)
{
- // does not happen
+ // does not happen
}
-
- IppRequest request =
- new IppRequest(uri, username, password);
-
+
+ IppRequest request =
+ new IppRequest(uri, username, password);
+
request.setOperationID( (short) OperationsSupported.PRINT_JOB.getValue());
request.setOperationAttributeDefaults();
request.addOperationAttribute(printerUri);
-
+
if (mergedAtts != null)
{
request.addAndFilterJobOperationAttributes(mergedAtts);
request.addAndFilterJobTemplateAttributes(mergedAtts);
- }
-
+ }
+
// DocFlavor getMimeType returns charset quoted
DocumentFormat format = DocumentFormat.createDocumentFormat(flavor);
request.addOperationAttribute(format);
-
- // Get and set the printdata based on the
+
+ // Get and set the printdata based on the
// representation classname
- String className = flavor.getRepresentationClassName();
-
- if (className.equals("[B"))
+ String className = flavor.getRepresentationClassName();
+
+ if (className.equals("[B"))
{
request.setData((byte[]) doc.getPrintData());
response = request.send();
try
{
// CUPS only supports UTF-8 currently so we convert
- // We also assume that char[] is always utf-16 - correct ?
+ // We also assume that char[] is always utf-16 - correct ?
String str = new String((char[]) doc.getPrintData());
request.setData(str.getBytes("utf-16"));
response = request.send();
notifyPrintJobListeners(new PrintJobEvent(this, PrintJobEvent.JOB_FAILED));
throw new PrintFlavorException("Invalid charset of flavor", e, new DocFlavor[] {flavor});
}
- }
+ }
else if (className.equals("java.io.Reader"))
{
try
notifyPrintJobListeners(new PrintJobEvent(this, PrintJobEvent.JOB_FAILED));
throw new PrintFlavorException("Invalid charset of flavor", e, new DocFlavor[] {flavor});
}
- }
+ }
else if (className.equals("java.lang.String"))
{
try
{
// CUPS only supports UTF-8 currently so we convert
- // We also assume that String is always utf-16 - correct ?
+ // We also assume that String is always utf-16 - correct ?
String str = (String) doc.getPrintData();
request.setData(str.getBytes("utf-16"));
response = request.send();
notifyPrintJobListeners(new PrintJobEvent(this, PrintJobEvent.JOB_FAILED));
throw new PrintFlavorException("Invalid charset of flavor", e, new DocFlavor[] {flavor});
}
- }
+ }
else if (className.equals("java.net.URL"))
{
URL url = (URL) doc.getPrintData();
// For the future :-)
throw new PrintException("Not yet supported.");
}
- else
+ else
{
// should not happen - however
notifyPrintJobListeners(new PrintJobEvent(this, PrintJobEvent.JOB_FAILED));
throw new PrintFlavorException("Invalid flavor", new DocFlavor[] {flavor});
- }
-
+ }
+
// at this point the data is transfered
notifyPrintJobListeners(new PrintJobEvent(
this, PrintJobEvent.DATA_TRANSFER_COMPLETE));
- }
+ }
catch (IOException e)
{
throw new PrintException("IOException occured.", e);
- }
-
+ }
+
int status = response.getStatusCode();
if (! (status == IppStatusCode.SUCCESSFUL_OK
|| status == IppStatusCode.SUCCESSFUL_OK_IGNORED_OR_SUBSTITUED_ATTRIBUTES
notifyPrintJobListeners(new PrintJobEvent(
this, PrintJobEvent.JOB_FAILED));
throw new PrintException("Printing failed - received statuscode " + Integer.toHexString(status));
-
+
// TODO maybe specific status codes may require to throw a specific
// detailed attribute exception
}
{
// start print job progress monitoring thread
// FIXME Implement
-
+
// for now we just notify as finished
notifyPrintJobListeners(
new PrintJobEvent(this, PrintJobEvent.JOB_COMPLETE));
}
-
+
List jobAtts = response.getJobAttributes();
-
+
// extract the uri and id of job for canceling and further monitoring
Map jobAttributes = (Map) jobAtts.get(0);
jobUri = (JobUri) ((HashSet)jobAttributes.get(JobUri.class)).toArray()[0];
- jobId = (JobId) ((HashSet)jobAttributes.get(JobId.class)).toArray()[0];
+ jobId = (JobId) ((HashSet)jobAttributes.get(JobId.class)).toArray()[0];
}
/**
{
if (listener == null)
return;
-
+
int index = attributesListener.indexOf(listener);
if (index != -1)
{
{
if (listener == null)
return;
-
+
printJobListener.remove(listener);
}
-
+
/**
* @see CancelablePrintJob#cancel()
*/
{
throw new PrintException("print job is not yet send");
}
-
+
IppResponse response = null;
-
+
try
{
- IppRequest request = new IppRequest(jobUri.getURI(), username, password);
+ IppRequest request = new IppRequest(jobUri.getURI(), username, password);
request.setOperationID( (short) OperationsSupported.CANCEL_JOB.getValue());
request.setOperationAttributeDefaults();
request.addOperationAttribute(jobUri);
request.addOperationAttribute(requestingUser);
- response = request.send();
- }
+ response = request.send();
+ }
catch (IOException e)
- {
+ {
throw new IppException("IOException occured during cancel request.", e);
- }
-
+ }
+
int status = response.getStatusCode();
if (! (status == IppStatusCode.SUCCESSFUL_OK
|| status == IppStatusCode.SUCCESSFUL_OK_IGNORED_OR_SUBSTITUED_ATTRIBUTES
{
notifyPrintJobListeners(new PrintJobEvent(
this, PrintJobEvent.JOB_FAILED));
- throw new PrintException("Canceling failed - received statuscode " + Integer.toHexString(status));
+ throw new PrintException("Canceling failed - received statuscode " + Integer.toHexString(status));
}
- else
+ else
{
notifyPrintJobListeners(new PrintJobEvent(
this, PrintJobEvent.JOB_CANCELED));
}
}
-
+
private void notifyPrintJobListeners(PrintJobEvent e)
{
Iterator it = printJobListener.iterator();
l.printJobFailed(e);
else if (e.getPrintEventType() == PrintJobEvent.NO_MORE_EVENTS)
l.printJobNoMoreEvents(e);
- else
+ else
l.printJobRequiresAttention(e);
- }
+ }
}
-
+
}
-/* IppDelimiterTag.java --
+/* IppDelimiterTag.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* IPP Delimiter Tags as described in RFC 2910 section 3.5.1.
* <p>
- * Every delimiter tag value can occur in the protocol field
+ * Every delimiter tag value can occur in the protocol field
* begin-attribute-group-tag and indicates that the following
* attributes will be part of the named group.<br>
* The end-of-attributes-tag signals the end of the attributes
* section in the IPP request/response and therefore the beginning
- * of the data section (if any).
+ * of the data section (if any).
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class IppDelimiterTag
{
/** Start of the operation attributes group section. */
public static final byte OPERATION_ATTRIBUTES_TAG = 0x01;
-
+
/** Start of the job attributes group section. */
public static final byte JOB_ATTRIBUTES_TAG = 0x02;
-
+
/** End of the attributes section and begin of data section. */
public static final byte END_OF_ATTRIBUTES_TAG = 0x03;
-
+
/** Start of the printer attributes group section. */
public static final byte PRINTER_ATTRIBUTES_TAG = 0x04;
-
+
/** Start of the unsupported attributes group section. */
public static final byte UNSUPPORTED_ATTRIBUTES_TAG = 0x05;
-
-
+
+
// 0x00 reserved for definition in a future IETF
// standards track document
-
+
// 0x06-0x0f reserved for future delimiters in IETF
// standards track documents
-
+
private IppDelimiterTag()
{
// not to be instantiated
}
-
+
/**
- * Tests if given value corresponds to a
+ * Tests if given value corresponds to a
* delimiter tag value.
- *
+ *
* @param value the value to test for
* @return <code>true</code> if, <code>false</code> otherwise.
*/
- public static boolean isDelimiterTag(byte value)
+ public static boolean isDelimiterTag(byte value)
{
if (value >= 0x01 && value <= 0x05)
return true;
-
+
return false;
}
-/* IppException.java --
+/* IppException.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* <code>IppException</code> signals exception thrown by
* the IPP implementation for various things like a failed
* ipp request or a wrapped io exception.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class IppException extends PrintException
{
super(s);
}
-
+
/**
* Creates an <code>IppException</code>.
* @param e the exception cause this one.
-/* IppMultiDocPrintService.java --
+/* IppMultiDocPrintService.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* Implementation of the MultiDocPrintService interface
* for IPP based printers.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public class IppMultiDocPrintService extends IppPrintService
+public class IppMultiDocPrintService extends IppPrintService
implements MultiDocPrintService
{
/** The username. */
private transient String user;
-
+
/** The password of the user. */
private transient String passwd;
/**
* Creates a <code>IppMultiDocPrintService</code> object.
- *
+ *
* @param uri the URI of the IPP printer.
* @param username the user of this print service.
* @param password the password of the user.
- *
+ *
* @throws IppException if an error during connection occurs.
*/
public IppMultiDocPrintService(URI uri, String username, String password)
super(uri, username, password);
user = username;
passwd = password;
- }
+ }
/**
* @see MultiDocPrintService#createMultiDocPrintJob()
*/
- public MultiDocPrintJob createMultiDocPrintJob()
+ public MultiDocPrintJob createMultiDocPrintJob()
{
return new MultiDocPrintJobImpl(this, user, passwd);
}
-/* IppPrintService.java --
+/* IppPrintService.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* Implementation of the PrintService interface
* for IPP based printers.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class IppPrintService implements PrintService
{
- /**
+ /**
* A Map with sets of attributes.
* key: A attribute category
* value: A set with values
- *
+ *
* IPP may return sets of attributes e.g. for supported
* compression methods so we need to map to sets here.
*/
- private Map printerAttr;
-
+ private Map<Class<? extends Attribute>, Set<Attribute>> printerAttr;
+
/** The set of listeners.*/
- private HashSet printServiceAttributeListener;
-
+ private HashSet<PrintServiceAttributeListener> printServiceAttributeListener;
+
/** The username. */
private transient String user;
-
+
/** The password of the user. */
private transient String passwd;
-
+
/** The name of this print service. */
private String name;
-
+
/** The list of supported document flavors. */
- private List flavors;
-
+ private List<DocFlavor> flavors;
+
/** The standard printer URI. */
private PrinterURI printerUri;
-
+
/** The list of all supported printer URIs. */
- private ArrayList printerUris;
-
+ private ArrayList<PrinterURI> printerUris;
+
/**
* Logger for tracing - enable by passing
* -Dgnu.classpath.debug.components=ipp to the vm.
*/
static final Logger logger = SystemLogger.SYSTEM;
-
- /**
+
+ /**
* requesting-user-name defaults to the executing user.
*/
public static final RequestingUserName REQUESTING_USER_NAME;
-
- /**
+
+ /**
* job-name defaults to "Java Printing".
*/
public static final JobName JOB_NAME;
-
+
static
{
JOB_NAME = new JobName("Java Printing", null);
REQUESTING_USER_NAME = new RequestingUserName(
- SystemProperties.getProperty("user.name", ""), null);
+ SystemProperties.getProperty("user.name", ""), null);
}
-
+
// TODO Implement service listener notification and change detection.
-
+
/**
* Creates a <code>IppPrintService</code> object.
- *
+ *
* @param uri the URI of the IPP printer.
* @param username the user of this print service.
* @param password the password of the user.
- *
+ *
* @throws IppException if an error during connection occurs.
*/
- public IppPrintService(URI uri, String username, String password)
+ public IppPrintService(URI uri, String username, String password)
throws IppException
{
printerUri = new PrinterURI(uri);
user = username;
passwd = password;
-
- printServiceAttributeListener = new HashSet();
-
+
+ printServiceAttributeListener =
+ new HashSet<PrintServiceAttributeListener>();
+
printerAttr = getPrinterAttributes();
processResponse();
}
-
+
/**
* Fetches all printer attributes from the IPP printer.
- *
+ *
* @return The Map with the printer attributes.
* @throws IppException if an error occurs.
*/
- private Map getPrinterAttributes() throws IppException
+ private Map<Class<? extends Attribute>, Set<Attribute>> getPrinterAttributes()
+ throws IppException
{
IppResponse response = null;
-
+
try
{
- IppRequest request = new IppRequest(printerUri.getURI(), user, passwd);
-
+ IppRequest request = new IppRequest(printerUri.getURI(), user, passwd);
+
int operation = OperationsSupported.GET_PRINTER_ATTRIBUTES.getValue();
- request.setOperationID((short) operation);
- request.setOperationAttributeDefaults();
+ request.setOperationID((short) operation);
+ request.setOperationAttributeDefaults();
request.addOperationAttribute(printerUri);
-
+
response = request.send();
- }
+ }
catch (IOException e)
{
throw new IppException("IOException in IPP request/response.", e);
- }
-
- return (Map) response.getPrinterAttributes().get(0);
+ }
+
+ return response.getPrinterAttributes().get(0);
}
-
+
/**
- * Extracts the set of attribute values for a given
+ * Extracts the set of attribute values for a given
* attribute category from the printer attributes map.
- *
+ *
* @param attributeClass the category
* @return The set of attributes of the category.
*/
- private Set getPrinterAttributeSet(Class attributeClass)
+ private <T extends Attribute> Set<T> getPrinterAttributeSet(Class<T> attributeClass)
{
- return (Set) printerAttr.get(attributeClass);
+ Set<Attribute> set = printerAttr.get(attributeClass);
+ Set<T> attSet = new HashSet<T>();
+ for (Attribute att : set)
+ attSet.add(attributeClass.cast(att));
+ return attSet;
}
-
+
/**
- * Extracts the default attribute value for the given
+ * Extracts the default attribute value for the given
* default attribute category from the printer attributes map.
- *
+ *
* @param attributeClass the category
* @return The default attribute.
- *
+ *
* @throws ClassCastException if attributClass is not an
* instance of <code>DefaultValueAttribute</code>.
*/
- private Attribute getPrinterDefaultAttribute(Class attributeClass)
+ private Attribute getPrinterDefaultAttribute(Class<? extends Attribute> attributeClass)
{
- Set set = (Set) printerAttr.get(attributeClass);
+ Set<Attribute> set = printerAttr.get(attributeClass);
return ((DefaultValueAttribute) set.toArray()[0]).getAssociatedAttribute();
}
-
+
/**
* Processes the response, sorts and splits the attributes.
*/
private void processResponse()
{
// printer name
- PrinterName[] tmp = (PrinterName[]) getPrinterAttributeSet(
- PrinterName.class).toArray(new PrinterName[1]);
+ PrinterName[] tmp = getPrinterAttributeSet(PrinterName.class).toArray(new PrinterName[1]);
name = tmp[0].getValue();
-
+
// supported flavors
// TODO Check if charsets-supported are charsets that are actually supported
// for text doc flavors as cups doesn't send charset parameters
-
+
// utf-8 is supported at least - so we go with this only for now
- flavors = new ArrayList();
- Set flavorAttributes = getPrinterAttributeSet(DocumentFormatSupported.class);
+ flavors = new ArrayList<DocFlavor>();
+ Set<DocumentFormatSupported> flavorAttributes = getPrinterAttributeSet(DocumentFormatSupported.class);
if (flavorAttributes != null)
{
- for (Iterator it = flavorAttributes.iterator(); it.hasNext();)
+ for (DocumentFormatSupported dfs : flavorAttributes)
{
- String mimeType = ((DocumentFormatSupported) it.next()).getValue();
-
+ String mimeType = dfs.getValue();
+
if (mimeType.equals("text/plain"))
{
flavors.add(DocFlavor.CHAR_ARRAY.TEXT_PLAIN);
flavors.add(DocFlavor.READER.TEXT_PLAIN);
flavors.add(DocFlavor.STRING.TEXT_PLAIN);
-
+
// add utf-8
mimeType = mimeType + "; charset=utf-8";
}
flavors.add(DocFlavor.CHAR_ARRAY.TEXT_HTML);
flavors.add(DocFlavor.READER.TEXT_HTML);
flavors.add(DocFlavor.STRING.TEXT_HTML);
-
+
// add utf-8
mimeType = mimeType + "; charset=utf-8";
}
-
+
// Process the predefined DocFlavors and if mimetype is
// equal put them into the flavors array - otherwise
// just build them as binarie class representation.
boolean changed = false;
try
{
- Class[] clazzes = new Class[] { DocFlavor.BYTE_ARRAY.class,
- DocFlavor.INPUT_STREAM.class,
- DocFlavor.URL.class };
-
+ Class<?>[] clazzes = new Class<?>[] { DocFlavor.BYTE_ARRAY.class,
+ DocFlavor.INPUT_STREAM.class,
+ DocFlavor.URL.class
+ };
+
for (int j = 0; j < clazzes.length; j++)
{
Field[] fields = clazzes[j].getDeclaredFields();
}
}
if (!changed) // not in predefined constants of DocFlavor
- {
+ {
// everything should be supported as binary stuff
flavors.add(new DocFlavor(mimeType, "[B"));
flavors.add(new DocFlavor(mimeType, "java.io.InputStream"));
}
}
- if (this.getClass()
- .isAssignableFrom(gnu.javax.print.CupsPrintService.class))
- {
-// CUPS always provides filters to convert from Postscript.
-// This logic looks odd, but it's what OpenJDK does.
- flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
- flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
- }
+ if (this.getClass()
+ .isAssignableFrom(gnu.javax.print.CupsPrintService.class))
+ {
+// CUPS always provides filters to convert from Postscript.
+// This logic looks odd, but it's what OpenJDK does.
+ flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
+ flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
+ }
}
// printer uris
- Set uris = getPrinterAttributeSet(PrinterUriSupported.class);
- printerUris = new ArrayList(uris.size());
- Iterator it = uris.iterator();
- while (it.hasNext())
+ Set<PrinterUriSupported> uris = getPrinterAttributeSet(PrinterUriSupported.class);
+ printerUris = new ArrayList<PrinterURI>(uris.size());
+ for (PrinterUriSupported uri : uris)
{
- PrinterUriSupported uri = (PrinterUriSupported) it.next();
printerUris.add( new PrinterURI(uri.getURI()));
}
}
/**
* We always return a implementation implementing CancelablePrintJob.
- *
+ *
* @see javax.print.PrintService#createPrintJob()
*/
public DocPrintJob createPrintJob()
{
return new DocPrintJobImpl(this, user, passwd);
}
-
+
/**
* @see javax.print.PrintService#getAttribute(java.lang.Class)
*/
- public PrintServiceAttribute getAttribute(Class category)
+ public <T extends PrintServiceAttribute> T getAttribute(Class<T> category)
{
if (category == null)
throw new NullPointerException("category may not be null");
-
+
if (! PrintServiceAttribute.class.isAssignableFrom(category))
throw new IllegalArgumentException(
"category must be of type PrintServiceAttribute");
-
- Set set = getPrinterAttributeSet(category);
- if (set != null && set.size() > 0)
- return (PrintServiceAttribute) set.toArray()[0];
-
+
+ Set<T> set = getPrinterAttributeSet(category);
+ if (set != null && set.size() > 0)
+ return set.iterator().next();
+
return null;
}
public PrintServiceAttributeSet getAttributes()
{
PrintServiceAttributeSet set = new HashPrintServiceAttributeSet();
-
- Iterator it = printerAttr.values().iterator();
- while (it.hasNext())
- {
- Iterator it2 = ((Set) it.next()).iterator();
- while (it2.hasNext())
+
+ for (Set<Attribute> attrSet : printerAttr.values())
+ {
+ for (Attribute attr : attrSet)
{
- Attribute attr = (Attribute) it2.next();
if (attr instanceof PrintServiceAttribute)
set.add(attr);
}
}
-
+
return AttributeSetUtilities.unmodifiableView(set);
}
/**
* @see javax.print.PrintService#getDefaultAttributeValue(java.lang.Class)
*/
- public Object getDefaultAttributeValue(Class category)
- {
+ public Object getDefaultAttributeValue(Class<? extends Attribute> category)
+ {
// required attributes
if (category.equals(Fidelity.class))
- return Fidelity.FIDELITY_FALSE;
+ return Fidelity.FIDELITY_FALSE;
if (category.equals(JobName.class))
return JOB_NAME;
if (category.equals(RequestingUserName.class))
return REQUESTING_USER_NAME;
-
+
// optional attributes
- if (category.equals(JobPriority.class)
+ if (category.equals(JobPriority.class)
&& printerAttr.containsKey(JobPriorityDefault.class))
return getPrinterDefaultAttribute(JobPriorityDefault.class);
- if (category.equals(JobHoldUntil.class)
+ if (category.equals(JobHoldUntil.class)
&& printerAttr.containsKey(JobHoldUntilDefault.class))
return getPrinterDefaultAttribute(JobHoldUntilDefault.class);
- if (category.equals(JobSheets.class)
+ if (category.equals(JobSheets.class)
&& printerAttr.containsKey(JobSheetsDefault.class))
return getPrinterDefaultAttribute(JobSheetsDefault .class);
- if (category.equals(MultipleDocumentHandling.class)
+ if (category.equals(MultipleDocumentHandling.class)
&& printerAttr.containsKey(MultipleDocumentHandlingDefault.class))
return getPrinterDefaultAttribute(MultipleDocumentHandlingDefault.class);
- if (category.equals(Copies.class)
+ if (category.equals(Copies.class)
&& printerAttr.containsKey(CopiesDefault.class))
return getPrinterDefaultAttribute(CopiesDefault.class);
- if (category.equals(Finishings.class)
+ if (category.equals(Finishings.class)
&& printerAttr.containsKey(FinishingsDefault.class))
return getPrinterDefaultAttribute(FinishingsDefault.class);
- if (category.equals(Sides.class)
+ if (category.equals(Sides.class)
&& printerAttr.containsKey(SidesDefault.class))
return getPrinterDefaultAttribute(SidesDefault.class);
- if (category.equals(NumberUp.class)
+ if (category.equals(NumberUp.class)
&& printerAttr.containsKey(NumberUpDefault.class))
return getPrinterDefaultAttribute(NumberUpDefault.class);
- if (category.equals(OrientationRequested.class)
+ if (category.equals(OrientationRequested.class)
&& printerAttr.containsKey(OrientationRequestedDefault.class))
return getPrinterDefaultAttribute(OrientationRequestedDefault.class);
- if (category.equals(Media.class)
+ if (category.equals(Media.class)
&& printerAttr.containsKey(MediaDefault.class))
return getPrinterDefaultAttribute(MediaDefault.class);
- if (category.equals(PrinterResolution.class)
+ if (category.equals(PrinterResolution.class)
&& printerAttr.containsKey(PrinterResolutionDefault.class))
return getPrinterDefaultAttribute(PrinterResolutionDefault.class);
- if (category.equals(PrintQuality.class)
+ if (category.equals(PrintQuality.class)
&& printerAttr.containsKey(PrintQualityDefault.class))
return getPrinterDefaultAttribute(PrintQualityDefault.class);
- if (category.equals(Compression.class)
+ if (category.equals(Compression.class)
&& printerAttr.containsKey(CompressionSupported.class))
return Compression.NONE;
if (category.equals(PageRanges.class))
return new PageRanges(1, Integer.MAX_VALUE);
- return null;
+ return null;
}
-
+
/**
* We return the value of <code>PrinterName</code> here.
* @see javax.print.PrintService#getName()
{
// SUN does not provide any service factory for
// print services (tested on linux/windows)
-
+
// for the moment we do the same - just return null
// later on we could provide at least the about UI dialog
return null;
/**
* @see javax.print.PrintService#getSupportedAttributeCategories()
*/
- public Class[] getSupportedAttributeCategories()
+ public Class<?>[] getSupportedAttributeCategories()
{
- Set categories = new HashSet();
-
- // Should only be job template attributes as of section 4.2
+ Set<Class<? extends Attribute>> categories =
+ new HashSet<Class<? extends Attribute>>();
+
+ // Should only be job template attributes as of section 4.2
if (printerAttr.containsKey(JobPrioritySupported.class))
categories.add(JobPriority.class);
if (printerAttr.containsKey(JobHoldUntilSupported.class))
if (printerAttr.containsKey(JobSheetsSupported.class))
categories.add(JobSheets.class);
if (printerAttr.containsKey(MultipleDocumentHandlingSupported.class))
- categories.add(MultipleDocumentHandling.class);
+ categories.add(MultipleDocumentHandling.class);
if (printerAttr.containsKey(CopiesSupported.class))
categories.add(Copies.class);
if (printerAttr.containsKey(FinishingsSupported.class))
{
// if only none finishing is supported - it does not count as supported
- Set set = getPrinterAttributeSet(FinishingsSupported.class);
- if (! (set.size() == 1 && set.contains(FinishingsSupported.NONE)))
+ Set<FinishingsSupported> set = getPrinterAttributeSet(FinishingsSupported.class);
+ if (! (set.size() == 1 && set.contains(FinishingsSupported.NONE)))
categories.add(Finishings.class);
}
if (printerAttr.containsKey(PageRangesSupported.class))
categories.add(PrinterResolution.class);
if (printerAttr.containsKey(PrintQualitySupported.class))
categories.add(PrintQuality.class);
-
- // Chromaticity, Destination, MediaPrintableArea,
+
+ // Chromaticity, Destination, MediaPrintableArea,
// SheetCollate, PresentationDirection - not IPP attributes
-
- // attributes outside section 4.2
+
+ // attributes outside section 4.2
if (printerAttr.containsKey(CompressionSupported.class))
categories.add(Compression.class);
if (printerAttr.containsKey(JobImpressionsSupported.class))
categories.add(JobKOctets.class);
if (printerAttr.containsKey(JobMediaSheetsSupported.class))
categories.add(JobMediaSheets.class);
-
+
// always supported as required by IPP specification
categories.add(Fidelity.class);
categories.add(JobName.class);
categories.add(RequestingUserName.class);
- return (Class[]) categories.toArray(new Class[categories.size()]);
+ return categories.toArray(new Class[categories.size()]);
}
/**
* attribute values totally different may override this methods. Subclass only in
* need of handling the response differently may override the method
* <code>handleSupportedAttributeValuesResponse(IppResponse, Class)</code> only.
- *
+ *
* @see PrintService#getSupportedAttributeValues(Class, DocFlavor, AttributeSet)
* @see #handleSupportedAttributeValuesResponse(IppResponse, Class)
*/
- public Object getSupportedAttributeValues(Class category, DocFlavor flavor,
- AttributeSet attributes)
+ public Object getSupportedAttributeValues(Class<? extends Attribute> category,
+ DocFlavor flavor, AttributeSet attributes)
{
// We currently ignore the attribute set - there is nothing in the IPP
// specification which would come closer to what we do here.
request.setOperationAttributeDefaults();
request.addOperationAttribute(new RequestedAttributes(categoryName));
request.addOperationAttribute(printerUri);
-
+
if (flavor != null)
{
DocumentFormat f = DocumentFormat.createDocumentFormat(flavor);
}
response = request.send();
-
+
int status = response.getStatusCode();
if (! (status == IppStatusCode.SUCCESSFUL_OK
|| status == IppStatusCode.SUCCESSFUL_OK_IGNORED_OR_SUBSTITUED_ATTRIBUTES
// method cannot throw exception - just log
logger.log(Component.IPP, "IPPException", e);
}
-
+
return handleSupportedAttributeValuesResponse(response, category);
}
-
+
/**
* Called to handle the supported attribute values response for the given
* category. This might be overridden by subclasses with different requirements
* for parsing/handling the response from the GetPrinterAttributes.
- *
+ *
* @param response the response of the GetPrinterAttributes IPP request
* @param category the category for which the supported values are requested
- * @return A object indicating the supported values for the given attribute
- * category, or <code>null</code> if this print service doesn't support the
+ * @return A object indicating the supported values for the given attribute
+ * category, or <code>null</code> if this print service doesn't support the
* given attribute category at all.
- *
+ *
* @see #getSupportedAttributeValues(Class, DocFlavor, AttributeSet)
*/
- protected Object handleSupportedAttributeValuesResponse(IppResponse response,
- Class category)
+ protected Object handleSupportedAttributeValuesResponse(IppResponse response,
+ Class<? extends Attribute> category)
{
- List printerAtts = response.getPrinterAttributes();
-
+ List<Map<Class<? extends Attribute>, Set<Attribute>>> printerAtts =
+ response.getPrinterAttributes();
+
// only one will be returned
- Map printerAttribute = (Map) printerAtts.get(0);
- Class suppCategory = IppUtilities.getSupportedCategory(category);
- Set attr = (Set) printerAttribute.get(suppCategory);
-
- // We sometime assume its a single instance with arbritrary value just indicating
+ Map<Class<? extends Attribute>, Set<Attribute>> printerAttribute = printerAtts.get(0);
+ Class<? extends Attribute> suppCategory = IppUtilities.getSupportedCategory(category);
+ Set<Attribute> attr = printerAttribute.get(suppCategory);
+
+ // We sometime assume its a single instance with arbritrary value just indicating
// support or an array which is returned. This is because I sometimes just choosed
- // what sounds right to me - as I have yet to find a printer which supports every
+ // what sounds right to me - as I have yet to find a printer which supports every
// special category in the SUN implementation to see what they return :-)
-
+
// Map whats in the JSP API
if (suppCategory.equals(JobPrioritySupported.class))
- return (JobPrioritySupported) attr.toArray(new JobPrioritySupported[1])[0];
+ return (JobPrioritySupported) attr.iterator().next();
if (suppCategory.equals(JobHoldUntilSupported.class))
return new JobHoldUntil(new Date());
if (suppCategory.equals(JobSheetsSupported.class))
if (suppCategory.equals(MultipleDocumentHandlingSupported.class))
return MultipleDocumentHandlingSupported.getAssociatedAttributeArray(attr);
if (suppCategory.equals(CopiesSupported.class))
- return (CopiesSupported) attr.toArray(new CopiesSupported[1])[0];
+ return (CopiesSupported) attr.iterator().next();
if (suppCategory.equals(FinishingsSupported.class))
return FinishingsSupported.getAssociatedAttributeArray(attr);
if (suppCategory.equals(PageRangesSupported.class))
- return new PageRanges[] { new PageRanges(1, Integer.MAX_VALUE) };
+ return new PageRanges[] { new PageRanges(1, Integer.MAX_VALUE) };
if (suppCategory.equals(OrientationRequestedSupported.class))
return OrientationRequestedSupported.getAssociatedAttributeArray(attr);
if (suppCategory.equals(MediaSupported.class))
// Special handling as it might also be in range of integers
if (suppCategory.equals(NumberUpSupported.class))
{
- NumberUpSupported[] tmp = (NumberUpSupported[])
- attr.toArray(new NumberUpSupported[attr.size()]);
-
if (attr.size() == 1) // number-up maybe in rangeofintegers
- return tmp[0];
+ return attr.iterator().next();
int[][] members = new int[attr.size()][2];
+ Iterator<Attribute> it = attr.iterator();
for (int j = 0; j < attr.size(); j++)
{
- int value = tmp[j].getMembers()[0][0];
+ int value = ((NumberUpSupported) it.next()).getMembers()[0][0];
members[j] = new int[] { value, value };
}
NumberUpSupported supported = new NumberUpSupported(members);
return supported;
}
-
+
return null;
- }
-
+ }
+
/**
* @see javax.print.PrintService#getSupportedDocFlavors()
*/
public DocFlavor[] getSupportedDocFlavors()
{
- return (DocFlavor[]) flavors.toArray(new DocFlavor[flavors.size()]);
+ return flavors.toArray(new DocFlavor[flavors.size()]);
}
/**
- * This is done by a validate-job operation and actually implemented in
+ * This is done by a validate-job operation and actually implemented in
* this generic IPP reference implementation. Subclasses which does
* not correctly support Validate-Job operation might want to override this.
*
*/
public AttributeSet getUnsupportedAttributes(DocFlavor flavor,
AttributeSet attributes)
- {
+ {
if (flavor != null && !isDocFlavorSupported(flavor))
throw new IllegalArgumentException("flavor is not supported");
request.setOperationAttributeDefaults();
request.addOperationAttribute(printerUri);
request.addOperationAttribute(Fidelity.FIDELITY_TRUE);
-
+
if (attributes != null && attributes.size() > 0)
{
request.addAndFilterJobOperationAttributes(attributes);
request.addAndFilterJobTemplateAttributes(attributes);
}
-
+
if (flavor != null)
{
DocumentFormat f = DocumentFormat.createDocumentFormat(flavor);
request.addOperationAttribute(f);
}
-
+
response = request.send();
-
+
int status = response.getStatusCode();
if (! (status == IppStatusCode.SUCCESSFUL_OK
|| status == IppStatusCode.SUCCESSFUL_OK_IGNORED_OR_SUBSTITUED_ATTRIBUTES
logger.log(Component.IPP, "IPPException", e);
}
- // Validate Jobs returns only Unsupported and Operation
- List unsupportedMaps = response.getUnsupportedAttributes();
+ // Validate Jobs returns only Unsupported and Operation
+ List<Map<Class<? extends Attribute>, Set<Attribute>>> unsupportedMaps =
+ response.getUnsupportedAttributes();
if (unsupportedMaps.size() == 0)
- return null;
-
- Map unsupportedAttr = (Map) unsupportedMaps.get(0);
+ return null;
+
+ Map<Class<? extends Attribute>, Set<Attribute>> unsupportedAttr = unsupportedMaps.get(0);
if (unsupportedAttr.size() == 0)
return null;
-
- // Convert the return map with unsupported attributes
+
+ // Convert the return map with unsupported attributes
// into an AttribueSet instance
HashAttributeSet set = new HashAttributeSet();
- Iterator it = unsupportedAttr.values().iterator();
- while (it.hasNext())
+ for (Set<Attribute> unsupported : unsupportedAttr.values())
{
- Set unsupported = (Set) it.next();
- Iterator it2 = unsupported.iterator();
- while (it2.hasNext())
- set.add((Attribute) it2.next());
+ for (Attribute att : unsupported)
+ set.add(att);
}
-
+
return set;
}
/**
* @see PrintService#isAttributeCategorySupported(Class)
*/
- public boolean isAttributeCategorySupported(Class category)
+ public boolean isAttributeCategorySupported(Class<? extends Attribute> category)
{
if (category == null)
throw new NullPointerException("category may not be null");
-
+
if (! Attribute.class.isAssignableFrom(category))
throw new IllegalArgumentException("category must be of type Attribute");
-
+
return Arrays.asList(getSupportedAttributeCategories()).contains(category);
}
public boolean isAttributeValueSupported(Attribute attrval, DocFlavor flavor,
AttributeSet attributes)
{
- // just redirect to getSupportedAttributeValues
- Object values = getSupportedAttributeValues(attrval.getCategory(),
- flavor, attributes);
+ // just redirect to getSupportedAttributeValues
+ Object values = getSupportedAttributeValues(attrval.getCategory(),
+ flavor, attributes);
// null means none supported
if (values == null)
return false;
-
+
// object may be an array
if (values.getClass().isArray())
return Arrays.asList((Object[]) values).contains(attrval);
-
+
// may be a single instance of the category (value is irrelevant)
if (values.getClass().equals(attrval.getCategory()))
return true;
-
- // a single instance of another class to give the bounds
+
+ // a single instance of another class to give the bounds
// copies
if (values.getClass().equals(CopiesSupported.class))
- return ((CopiesSupported) values).contains((IntegerSyntax) attrval);
+ return ((CopiesSupported) values).contains((IntegerSyntax) attrval);
// number up
if (values.getClass().equals(NumberUpSupported.class))
- return ((NumberUpSupported) values).contains((IntegerSyntax) attrval);
+ return ((NumberUpSupported) values).contains((IntegerSyntax) attrval);
// job priority
if (values.getClass().equals(JobPrioritySupported.class))
{
if (priority.getValue() < maxSupported.getValue())
return true;
}
-
- // I am unsure if these might also show up - not yet found a printer where
- // Suns implementation supports them:
+
+ // I am unsure if these might also show up - not yet found a printer where
+ // Suns implementation supports them:
// JobImpressionsSupported, JobKOctetsSupported, JobMediaSheetsSupported
-
+
return false;
}
-
+
/**
* @see javax.print.PrintService#isDocFlavorSupported(DocFlavor)
*/
{
if (flavor == null)
throw new NullPointerException("DocFlavor may not be null.");
-
+
return flavors.contains(flavor);
}
-
+
/**
* @see PrintService#addPrintServiceAttributeListener(PrintServiceAttributeListener)
*/
{
printServiceAttributeListener.add(listener);
}
-
+
/**
* @see PrintService#removePrintServiceAttributeListener(PrintServiceAttributeListener)
*/
{
printServiceAttributeListener.remove(listener);
}
-
+
/**
* Returns "IppPrinter: " + <code>getName()</code>
* @return The string representation.
public String toString()
{
return "IppPrinter: " + getName();
- }
-
+ }
+
/**
* Returns the printer-uri of this print service.
- *
+ *
* @return The printer-uri attribute.
*/
public PrinterURI getPrinterURI()
{
return printerUri;
- }
+ }
}
-/* IppRequest.java --
+/* IppRequest.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* <li>data - q bytes - optional</li>
* </ul>
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class IppRequest
{
/**
- * The printer-poll timeout.
+ * The printer-poll timeout.
*/
private static final int timeout = 1000;
/**
* Helper class used to write the attributes of a request
* into the supplied data output stream in the correct way.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
class RequestWriter
- {
+ {
private DataOutputStream out;
-
+
/**
* Creates a RequestWriter.
- *
+ *
* @param stream the stream to write to.
*/
RequestWriter(DataOutputStream stream)
{
out = stream;
}
-
+
/**
* Writes an attribute in IntegerSyntax into the stream.
* @param attribute the attribute
out.write(name.getBytes());
}
else
- out.writeShort(0x0000); // only name-length
+ out.writeShort(0x0000); // only name-length
out.writeShort(8); // range is 8 bytes
out.writeInt(ranges[i][0]);
}
out.writeByte(directionFromUTC);
- out.writeByte(offsetInMillis / 3600000); // hours
+ out.writeByte(offsetInMillis / 3600000); // hours
out.writeByte((offsetInMillis % 3600000) / 60000); // minutes
}
* of NAME value-tag in IPP this method checks for these attributes and
* writes them as NAME_WITHOUT_LANGUAGE value-tag into the stream.
* </p>
- *
+ *
* @param attribute the attribute
* @param out the stream to write to
* @throws IOException if thrown by the stream
out.writeByte(IppValueTag.MIME_MEDIA_TYPE);
else
out.writeByte(IppValueTag.TEXT_WITHOUT_LANGUAGE);
-
+
out.writeShort(name.length());
out.write(name.getBytes());
out.writeShort(attribute.getValue().length());
- out.write(attribute.getValue().getBytes());
+ out.write(attribute.getValue().getBytes());
}
/**
* @throws IOException if thrown by the stream
*/
private void write(CharsetSyntax attribute) throws IOException
- {
- String name = ((Attribute) attribute).getName();
+ {
+ String name = ((Attribute) attribute).getName();
out.writeByte(IppValueTag.CHARSET);
out.writeShort(name.length());
out.write(name.getBytes());
out.writeShort(attribute.getValue().length());
out.write(attribute.getValue().getBytes());
}
-
+
/**
* Writes an attribute in RequestedAttributes into the stream.
* @param attribute the attribute
*/
private void write(RequestedAttributes attribute) throws IOException
{
- List values = attribute.getValues();
-
+ String[] values = attribute.getValues();
+
String name = ((Attribute) attribute).getName();
out.writeByte(IppValueTag.KEYWORD);
out.writeShort(name.length());
- out.write(name.getBytes());
- out.writeShort(((String) values.get(0)).length());
- out.write(((String) values.get(0)).getBytes());
-
- for (int i=1; i < values.size(); i++)
+ out.write(name.getBytes());
+ out.writeShort(values[0].length());
+ out.write(values[0].getBytes());
+
+ for (int i=1; i < values.length; i++)
{
out.writeByte(IppValueTag.KEYWORD);
out.writeShort(0x0000); // length for additional value
- out.writeShort(((String) values.get(i)).length());
- out.write(((String) values.get(i)).getBytes());
+ out.writeShort(values[i].length());
+ out.write(values[i].getBytes());
}
- }
+ }
+
-
/**
* Writes the given operation attribute group of the given map instance
* (key=group, values=set of attributes) into the supplied data
* output stream.
- *
+ *
* @param attributes the set with the attributes.
- *
+ *
* @throws IOException if thrown by the used DataOutputStream.
* @throws IppException if unknown attributes occur.
*/
throws IOException, IppException
{
out.write(IppDelimiterTag.OPERATION_ATTRIBUTES_TAG);
-
+
// its essential to write these two in this order and as first ones
Attribute att = attributes.get(AttributesCharset.class);
write((CharsetSyntax) att);
-
- logger.log(Component.IPP, "Attribute: Name: <"
- + att.getCategory().getName() + "> Value: <" + att.toString() + ">");
-
+
+ logger.log(Component.IPP, "Attribute: Name: <"
+ + att.getCategory().getName() + "> Value: <" + att.toString() + ">");
+
attributes.remove(AttributesCharset.class);
-
+
att = attributes.get(AttributesNaturalLanguage.class);
write((NaturalLanguageSyntax) att);
attributes.remove(AttributesNaturalLanguage.class);
-
- logger.log(Component.IPP, "Attribute: Name: <"
+
+ logger.log(Component.IPP, "Attribute: Name: <"
+ att.getCategory().getName() + "> Value: <" + att.toString() + ">");
-
+
// furthermore its essential to now write out the target attribute
PrinterURI printerUri = (PrinterURI) attributes.get(PrinterURI.class);
JobUri jobUri = (JobUri) attributes.get(JobUri.class);
.getName() + "> Value: <" + jobUri.toString() + ">");
}
else if (reqAttrs != null)
- {
- write(reqAttrs);
- attributes.remove(RequestedAttributes.class);
- logger.log(Component.IPP, "RequestedAttributes: <" + reqAttrs + ">");
- }
+ {
+ write(reqAttrs);
+ attributes.remove(RequestedAttributes.class);
+ logger.log(Component.IPP, "RequestedAttributes: <" + reqAttrs + ">");
+ }
else
{
throw new IppException("Unknown target operation attribute combination.");
- }
-
+ }
+
writeAttributes(attributes);
}
-
+
/**
* Writes the given attribute groups of the given map instance
* (key=group, values=set of attributes) into the supplied data
* output stream.
- *
+ *
* @param attributes the set with the attributes.
- *
+ *
* @throws IOException if thrown by the used DataOutputStream.
* @throws IppException if unknown attributes occur.
*/
for (int i = 0; i < attributeArray.length; i++)
{
logger.log(Component.IPP, "Attribute: Name: <" + attributeArray[i]
- .getCategory().getName() + "> Value: <"
- + attributeArray[i].toString() + ">");
-
+ .getCategory().getName() + "> Value: <"
+ + attributeArray[i].toString() + ">");
+
if (attributeArray[i] instanceof IntegerSyntax)
write((IntegerSyntax) attributeArray[i]);
else if (attributeArray[i] instanceof TextSyntax)
/** The operation type of this request. */
private short operation_id;
- /**
- * The request id of this request. This is
+ /**
+ * The request id of this request. This is
* assigned automatically by the constructor.
*/
private final int request_id;
private AttributeSet jobAttributes;
private Object data;
-
+
private URI requestUri;
/** The underlying connection - IPP is http based */
private HttpURLConnection connection;
-
+
/**
* Creates an IPPRequest instance.
- *
+ *
* @param uri the URI of the request
* @param user the user if any
* @param password the password of the supplied user
*/
public IppRequest(URI uri, String user, String password)
- {
+ {
request_id = incrementRequestIdCounter();
requestUri = uri;
-
+
try
{
- URL url = new URL("http",
- user == null
- ? uri.getHost() : user + ":"
- + password + "@" + uri.getHost(),
+ URL url = new URL("http",
+ user == null
+ ? uri.getHost() : user + ":"
+ + password + "@" + uri.getHost(),
uri.getPort(), uri.getPath());
-
+
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
-
+
connection.setRequestProperty("Content-type", "application/ipp");
- connection.setRequestProperty("Accept", "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2");
- }
+ connection.setRequestProperty("Accept", "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2");
+ }
catch (IOException e)
{
// MalformedURLException - uri is already checked
// ProtocolException - POST is correct method type
- // IOException -HTTPURLConnection constructor actually
+ // IOException -HTTPURLConnection constructor actually
// does never throw this exception.
logger.log(Component.IPP, "Unexpected IOException", e);
}
-
+
logger.log(Component.IPP, "[IppConnection] Host: " + uri.getHost()
+ " Port: " + uri.getPort() + " Path: "
+ uri.getPath());
/**
* Synchronized method to be called by the constructor
* to assign a unique request id to this request.
- *
+ *
* @return The unique request id.
*/
private synchronized int incrementRequestIdCounter()
/**
* Returns the id of this request.
- *
+ *
* @return The request ID.
*/
public int getRequestID()
return request_id;
}
- /**
- * Sets the data of the request. The data used in this
+ /**
+ * Sets the data of the request. The data used in this
* request will be the one of the supplied inputstream
* instead of the alternative byte array possibility.
- *
+ *
* @param stream the input stream to use for the data.
*/
public void setData(InputStream stream)
data = stream;
}
- /**
- * Sets the data of the request. The data used in this
+ /**
+ * Sets the data of the request. The data used in this
* request will be the one of the supplied byte[]
* instead of the alternative input stream possibility.
- *
+ *
* @param bytes the byte[] to use for the data.
*/
public void setData(byte[] bytes)
/**
* Sets the operation id for this request.
- *
+ *
* @param id the operation id.
*/
public void setOperationID(short id)
/**
* Adds the default values for the operation
- * attributes "attributes-charset" and
+ * attributes "attributes-charset" and
* "attributes-natural-language"
*/
public void setOperationAttributeDefaults()
operationAttributes.add(AttributesCharset.UTF8);
operationAttributes.add(AttributesNaturalLanguage.EN);
}
-
+
/**
* Add the job attribute of this request to the given
* attribute set.
- *
+ *
* @param attribute the job attribute.
*/
public void addJobAttribute(Attribute attribute)
{
if (jobAttributes == null)
jobAttributes = new HashAttributeSet();
-
+
jobAttributes.add(attribute);
}
-
+
/**
* Sets the printer attribute of this request to the given
* attribute set.
- *
+ *
* @param attribute the printer attribute.
*/
public void addPrinterAttributes(Attribute attribute)
{
if (printerAttributes == null)
printerAttributes = new HashAttributeSet();
-
+
printerAttributes.add(attribute);
}
/**
* Adds the given attribute to the operation attributes set.
- *
+ *
* @param attribute the operation attribute to add.
*/
public void addOperationAttribute(Attribute attribute)
{
if (operationAttributes == null)
operationAttributes = new HashAttributeSet();
-
+
operationAttributes.add(attribute);
}
-
+
/**
* Filters from the given attribute set the job operation out
* and adds them to the operation attributes set.
- *
+ *
* @param set the attributes to filter, may not be <code>null</code>.
*/
public void addAndFilterJobOperationAttributes(AttributeSet set)
{
if (operationAttributes == null)
operationAttributes = new HashAttributeSet();
-
+
// document-natural-language - not defined in JPS attributes
// document-format - specified outside, special treatment
Attribute[] tmp = set.toArray();
- for (int i = 0; i < tmp.length; i++)
- {
+ for (int i = 0; i < tmp.length; i++)
+ {
if (tmp[i].getCategory().equals(JobName.class)
|| tmp[i].getCategory().equals(Fidelity.class)
|| tmp[i].getCategory().equals(JobImpressions.class)
|| tmp[i].getCategory().equals(Compression.class)
|| tmp[i].getCategory().equals(DocumentName.class)
|| tmp[i].getCategory().equals(RequestingUserName.class))
-
- operationAttributes.add(tmp[i]);
- }
+
+ operationAttributes.add(tmp[i]);
+ }
}
-
+
/**
* Filters from the given attribute set the job template attributes
* out and adds them to the job attributes set.
- *
+ *
* @param set the attributes to filter, may not be <code>null</code>.
*/
public void addAndFilterJobTemplateAttributes(AttributeSet set)
{
if (jobAttributes == null)
jobAttributes = new HashAttributeSet();
-
+
// document-natural-language - not defined in JPS attributes
// document-format - specified outside, special treatment
Attribute[] tmp = set.toArray();
- for (int i = 0; i < tmp.length; i++)
- {
+ for (int i = 0; i < tmp.length; i++)
+ {
if (tmp[i].getCategory().equals(JobPriority.class)
|| tmp[i].getCategory().equals(JobHoldUntil.class)
|| tmp[i].getCategory().equals(JobSheets.class)
|| tmp[i].getCategory().equals(PrintQuality.class)
|| tmp[i].getCategory().equals(SheetCollate.class)
|| tmp[i].getCategory().equals(Sides.class))
-
- jobAttributes.add(tmp[i]);
- }
+
+ jobAttributes.add(tmp[i]);
+ }
}
/**
* Does some validation of the supplied parameters and then
* sends the request to the ipp server or service.
- *
+ *
* @return The response if any.
- *
+ *
* @throws IllegalStateException if request is already sent
* @throws IppException if connection or request failed.
- * @throws IOException if writing of the header, attributes or footer fails.
+ * @throws IOException if writing of the header, attributes or footer fails.
*/
public IppResponse send() throws IppException, IOException
{
if (alreadySent)
throw new IllegalStateException("Request is already sent");
-
+
alreadySent = true;
-
- OutputStream stream = connection.getOutputStream();
+
+ OutputStream stream = connection.getOutputStream();
DataOutputStream out = new DataOutputStream(stream);
-
+
// the header 8 bytes long
out.writeShort(VERSION);
out.writeShort(operation_id);
out.writeInt(request_id);
-
- logger.log(Component.IPP, "OperationID: " + Integer.toHexString(operation_id)
- + " RequestID: " + request_id);
-
+
+ logger.log(Component.IPP, "OperationID: " + Integer.toHexString(operation_id)
+ + " RequestID: " + request_id);
+
// Pass stuff the the attribute writer which knows how to
// write the attributes in correct order
logger.log(Component.IPP, "Operation Attributes");
-
+
RequestWriter writer = new RequestWriter(out);
- writer.writeOperationAttributes(operationAttributes);
-
+ writer.writeOperationAttributes(operationAttributes);
+
if (jobAttributes != null)
{
logger.log(Component.IPP, "Job Attributes");
out.write(IppDelimiterTag.JOB_ATTRIBUTES_TAG);
writer.writeAttributes(jobAttributes);
- }
+ }
if (printerAttributes != null)
{
logger.log(Component.IPP, "Printer Attributes");
out.write(IppDelimiterTag.PRINTER_ATTRIBUTES_TAG);
writer.writeAttributes(printerAttributes);
- }
+ }
// write the delimiter to the data
- out.write(IppDelimiterTag.END_OF_ATTRIBUTES_TAG);
+ out.write(IppDelimiterTag.END_OF_ATTRIBUTES_TAG);
// check if data is byte[] or inputstream
if (data instanceof InputStream)
{
byte[] readbuf = new byte[2048];
- int len = 0;
+ int len = 0;
while( (len = ((InputStream) data).read(readbuf)) > 0)
out.write(readbuf, 0, len);
}
{
out.write((byte[]) data);
}
-
+
out.flush();
- stream.flush();
-
+ stream.flush();
+
// Set the connection timeout, for if the printer is offline.
// FIXME: The print services polling should probably be done in its
// own thread.
connection.setConnectTimeout( timeout );
int responseCode = connection.getResponseCode();
-
+
if (responseCode == HttpURLConnection.HTTP_OK)
- {
- IppResponse response = new IppResponse(requestUri, operation_id);
- response.setResponseData(connection.getInputStream());
+ {
+ IppResponse response = new IppResponse(requestUri, operation_id);
+ response.setResponseData(connection.getInputStream());
return response;
}
logger.log(Component.IPP, "HTTP-Statuscode: " + responseCode);
- throw new IppException("Request failed got HTTP status code "
+ throw new IppException("Request failed got HTTP status code "
+ responseCode);
}
-/* IppResponse.java --
+/* IppResponse.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import javax.print.attribute.standard.Severity;
/**
- * <code>IppResponse</code> models a response received from an IPP
+ * <code>IppResponse</code> models a response received from an IPP
* compatible server as described in RFC 2910 IPP 1.1 Encoding and Transport.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class IppResponse
* response stream. It provides access to the attribute groups after parsing
* via getter methods.
* <p>
- * The enconding of a response is structured as follows (for an official
+ * The enconding of a response is structured as follows (for an official
* description please have a look at the RFC document mentioned above):
* <ul>
* <li>version-number - 2 bytes - required</li>
* <li>end-of-attributes-tag - 1 byte - required</li>
* <li>data - q bytes - optional</li>
* </ul>
- * </p><p>
+ * </p><p>
* Where each attribute-group (if any) is encoded as follows:
* <ul>
* <li>begin-attribute-group-tag - 1 byte</li>
* <li>attribute - p bytes - 0 or more</li>
* </ul>
- * </p><p>
+ * </p><p>
* Encoding of attributes:
* <ul>
* <li>attribute-with-one-value - q bytes</li>
* <li>additional-value - r bytes - 0 or more</li>
* </ul>
- * </p><p>
+ * </p><p>
* Encoding of attribute-with-one-value:
* <ul>
* <li>value-tag - 1 byte</li>
* <li>value-length (value is v) - 2 bytes</li>
* <li>value - v bytes</li>
* </ul>
- * </p><p>
+ * </p><p>
* Encoding of additional value:
* <ul>
* <li>value-tag - 1 byte</li>
* <li>value - w bytes</li>
* </ul>
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
class ResponseReader
{
/** The IPP version defaults to 1.1 */
private static final short VERSION = 0x0101;
-
+
/**
* Parses the inputstream containing the response of the IPP request.
* @param input the inputstream
* @throws IppException if unexpected exceptions occur.
* @throws IOException if IO problems with the underlying inputstream occur.
*/
- public void parseResponse(InputStream input)
+ public void parseResponse(InputStream input)
throws IppException, IOException
{
DataInputStream stream = new DataInputStream(input);
throw new IppException("Version mismatch - "
+ "implementation does not support other versions than IPP 1.1");
- logger.log(Component.IPP, "Statuscode: "
+ logger.log(Component.IPP, "Statuscode: "
+ Integer.toHexString(status_code) + " Request-ID: " + request_id);
byte tag = 0;
boolean proceed = true;
- HashMap tmp;
+ HashMap<Class<? extends Attribute>, Set<Attribute>> tmp;
// iterate over attribute-groups until end-of-attributes-tag is found
while (proceed)
{
proceed = false;
break;
case IppDelimiterTag.OPERATION_ATTRIBUTES_TAG:
- tmp = new HashMap();
+ tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
tag = parseAttributes(tmp, stream);
operationAttributes.add(tmp);
break;
case IppDelimiterTag.JOB_ATTRIBUTES_TAG:
- tmp = new HashMap();
+ tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
tag = parseAttributes(tmp, stream);
jobAttributes.add(tmp);
break;
case IppDelimiterTag.PRINTER_ATTRIBUTES_TAG:
- tmp = new HashMap();
+ tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
tag = parseAttributes(tmp, stream);
printerAttributes.add(tmp);
break;
case IppDelimiterTag.UNSUPPORTED_ATTRIBUTES_TAG:
System.out.println("Called");
- tmp = new HashMap();
+ tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
tag = parseAttributes(tmp, stream);
unsupportedAttributes.add(tmp);
break;
* @throws IppException if unexpected exceptions occur.
* @throws IOException if IO problems with the underlying inputstream occur.
*/
- private byte parseAttributes(Map attributes, DataInputStream stream)
+ private byte parseAttributes(Map<Class<? extends Attribute>, Set<Attribute>> attributes,
+ DataInputStream stream)
throws IppException, IOException
{
Attribute lastAttribute = null;
// (4) The value itself
value = new byte[valueLength];
- stream.read(value);
+ stream.read(value);
// the value itself
switch (tag)
case IppValueTag.UNKNOWN:
// TODO implement out-of-band handling
// We currently throw an exception to see when it occurs - not yet :-)
- throw new IppException(
+ throw new IppException(
"Unexpected name value for out-of-band value tag " + tag);
case IppValueTag.NO_VALUE:
- attribute = null;
+ attribute = null;
- break;
+ break;
case IppValueTag.INTEGER:
int intValue = IppUtilities.convertToInt(value);
attribute = IppUtilities.getIntegerAttribute(name, intValue);
// JPS API models boolean syntax type as enums
// 0x01 = true, 0x00 = false - all are enums
attribute = IppUtilities.getEnumAttribute(name, new Integer(value[0]));
-
+
break;
case IppValueTag.ENUM:
- int intVal = IppUtilities.convertToInt(value);
- attribute = IppUtilities.getEnumAttribute(name, new Integer(intVal));
+ int intVal = IppUtilities.convertToInt(value);
+ attribute = IppUtilities.getEnumAttribute(name, new Integer(intVal));
break;
case IppValueTag.OCTECTSTRING_UNSPECIFIED:
int crossFeed = IppUtilities.convertToInt(value[0], value[1], value[2], value[3]);
int feed = IppUtilities.convertToInt(value[4], value[5], value[6], value[7]);
int units = value[8];
-
+
if (name.equals("printer-resolution-default"))
attribute = new PrinterResolutionDefault(crossFeed, feed, units);
else if (name.equals("printer-resolution-supported")) // may be here also
attribute = new CopiesSupported(lower, upper);
else if (name.equals("number-up-supported"))
attribute = new NumberUpSupported(lower, upper);
- else if (name.equals("job-k-octets-supported"))
+ else if (name.equals("job-k-octets-supported"))
attribute = new JobKOctetsSupported(lower, upper);
else if (name.equals("job-impressions-supported"))
attribute = new JobImpressionsSupported(lower, upper);
case IppValueTag.NAME_WITH_LANGUAGE:
case IppValueTag.NAME_WITHOUT_LANGUAGE:
attribute = IppUtilities.getTextAttribute(name, tag, value);
-
+
break;
case IppValueTag.KEYWORD:
str = new String(value);
if (name.equals("job-hold-until-supported")) // may also be name type
attribute = new JobHoldUntilSupported(str, null);
else if (name.equals("job-hold-until-default"))
- attribute = new JobHoldUntilDefault(str, null);
+ attribute = new JobHoldUntilDefault(str, null);
else if (name.equals("media-supported"))
attribute = new MediaSupported(str, null);
else if (name.equals("media-default"))
- attribute = new MediaDefault(str, null);
- else if (name.equals("job-sheets-default"))
+ attribute = new MediaDefault(str, null);
+ else if (name.equals("job-sheets-default"))
attribute = new JobSheetsDefault(str, null);
else if (name.equals("job-sheets-supported"))
attribute = new JobSheetsSupported(str, null);
attribute = parsePrinterStateReasons(value, lastAttribute);
else
attribute = IppUtilities.getEnumAttribute(name, str);
-
- // all other stuff is either an enum or needs to be mapped to an
- // UnknownAttribute instance. Enums catched here are:
+
+ // all other stuff is either an enum or needs to be mapped to an
+ // UnknownAttribute instance. Enums catched here are:
// ipp-versions-supported, pdl-override-supported, compression-supported
// uri-authentication-supported, uri-security-supported, sides-supported
// sides-default, multiple-document-handling-supported, multiple-document-handling-default
-
+
break;
case IppValueTag.URI:
try
attribute = new PrinterDriverInstaller(uri);
else if (name.equals("printer-more-info-manufacturer"))
attribute = new PrinterMoreInfoManufacturer(uri);
-
+
break;
case IppValueTag.URI_SCHEME:
// only one uri-scheme exists - and its an enum
if (name.equals("reference-uri-schemes-supported"))
attribute = IppUtilities.getEnumAttribute(name, new String(value));
-
+
break;
case IppValueTag.CHARSET:
str = new String(value);
attribute = new CharsetConfigured(str);
else if (name.equals("charset-supported")) // setOf
attribute = new CharsetSupported(str);
-
+
break;
case IppValueTag.NATURAL_LANGUAGE:
str = new String(value);
attribute = new NaturalLanguageConfigured(str);
else if (name.equals("generated-natural-language-supported")) // setOf
attribute = new GeneratedNaturalLanguageSupported(str);
-
+
break;
case IppValueTag.MIME_MEDIA_TYPE:
str = new String(value);
attribute = new DocumentFormatSupported(str, null);
else if (name.equals("document-format")) // setOf
attribute = new DocumentFormat(str, null);
-
+
break;
default:
throw new IppException("Unknown tag with value "
}
if (attribute == null)
- attribute = new UnknownAttribute(tag, name, value);
-
+ attribute = new UnknownAttribute(tag, name, value);
+
addAttribute(attributes, attribute);
lastAttribute = attribute;
-
+
logger.log(Component.IPP, "Attribute: " + name
+ " Value: " + attribute.toString());
}
* @param attribute
* the attribute to add
*/
- private void addAttribute(Map attributeGroup, Attribute attribute)
+ private void addAttribute(Map<Class<? extends Attribute>, Set<Attribute>> attributeGroup,
+ Attribute attribute)
{
- Class clazz = attribute.getCategory();
- Set attributeValues = (Set) attributeGroup.get(clazz);
+ Class<? extends Attribute> clazz = attribute.getCategory();
+ Set<Attribute> attributeValues = attributeGroup.get(clazz);
if (attributeValues == null) // first attribute of this category
{
- attributeValues = new HashSet();
+ attributeValues = new HashSet<Attribute>();
attributeGroup.put(clazz, attributeValues);
}
attributeValues.add(attribute);
}
-
+
/**
* Parses a name with or without language attribute value from the byte[]
* and returns the result as an object[].
private PrinterStateReasons parsePrinterStateReasons(byte[] value, Attribute lastAttr)
{
String str = new String(value);
- PrinterStateReasons attribute;
-
+ PrinterStateReasons attribute;
+
if (lastAttr instanceof PrinterStateReasons)
attribute = (PrinterStateReasons) lastAttr;
else
attribute = new PrinterStateReasons();
-
+
// special case indicating no reasons
- if (str.equals("none"))
+ if (str.equals("none"))
return attribute;
-
+
Severity severity = null;
PrinterStateReason reason = null;
-
+
if (str.endsWith(Severity.WARNING.toString()))
severity = Severity.WARNING;
else if (str.endsWith(Severity.REPORT.toString()))
severity = Severity.REPORT;
else if (str.endsWith(Severity.ERROR.toString()))
severity = Severity.ERROR;
-
+
if (severity != null)
- str = str.substring(0, str.lastIndexOf('-'));
- else // we must associate a severity
+ str = str.substring(0, str.lastIndexOf('-'));
+ else // we must associate a severity
severity = Severity.REPORT;
-
- reason = (PrinterStateReason)
+
+ reason = (PrinterStateReason)
IppUtilities.getEnumAttribute("printer-state-reason", str);
-
+
attribute.put(reason , severity);
return attribute;
}
-
+
/**
* Parses a name with or without language attribute value from the byte[]
* and returns the result as an object[].
private JobStateReasons parseJobStateReasons(byte[] value, Attribute lastAttr)
{
String str = new String(value);
- JobStateReasons attribute;
-
+ JobStateReasons attribute;
+
if (lastAttr instanceof JobStateReasons)
attribute = (JobStateReasons) lastAttr;
else
attribute = new JobStateReasons();
-
+
// special case indicating no reasons
- if (str.equals("none"))
+ if (str.equals("none"))
return attribute;
-
- JobStateReason reason = (JobStateReason)
+
+ JobStateReason reason = (JobStateReason)
IppUtilities.getEnumAttribute("job-state-reason", str);
-
+
attribute.add(reason);
return attribute;
}
-
+
/**
* Parses a DateTime syntax attribute and returns the constructed Date
* object.
* <li>10 | 11 | minutes from UTC | 0..59</li>
* </ul>
* </p>
- *
+ *
* @param value the byte[]
* @return The date object.
*/
return cal.getTime();
}
}
-
+
/**
* Logger for tracing - enable by passing
* -Dgnu.classpath.debug.components=ipp to the vm.
*/
static final Logger logger = SystemLogger.SYSTEM;
-
+
URI uri;
short operation_id;
short status_code;
int request_id;
- List operationAttributes;
- List printerAttributes;
- List jobAttributes;
- List unsupportedAttributes;
+ List<Map<Class<? extends Attribute>, Set<Attribute>>> operationAttributes;
+ List<Map<Class<? extends Attribute>, Set<Attribute>>> printerAttributes;
+ List<Map<Class<? extends Attribute>, Set<Attribute>>> jobAttributes;
+ List<Map<Class<? extends Attribute>, Set<Attribute>>> unsupportedAttributes;
byte[] data;
/**
* Creates an <code>IppResponse</code> instance.
- *
+ *
* @param uri the uri the request was directy to.
* @param operation_id the operation id of the request.
*/
{
this.uri = uri;
this.operation_id = operation_id;
- operationAttributes = new ArrayList();
- jobAttributes = new ArrayList();
- printerAttributes = new ArrayList();
- unsupportedAttributes = new ArrayList();
+ operationAttributes =
+ new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
+ jobAttributes =
+ new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
+ printerAttributes =
+ new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
+ unsupportedAttributes =
+ new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
}
/**
* Sets the data received from the request sent.
- *
+ *
* @param input the input stream received.
* @throws IppException if parsing fails.
*/
* Returns the set of job attributes group maps.
* There may occur more than one group of type job attribute in a response
* because of e.g. multiple job or print service informations requested.
- *
- * @return The list of job attribute grou maps.
+ *
+ * @return The list of job attribute group maps.
*/
- public List getJobAttributes()
+ public List<Map<Class<? extends Attribute>, Set<Attribute>>> getJobAttributes()
{
return jobAttributes;
}
* Returns the set of operation attributes group maps.
* There may occur more than one group of type job attribute in a response
* because of e.g. multiple job or print service informations requested.
- *
- * @return The list of operation attribute grou maps.
+ *
+ * @return The list of operation attribute group maps.
*/
- public List getOperationAttributes()
+ public List<Map<Class<? extends Attribute>, Set<Attribute>>> getOperationAttributes()
{
return operationAttributes;
}
* Returns the set of printer attributes group maps.
* There may occur more than one group of type job attribute in a response
* because of e.g. multiple job or print service informations requested.
- *
- * @return The list of printer attribute grou maps.
+ *
+ * @return The list of printer attribute group maps.
*/
- public List getPrinterAttributes()
+ public List<Map<Class<? extends Attribute>, Set<Attribute>>> getPrinterAttributes()
{
return printerAttributes;
}
/**
* Returns the ID of the initial request.
- *
+ *
* @return The request ID.
*/
public int getRequestID()
/**
* Returns the status code of the response.
* Defined in {@link IppStatusCode}.
- *
+ *
* @return The status code.
*/
public short getStatusCode()
* Returns the set of unsupported attributes group maps.
* There may occur more than one group of type job attribute in a response
* because of e.g. multiple job or print service informations requested.
- *
- * @return The list of unsupported attribute grou maps.
+ *
+ * @return The list of unsupported attribute group maps.
*/
- public List getUnsupportedAttributes()
+ public List<Map<Class<? extends Attribute>, Set<Attribute>>> getUnsupportedAttributes()
{
return unsupportedAttributes;
}
/**
* Returns the data of the response.
- *
+ *
* @return The data as byte[].
*/
public byte[] getData()
-/* IppStatusCode.java --
+/* IppStatusCode.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.javax.print.ipp;
/**
- * IPP Status codes as described in RFC 2911 APPENDIX B
+ * IPP Status codes as described in RFC 2911 APPENDIX B
* (Status Codes and Suggested Status Code Messages)
*
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class IppStatusCode
-{
- /**
- * Indicates a successful request with no attributes being
- * ignored or substituted.
+{
+ /**
+ * Indicates a successful request with no attributes being
+ * ignored or substituted.
*/
public static final int SUCCESSFUL_OK = 0x0000;
- /**
+ /**
* Indicates a successful request, however some of the supplied
* attributes are ignored or substituted.
*/
// Client Error Status Codes
// Indicates that the client has done something wrong in its
// requests send to the IPP server object
-
+
/** Indicates a bad request e.g. malformed syntax. */
public static final int CLIENT_ERROR_BAD_REQUEST = 0x0400;
/** Indicates that the client is not authorized. */
public static final int CLIENT_ERROR_NOT_AUTHORIZED = 0x0403;
- /**
+ /**
* Indicates a request which is not possible to process.
- * For example if the request is directed at a job already finished.
+ * For example if the request is directed at a job already finished.
*/
public static final int CLIENT_ERROR_NOT_POSSIBLE = 0x0404;
/**
* Indicates that the supplied attributes or values of attributes are not
- * supported by the printer object. Returning this code depends on the
+ * supported by the printer object. Returning this code depends on the
* given "ipp-attribute-fidelity" operation attribute value.
*/
- public static final int CLIENT_ERROR_ATTRIBUTES_OR_VALUES_NOT_SUPPORTED
+ public static final int CLIENT_ERROR_ATTRIBUTES_OR_VALUES_NOT_SUPPORTED
= 0x040B;
- /**
+ /**
* Indicates the the URI scheme in a supplied print-uri or send-uri attribute
* is not supported.
- */
+ */
public static final int CLIENT_ERROR_URI_SCHEME_NOT_SUPPORTED = 0x040C;
/** Indicates that a supplied attributes-charset is not supported. */
/** Indicates that the specified algorithm is not supported. */
public static final int CLIENT_ERROR_COMPRESSION_NOT_SUPPORTED = 0x040F;
- /**
- * Indicates that the document cannot be decompressed with the client
+ /**
+ * Indicates that the document cannot be decompressed with the client
* compression algorithm specified by the client.
*/
public static final int CLIENT_ERROR_COMPRESSION_ERROR = 0x0410;
/** Indicates an error in the document format of the document. */
public static final int CLIENT_ERROR_DOCUMENT_FORMAT_ERROR = 0x0411;
- /**
- * Indicates that the document supplied via print-uri or send-uri cannot be
+ /**
+ * Indicates that the document supplied via print-uri or send-uri cannot be
* accessed by the printer object.
*/
public static final int CLIENT_ERROR_DOCUMENT_ACCESS_ERROR = 0x0412;
-
+
/** Indicates an internal server error. */
public static final int SERVER_ERROR_INTERNAL_ERROR = 0x0500;
/** Indicates that the server is currently not accepting jobs. */
public static final int SERVER_ERROR_NOT_ACCEPTING_JOBS = 0x0506;
- /**
+ /**
* Indicates that the server is currently busy with processing.
* Requests may be tried later again.
*/
public static final int SERVER_ERROR_JOB_CANCELED = 0x0508;
/** Indicates that the server does not support multidocument jobs. */
- public static final int SERVER_ERROR_MULTIPLE_DOCUMENT_JOBS_NOT_SUPPORTED
+ public static final int SERVER_ERROR_MULTIPLE_DOCUMENT_JOBS_NOT_SUPPORTED
= 0x0509;
private IppStatusCode()
- {
+ {
// not to be instantiated
}
-/* IppUtilities.java --
+/* IppUtilities.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* Also provides mapping from the attribute name values to
* the actual class object. Used to construct objects via reflection.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class IppUtilities
{
// These are reused in the reflection code to not instantiate an array everytime
private static Object[] INTEGER_ATT_VALUE = new Object[1];
- private static Class[] INTEGER_CLASS_ARRAY = new Class[] {int.class};
+ private static Class<?>[] INTEGER_CLASS_ARRAY = new Class[] {int.class};
private static Object[] TEXT_ATT_VALUE = new Object[2];
- private static Class[] TEXT_CLASS_ARRAY = new Class[] {String.class, Locale.class};
-
+ private static Class<?>[] TEXT_CLASS_ARRAY = new Class[] {String.class, Locale.class};
+
// The map -> Attribute name to Attribute class
- private static HashMap classesByName = new HashMap();
+ private static HashMap<String,Class<? extends Attribute>> classesByName =
+ new HashMap<String,Class<? extends Attribute>>();
// The map -> StandardAttribute class to SupportedAttribute category name
- private static HashMap instanceByClass = new HashMap();
+ private static HashMap<Class<? extends Attribute>,SupportedValuesAttribute> instanceByClass =
+ new HashMap<Class<? extends Attribute>,SupportedValuesAttribute>();
/**
* All the currently needed attributes
*/
static
{
- // enums
+ // enums
classesByName.put(JobState.ABORTED.getName(), JobState.class);
classesByName.put(Sides.DUPLEX.getName(), Sides.class);
classesByName.put(SheetCollate.COLLATED.getName(), SheetCollate.class);
classesByName.put(PrintQuality.DRAFT.getName(), PrintQuality.class);
classesByName.put(PrinterState.IDLE.getName(), PrinterState.class);
classesByName.put(SidesDefault.ONE_SIDED.getName(), SidesDefault.class);
- classesByName.put(ReferenceUriSchemesSupported.FILE.getName(),
- ReferenceUriSchemesSupported.class);
+ classesByName.put(ReferenceUriSchemesSupported.FILE.getName(),
+ ReferenceUriSchemesSupported.class);
classesByName.put(PrinterStateReason.DOOR_OPEN.getName(),
- PrinterStateReason.class);
- classesByName.put(PresentationDirection.TOLEFT_TOTOP.getName(),
+ PrinterStateReason.class);
+ classesByName.put(PresentationDirection.TOLEFT_TOTOP.getName(),
PresentationDirection.class);
- classesByName.put(PDLOverrideSupported.ATTEMPTED.getName(),
+ classesByName.put(PDLOverrideSupported.ATTEMPTED.getName(),
PDLOverrideSupported.class);
- classesByName.put(OrientationRequested.PORTRAIT.getName(),
+ classesByName.put(OrientationRequested.PORTRAIT.getName(),
OrientationRequested.class);
- classesByName.put(MultipleDocumentHandling.SINGLE_DOCUMENT.getName(),
+ classesByName.put(MultipleDocumentHandling.SINGLE_DOCUMENT.getName(),
MultipleDocumentHandling.class);
- classesByName.put(JobStateReason.JOB_QUEUED.getName(),
+ classesByName.put(JobStateReason.JOB_QUEUED.getName(),
JobStateReason.class);
- classesByName.put(UriAuthenticationSupported.NONE.getName(),
- UriAuthenticationSupported.class);
- classesByName.put(OperationsSupported.GET_JOBS.getName(),
- OperationsSupported.class);
- classesByName.put(UriSecuritySupported.NONE.getName(),
- UriSecuritySupported.class);
- classesByName.put(FinishingsSupported.NONE.getName(),
- FinishingsSupported.class);
- classesByName.put(FinishingsDefault.NONE.getName(),
- FinishingsDefault.class);
- classesByName.put(IppVersionsSupported.V_1_0.getName(),
- IppVersionsSupported.class);
- classesByName.put(MultipleDocumentHandlingSupported.SINGLE_DOCUMENT.getName(),
- MultipleDocumentHandlingSupported.class);
- classesByName.put(MultipleDocumentHandlingDefault.SINGLE_DOCUMENT.getName(),
- MultipleDocumentHandlingDefault.class);
- classesByName.put(CompressionSupported.NONE.getName(),
- CompressionSupported.class);
- classesByName.put(OrientationRequestedSupported.PORTRAIT.getName(),
- OrientationRequestedSupported.class);
- classesByName.put(OrientationRequestedDefault.PORTRAIT.getName(),
- OrientationRequestedDefault.class);
- classesByName.put(SidesSupported.ONE_SIDED.getName(),
- SidesSupported.class);
- classesByName.put(PrintQualityDefault.DRAFT.getName(),
- PrintQualityDefault.class);
- classesByName.put(PrintQualitySupported.DRAFT.getName(),
- PrintQualitySupported.class);
- classesByName.put(ReferenceUriSchemesSupported.FTP.getName(),
+ classesByName.put(UriAuthenticationSupported.NONE.getName(),
+ UriAuthenticationSupported.class);
+ classesByName.put(OperationsSupported.GET_JOBS.getName(),
+ OperationsSupported.class);
+ classesByName.put(UriSecuritySupported.NONE.getName(),
+ UriSecuritySupported.class);
+ classesByName.put(FinishingsSupported.NONE.getName(),
+ FinishingsSupported.class);
+ classesByName.put(FinishingsDefault.NONE.getName(),
+ FinishingsDefault.class);
+ classesByName.put(IppVersionsSupported.V_1_0.getName(),
+ IppVersionsSupported.class);
+ classesByName.put(MultipleDocumentHandlingSupported.SINGLE_DOCUMENT.getName(),
+ MultipleDocumentHandlingSupported.class);
+ classesByName.put(MultipleDocumentHandlingDefault.SINGLE_DOCUMENT.getName(),
+ MultipleDocumentHandlingDefault.class);
+ classesByName.put(CompressionSupported.NONE.getName(),
+ CompressionSupported.class);
+ classesByName.put(OrientationRequestedSupported.PORTRAIT.getName(),
+ OrientationRequestedSupported.class);
+ classesByName.put(OrientationRequestedDefault.PORTRAIT.getName(),
+ OrientationRequestedDefault.class);
+ classesByName.put(SidesSupported.ONE_SIDED.getName(),
+ SidesSupported.class);
+ classesByName.put(PrintQualityDefault.DRAFT.getName(),
+ PrintQualityDefault.class);
+ classesByName.put(PrintQualitySupported.DRAFT.getName(),
+ PrintQualitySupported.class);
+ classesByName.put(ReferenceUriSchemesSupported.FTP.getName(),
ReferenceUriSchemesSupported.class);
-
- // the boolean types
- classesByName.put(ColorSupported.SUPPORTED.getName(), ColorSupported.class);
- classesByName.put(PrinterIsAcceptingJobs.ACCEPTING_JOBS.getName(),
+
+ // the boolean types
+ classesByName.put(ColorSupported.SUPPORTED.getName(), ColorSupported.class);
+ classesByName.put(PrinterIsAcceptingJobs.ACCEPTING_JOBS.getName(),
PrinterIsAcceptingJobs.class);
- classesByName.put(MultipleDocumentJobsSupported.SUPPORTED.getName(),
+ classesByName.put(MultipleDocumentJobsSupported.SUPPORTED.getName(),
MultipleDocumentJobsSupported.class);
- classesByName.put(PageRangesSupported.SUPPORTED.getName(),
+ classesByName.put(PageRangesSupported.SUPPORTED.getName(),
PageRangesSupported.class);
-
+
// TextSyntax derived attributes
- classesByName.put("media-default", MediaDefault.class);
+ classesByName.put("media-default", MediaDefault.class);
classesByName.put("media-supported", MediaSupported.class);
- classesByName.put("media", MediaSizeName.class);
- classesByName.put("printer-location", PrinterLocation.class);
- classesByName.put("printer-info", PrinterInfo.class);
- classesByName.put("printer-make-and-model", PrinterMakeAndModel.class);
+ classesByName.put("media", MediaSizeName.class);
+ classesByName.put("printer-location", PrinterLocation.class);
+ classesByName.put("printer-info", PrinterInfo.class);
+ classesByName.put("printer-make-and-model", PrinterMakeAndModel.class);
classesByName.put("printer-state-message", PrinterStateMessage.class);
- classesByName.put("job-state-message", JobStateMessage.class);
- classesByName.put("job-sheets-default", JobSheetsDefault.class);
- classesByName.put("job-sheets-supported", JobSheetsSupported.class);
- classesByName.put("job-name", JobName.class);
- classesByName.put("printer-name", PrinterName.class);
- classesByName.put("status-message", StatusMessage.class);
- classesByName.put("detailed-status-message", DetailedStatusMessage.class);
- classesByName.put("document-access-error", DocumentAccessError.class);
- classesByName.put("output-device-assigned", OutputDeviceAssigned.class);
- classesByName.put("job-hold-until-default", JobHoldUntilDefault.class);
- classesByName.put("job-originating-user-name",
- JobOriginatingUserName.class);
- classesByName.put("job-hold-until-supported",
+ classesByName.put("job-state-message", JobStateMessage.class);
+ classesByName.put("job-sheets-default", JobSheetsDefault.class);
+ classesByName.put("job-sheets-supported", JobSheetsSupported.class);
+ classesByName.put("job-name", JobName.class);
+ classesByName.put("printer-name", PrinterName.class);
+ classesByName.put("status-message", StatusMessage.class);
+ classesByName.put("detailed-status-message", DetailedStatusMessage.class);
+ classesByName.put("document-access-error", DocumentAccessError.class);
+ classesByName.put("output-device-assigned", OutputDeviceAssigned.class);
+ classesByName.put("job-hold-until-default", JobHoldUntilDefault.class);
+ classesByName.put("job-originating-user-name",
+ JobOriginatingUserName.class);
+ classesByName.put("job-hold-until-supported",
JobHoldUntilSupported.class);
- classesByName.put("job-message-from-operator",
- JobMessageFromOperator.class);
- classesByName.put("printer-message-from-operator",
- PrinterMessageFromOperator.class);
- classesByName.put("job-detailed-status-messages",
+ classesByName.put("job-message-from-operator",
+ JobMessageFromOperator.class);
+ classesByName.put("printer-message-from-operator",
+ PrinterMessageFromOperator.class);
+ classesByName.put("job-detailed-status-messages",
JobDetailedStatusMessages.class);
- classesByName.put("job-document-access-errors",
- JobDocumentAccessErrors.class);
-
+ classesByName.put("job-document-access-errors",
+ JobDocumentAccessErrors.class);
+
// IntegerSyntax derived Attributes
- classesByName.put("copies-default", CopiesDefault.class);
- classesByName.put("job-id", JobId.class);
+ classesByName.put("copies-default", CopiesDefault.class);
+ classesByName.put("job-id", JobId.class);
classesByName.put("job-priority-supported", JobPrioritySupported.class);
classesByName.put("job-priority-default", JobPriorityDefault.class);
classesByName.put("number-up-supported", NumberUpSupported.class);
classesByName.put("number-up-default", NumberUpDefault.class);
classesByName.put("queued-job-count", QueuedJobCount.class);
- classesByName.put("printer-up-time", PrinterUpTime.class);
+ classesByName.put("printer-up-time", PrinterUpTime.class);
classesByName.put("pages-per-minute", PagesPerMinute.class);
- classesByName.put("pages-per-minute-color", PagesPerMinuteColor.class);
+ classesByName.put("pages-per-minute-color", PagesPerMinuteColor.class);
classesByName.put("job-k-octets-processed", JobKOctetsProcessed.class);
- classesByName.put("number-of-intervening-jobs",
+ classesByName.put("number-of-intervening-jobs",
NumberOfInterveningJobs.class);
- classesByName.put("job-impressions-completed",
- JobImpressionsCompleted.class);
- classesByName.put("job-media-sheets-completed",
+ classesByName.put("job-impressions-completed",
+ JobImpressionsCompleted.class);
+ classesByName.put("job-media-sheets-completed",
JobMediaSheetsCompleted.class);
- classesByName.put("multiple-operation-time-out",
+ classesByName.put("multiple-operation-time-out",
MultipleOperationTimeOut.class);
-
-
+
+
// 4.2 job template attributes
instanceByClass.put(JobPriority.class, new JobPrioritySupported(1));
instanceByClass.put(JobHoldUntil.class, new JobHoldUntilSupported("", null));
// 4.4 printer attributes
instanceByClass.put(Compression.class, CompressionSupported.COMPRESS);
}
-
+
private IppUtilities()
{
// not to be instantiated
/**
* Returns the implementing class object for given
* attribute name objects.
- *
+ *
* @param name the attribute name
* @return The <code>Class</code> object.
*/
- public static Class getClass(String name)
+ public static Class<? extends Attribute> getClass(String name)
{
- return (Class) classesByName.get(name);
+ return classesByName.get(name);
}
-
+
/**
- * Returns the name of the supported attribute
+ * Returns the name of the supported attribute
* based on the given standard attribute category.
- *
+ *
* @param clazz the standard attribute category
* @return The name of the supported attribute category.
*/
- public static String getSupportedAttrName(Class clazz)
+ public static String getSupportedAttrName(Class<? extends Attribute> clazz)
{
- return ((SupportedValuesAttribute) instanceByClass.get(clazz)).getName();
+ return instanceByClass.get(clazz).getName();
}
-
+
/**
- * Returns the category of the supported attribute
+ * Returns the category of the supported attribute
* based on the given standard attribute category.
- *
+ *
* @param clazz the standard attribute category
* @return The supported attribute category.
*/
- public static Class getSupportedCategory(Class clazz)
+ public static Class<? extends Attribute> getSupportedCategory(Class<? extends Attribute> clazz)
{
- return ((SupportedValuesAttribute) instanceByClass.get(clazz)).getCategory();
- }
+ return instanceByClass.get(clazz).getCategory();
+ }
/**
* Helper method to convert to an int.
return (((b[0] & 0xff) << 24) | ((b[1] & 0xff) << 16)
| ((b[2] & 0xff) << 8) | (b[3] & 0xff));
}
-
+
/**
* Helper method to convert to an int.
* @param b1 the 1th byte
{
return (short) ((b1 << 8) | (b2 & 0xff));
}
-
+
/**
* Instantiates an <code>EnumSyntax</code> based attribute with the given IPP
* name and the given value (Enums maybe int or String based).
- *
+ *
* @param name the attribute name of the subclass.
* @param value the integer value of the specific enum.
* @return The Attribute (a subclass of EnumSyntax)
*/
public static Attribute getEnumAttribute(String name, Object value)
{
- Class attrClass = getClass(name);
-
+ Class<?> attrClass = getClass(name);
+
// There might be unknown enums we have no mapped class for
if (attrClass == null)
- return null;
+ return null;
try
{
{
// should not happen, all fields are public
}
-
+
return null;
}
-
-
-
+
+
+
/**
- * Instantiates an <code>IntegerSyntax</code> based attribute with the
+ * Instantiates an <code>IntegerSyntax</code> based attribute with the
* given IPP name for the given int value.
- *
+ *
* @param name the attribute name of the subclass.
* @param value the integer value
* @return The Attribute (a subclass of IntegerSyntax)
*/
public static Attribute getIntegerAttribute(String name, int value)
- {
- Class attrClass = getClass(name);
-
+ {
+ Class<?> attrClass = getClass(name);
+
// There might be unknown attributes we have no mapped class for
if (attrClass == null)
return null;
try
{
- INTEGER_ATT_VALUE[0] = new Integer(value);
- Constructor c = attrClass.getDeclaredConstructor(INTEGER_CLASS_ARRAY);
- return (Attribute) c.newInstance(INTEGER_ATT_VALUE);
+ INTEGER_ATT_VALUE[0] = Integer.valueOf(value);
+ Constructor<?> c = attrClass.getDeclaredConstructor(INTEGER_CLASS_ARRAY);
+ return (Attribute) c.newInstance(INTEGER_ATT_VALUE);
}
catch (SecurityException e)
{
{
// should not happen, all fields are public
}
-
+
return null;
- }
-
+ }
+
/**
* Instantiates an <code>TextSyntax</code> based attribute with the given
* IPP name for the given text value (will be decoded).
- *
+ *
* @param name the attribute name of the subclass.
* @param tag the tag defined in {@link IppValueTag}
* @param value the byte[] value to be decoded based on the tag value.
* @return The Attribute (a subclass of TextSyntax)
*/
public static Attribute getTextAttribute(String name, byte tag, byte[] value)
- {
+ {
// without language tag is rather easy - default locale
if (tag == IppValueTag.NAME_WITHOUT_LANGUAGE
|| tag == IppValueTag.TEXT_WITHOUT_LANGUAGE)
String language = new String(tmp);
String text = new String(tmp2);
Locale locale = null;
-
+
if (language.length() > 2)
locale = new Locale(language.substring(0, 2), language.substring(3));
else
TEXT_ATT_VALUE[0] = text;
TEXT_ATT_VALUE[1] = locale;
- }
-
- Class attrClass = getClass(name);
-
+ }
+
+ Class<?> attrClass = getClass(name);
+
// There might be unknown attributes we have no mapped class for
if (attrClass == null)
return null;
try
{
- Constructor c = attrClass.getDeclaredConstructor(TEXT_CLASS_ARRAY);
- return (Attribute) c.newInstance(TEXT_ATT_VALUE);
+ Constructor<?> c = attrClass.getDeclaredConstructor(TEXT_CLASS_ARRAY);
+ return (Attribute) c.newInstance(TEXT_ATT_VALUE);
}
catch (SecurityException e)
{
{
// should not happen, all fields are public
}
-
+
return null;
}
}
-/* IppValueTag.java --
+/* IppValueTag.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* Attributes are always of a special type syntax (e.g. boolean or
* interger attribute). These value types are specified by the tag
* constants provided in this class. Beside the syntax types some
- * out of band values for reporting requested attributes as
+ * out of band values for reporting requested attributes as
* unsupported, unknown etc. back to the client.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class IppValueTag
-{
-
+{
+
/** Out of band value for unsupported attributes. */
public static final byte UNSUPPORTED = 0x10;
-
+
// 0x11 reserved for 'default' for definition in a future
- // IETF standards track document
-
+ // IETF standards track document
+
/** Out of band value for unknown attributes. */
public static final byte UNKNOWN = 0x12;
-
+
/** Out of band value for attribute without a value. */
public static final byte NO_VALUE = 0x13;
-
+
// 0x14-0x1F reserved for "out-of-band" values in future IETF
// standards track documents.
-
+
// 0x20 reserved for definition in a future IETF
// standards track document
-
+
/** Indicates a value of syntax type integer. */
public static final byte INTEGER = 0x21;
-
+
/** Indicates a value of syntax type boolean. */
public static final byte BOOLEAN = 0x22;
-
+
/** Indicates a value of syntax type enum (enumeration). */
public static final byte ENUM = 0x23;
-
+
// 0x24-0x2F reserved for integer types for definition in
// future IETF standards track documents
/** Indicates a value of syntax type octect string. */
public static final byte OCTECTSTRING_UNSPECIFIED = 0x30;
-
+
/** Indicates a value of syntax type datetime. */
public static final byte DATETIME = 0x31;
-
+
/** Indicates a value of syntax type resolution. */
public static final byte RESOLUTION = 0x32;
-
+
/** Indicates a value of syntax type range of integers. */
public static final byte RANGEOFINTEGER = 0x33;
-
+
// 0x34 reserved for definition in a future IETF
// standards track document
-
+
/** Indicates a value of syntax type text with language. */
public static final byte TEXT_WITH_LANGUAGE = 0x35;
-
+
/** Indicates a value of syntax type name with language. */
public static final byte NAME_WITH_LANGUAGE = 0x36;
-
+
// 0x37-0x3F reserved for octetString type definitions in
// future IETF standards track documents
// 0x40 reserved for definition in a future IETF
// standards track document
-
+
/** Indicates a value of syntax type text without language. */
public static final byte TEXT_WITHOUT_LANGUAGE = 0x41;
-
+
/** Indicates a value of syntax type name without language. */
public static final byte NAME_WITHOUT_LANGUAGE = 0x42;
-
+
// 0x43 reserved for definition in a future IETF
// standards track document
-
+
/** Indicates a value of syntax type keyword. */
- public static final byte KEYWORD = 0x44;
-
+ public static final byte KEYWORD = 0x44;
+
/** Indicates a value of syntax type URI. */
- public static final byte URI = 0x45;
-
+ public static final byte URI = 0x45;
+
/** Indicates a value of syntax type URI scheme. */
public static final byte URI_SCHEME = 0x46;
-
+
/** Indicates a value of syntax type charset. */
- public static final byte CHARSET = 0x47;
-
+ public static final byte CHARSET = 0x47;
+
/** Indicates a value of syntax type language. */
- public static final byte NATURAL_LANGUAGE =0x48;
-
+ public static final byte NATURAL_LANGUAGE =0x48;
+
/** Indicates a value of syntax type mime media. */
public static final byte MIME_MEDIA_TYPE = 0x49;
{
// not to be instantiated;
}
-
+
/**
- * Tests if given value corresponds to a
+ * Tests if given value corresponds to a
* value tag value.
- *
+ *
* @param value the value to test for
* @return <code>true</code> if, <code>false</code> otherwise.
*/
- public static boolean isValueTag(byte value)
+ public static boolean isValueTag(byte value)
{
if(value == 0x10 || value == 0x12 || value == 0x13
|| value == 0x21 || value == 0x22 || value == 0x23
|| value == 0x45 || value == 0x46 || value == 0x47
|| value == 0x48 || value == 0x49 )
return true;
-
+
return false;
}
-
+
}
import javax.print.attribute.PrintRequestAttributeSet;
/**
- * Implementation of the MultiDocPrintJob interface. Implementation
+ * Implementation of the MultiDocPrintJob interface. Implementation
* is specific to the <code>IppPrintService</code> implementation.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public class MultiDocPrintJobImpl extends DocPrintJobImpl
+public class MultiDocPrintJobImpl extends DocPrintJobImpl
implements MultiDocPrintJob
{
/**
* Constructor forwarding arguments to the super constructor.
- *
+ *
* @param service the print service instance.
* @param user the user of this print service.
* @param passwd the password of the user.
-/* CharsetSyntax.java --
+/* CharsetSyntax.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.io.Serializable;
/**
- * <code>CharsetSyntax</code> is the abstract base class of all attribute
+ * <code>CharsetSyntax</code> is the abstract base class of all attribute
* classes which provide a charset (US-ASCII) string as value.
*
* @author Wolfgang Baer (WBaer@gmx.de)
{
if (value == null)
throw new NullPointerException("value may not be null");
-
+
this.value = value;
}
if (! (obj instanceof CharsetSyntax))
return false;
- CharsetSyntax tmp = (CharsetSyntax) obj;
+ CharsetSyntax tmp = (CharsetSyntax) obj;
return value.equals(tmp.getValue());
}
/**
* Returns a string representing the object. The returned
* string is the underlying text value of this object.
- *
+ *
* @return The string representation.
*/
public String toString()
-/* DefaultValueAttribute.java --
+/* DefaultValueAttribute.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import javax.print.attribute.Attribute;
/**
- * Marker interface for all attribute classes describing attributes
+ * Marker interface for all attribute classes describing attributes
* providing default values. Often there exist a sequence of an
* attribute name like: Name - > Name-default -> Name-supported.
*
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public interface DefaultValueAttribute extends Attribute
-{
+{
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
public Attribute getAssociatedAttribute();
-/* DetailedStatusMessage.java --
+/* DetailedStatusMessage.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* DetailedStatusMessage attribute as described in RFC 2911 section
- * 3.1.6 Operation Response Status Codes and Status Message
+ * 3.1.6 Operation Response Status Codes and Status Message
* provides a short description of the status of the operation.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class DetailedStatusMessage extends TextSyntax
+public final class DetailedStatusMessage extends TextSyntax
implements Attribute
{
*
* @return The class <code>DetailedStatusMessage</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return DetailedStatusMessage.class;
}
-/* DocumentAccessError.java --
+/* DocumentAccessError.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* DocumentAccessError attribute as described in RFC 2911 section
- * 3.1.6 Operation Response Status Codes and Status Message
+ * 3.1.6 Operation Response Status Codes and Status Message
* provides additional information for document access errors.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class DocumentAccessError extends TextSyntax
+public final class DocumentAccessError extends TextSyntax
implements Attribute
{
*
* @return The class <code>DocumentAccessError</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return DocumentAccessError.class;
}
-/* NaturalLanguageSyntax.java --
+/* NaturalLanguageSyntax.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.io.Serializable;
/**
- * <code>NaturalLanguageSyntax</code> is the abstract base class of all
- * attribute classes which provide a natural language (US-ASCII)
+ * <code>NaturalLanguageSyntax</code> is the abstract base class of all
+ * attribute classes which provide a natural language (US-ASCII)
* string as value.
*
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public abstract class NaturalLanguageSyntax
+public abstract class NaturalLanguageSyntax
implements Cloneable, Serializable
{
private final String value;
{
if (value == null)
throw new NullPointerException("value may not be null");
-
+
this.value = value;
}
if (! (obj instanceof NaturalLanguageSyntax))
return false;
- NaturalLanguageSyntax tmp = (NaturalLanguageSyntax) obj;
+ NaturalLanguageSyntax tmp = (NaturalLanguageSyntax) obj;
return value.equals(tmp.getValue());
}
/**
* Returns a string representing the object. The returned
* string is the underlying text value of this object.
- *
+ *
* @return The string representation.
*/
public String toString()
-/* RequestedAttributes.java --
+/* RequestedAttributes.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* <code>RequestedAttributes</code> specifies the requested
* attributes in an IPP request operation.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class RequestedAttributes implements Attribute
{
- private ArrayList attributes;
+ private ArrayList<String> attributes;
/**
- * Creates a <code>RequestedAttributes</code> object with
+ * Creates a <code>RequestedAttributes</code> object with
* the initial value.
*
* @param value the string for the ipp name
{
if (value == null)
throw new NullPointerException();
-
- attributes = new ArrayList();
+
+ attributes = new ArrayList<String>();
attributes.add(value);
}
-
+
/**
* Adds the IPP name value to the set.
- *
+ *
* @param value the string for the ipp name
*/
public void addValue(String value)
{
attributes.add(value);
}
-
+
/**
* Returns the values.
- *
+ *
* @return The values as list.
*/
- public List getValues()
+ public String[] getValues()
{
- return attributes;
+ return attributes.toArray(new String[attributes.size()]);
}
/**
*
* @return The class <code>DocumentFormat</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return RequestedAttributes.class;
}
public String toString()
{
CPStringBuilder b = new CPStringBuilder();
-
+
if (attributes.size() > 0)
b.append(attributes.get(0));
-
+
for (int i=1; i < attributes.size(); i++)
b.append(", " + attributes.get(i));
-
+
return b.toString();
- }
+ }
}
-/* StatusMessage.java --
+/* StatusMessage.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* StatusMessage attribute as described in RFC 2911 section
- * 3.1.6 Operation Response Status Codes and Status Message
+ * 3.1.6 Operation Response Status Codes and Status Message
* provides a short description of the status of the operation.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class StatusMessage extends TextSyntax implements Attribute
*
* @return The class <code>StatusMessage</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return StatusMessage.class;
}
-/* UnknownAttribute.java --
+/* UnknownAttribute.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* UnknownAttribute holds all the parsed Attribute information.
* It provides methods to get the value-tag, name and value.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class UnknownAttribute implements Attribute
/**
* Creates a <code>UnknownAttribute</code> object with the given values.
*
- * @param tag the value tag
+ * @param tag the value tag
* @param name the attribute name
* @param value the byte[] with the value
*/
*
* @return The class <code>UnknownAttribute</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return UnknownAttribute.class;
}
{
return name;
}
-
+
/**
* Returns the value tag
* @return The tag.
- *
+ *
* @see gnu.javax.print.ipp.IppValueTag
*/
public byte getValueTag()
{
return tag;
}
-
+
/**
* Returns the name of the attribute.
* @return The name.
{
return name;
}
-
+
/**
* Returns the attribute value origin byte array.
* @return The value.
{
return value;
}
-
+
/**
* Returns the attribute value decoded as String.
* @return The value as String.
{
return new String(value);
}
-
+
/**
* Returns the attribute value decoded as int.
* @return The value as int.
{
return IppUtilities.convertToInt(value);
}
-
+
/**
* Returns the attribute value decoded as an URI.
* @return The value as URI.
* Provides a string representation for some default
* tag types (e.g. int, rangeofinteger, string, uri).
* For other more complex types "No conversion found."
- * is returned.
+ * is returned.
*/
public String toString()
{
case IppValueTag.INTEGER:
return "" + getAttributeValueAsInt();
case IppValueTag.RANGEOFINTEGER:
- int lower = IppUtilities.convertToInt(value[0], value[1],
+ int lower = IppUtilities.convertToInt(value[0], value[1],
value[2], value[3]);
- int upper = IppUtilities.convertToInt(value[4], value[5],
+ int upper = IppUtilities.convertToInt(value[4], value[5],
value[6], value[7]);
return lower + "-" + upper;
case IppValueTag.URI:
default:
return "No conversion found.";
}
- }
+ }
}
-/* CopiesDefault.java --
+/* CopiesDefault.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* <code>CopiesDefault</code> provides the default value
* for the copies attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class CopiesDefault extends IntegerSyntax
implements DefaultValueAttribute
{
-
+
/**
* Creates a <code>CopiesDefault</code> object.
*
if (value < 1)
throw new IllegalArgumentException("value may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
*
* @return The class <code>CopiesDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return CopiesDefault.class;
}
{
return "copies-default";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
* <p>May return null if no value exists in JPS API.</p>
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return new Copies(getValue());
}
-/* DocumentFormatDefault.java --
+/* DocumentFormatDefault.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* <code>DocumentFormatDefault</code> specifies the default document
* format of a printer.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*
*/
-public final class DocumentFormatDefault extends TextSyntax
+public final class DocumentFormatDefault extends TextSyntax
implements DefaultValueAttribute
{
/**
- * Creates a <code>DocumentFormatDefault</code> object with the
+ * Creates a <code>DocumentFormatDefault</code> object with the
* given value and locale.
*
* @param value the value for this syntax
*
* @return The class <code>DocumentFormatDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return DocumentFormatDefault.class;
}
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return new DocumentFormat(getValue(), getLocale());
}
-
+
}
/**
* The <code>FinishingsDefault</code> attribute provides the supported
* values for finishings of a job.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class FinishingsDefault extends EnumSyntax
/** No finishing. */
public static final FinishingsDefault NONE = new FinishingsDefault(3);
-
+
/** Staple the document(s) */
public static final FinishingsDefault STAPLE = new FinishingsDefault(4);
-
+
/** Cover a document */
public static final FinishingsDefault COVER = new FinishingsDefault(6);
-
+
/**
* This value indicates that a binding is to be applied to the document.
* The type and placement of the binding is site-defined.
*/
public static final FinishingsDefault BIND = new FinishingsDefault(7);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches)
- * along the middle fold.
+ * Bind the document(s) with one or more staples (wire stitches)
+ * along the middle fold.
*/
public static final FinishingsDefault SADDLE_STITCH = new FinishingsDefault(8);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches)
- * along one edge.
+ * Bind the document(s) with one or more staples (wire stitches)
+ * along one edge.
*/
public static final FinishingsDefault EDGE_STITCH = new FinishingsDefault(9);
-
- /**
- * Bind the document(s) with one or more staples in the top left
- * corner.
+
+ /**
+ * Bind the document(s) with one or more staples in the top left
+ * corner.
*/
public static final FinishingsDefault STAPLE_TOP_LEFT = new FinishingsDefault(20);
-
- /**
- * Bind the document(s) with one or more staples in the bottom
- * left corner.
+
+ /**
+ * Bind the document(s) with one or more staples in the bottom
+ * left corner.
*/
public static final FinishingsDefault STAPLE_BOTTOM_LEFT = new FinishingsDefault(21);
-
+
/**
* Bind the document(s) with one or more staples in the top right corner.
*/
public static final FinishingsDefault STAPLE_TOP_RIGHT = new FinishingsDefault(22);
-
+
/**
* Bind the document(s) with one or more staples in the bottom right corner.
*/
public static final FinishingsDefault STAPLE_BOTTOM_RIGHT = new FinishingsDefault(23);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches)
+ * Bind the document(s) with one or more staples (wire stitches)
* along the left edge.
*/
public static final FinishingsDefault EDGE_STITCH_LEFT = new FinishingsDefault(24);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches) along
+ * Bind the document(s) with one or more staples (wire stitches) along
* the top edge.
*/
public static final FinishingsDefault EDGE_STITCH_TOP = new FinishingsDefault(25);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches) along
+ * Bind the document(s) with one or more staples (wire stitches) along
* the right edge.
*/
public static final FinishingsDefault EDGE_STITCH_RIGHT = new FinishingsDefault(26);
-
+
/**
* Bind the document(s) with one or more staples (wire stitches) along
- * the bottom edge.
+ * the bottom edge.
*/
public static final FinishingsDefault EDGE_STITCH_BOTTOM = new FinishingsDefault(27);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* left edge assuming a portrait document.
*/
public static final FinishingsDefault STAPLE_DUAL_LEFT = new FinishingsDefault(28);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* top edge assuming a portrait document.
*/
public static final FinishingsDefault STAPLE_DUAL_TOP = new FinishingsDefault(29);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* right edge assuming a portrait document.
*/
public static final FinishingsDefault STAPLE_DUAL_RIGHT = new FinishingsDefault(30);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* bottom edge assuming a portrait document.
*/
public static final FinishingsDefault STAPLE_DUAL_BOTTOM = new FinishingsDefault(31);
- private static final String[] stringTable = { "none", "staple", null,
+ private static final String[] stringTable = { "none", "staple", null,
"cover", "bind", "saddle-stitch",
"edge-stitch", null, null, null,
null, null, null, null, null,
null, null, "staple-top-left",
- "staple-bottom-left",
- "staple-top-right",
+ "staple-bottom-left",
+ "staple-top-right",
"staple-bottom-right",
"edge-stitch-left",
"edge-stitch-top",
"staple-dual-top",
"staple-dual-right",
"staple-dual-bottom" };
-
- private static final FinishingsDefault[] enumValueTable = { NONE, STAPLE, null,
- COVER, BIND,
+
+ private static final FinishingsDefault[] enumValueTable = { NONE, STAPLE, null,
+ COVER, BIND,
SADDLE_STITCH,
- EDGE_STITCH, null,
- null, null, null,
- null, null, null,
- null, null, null,
+ EDGE_STITCH, null,
+ null, null, null,
+ null, null, null,
+ null, null, null,
STAPLE_TOP_LEFT,
STAPLE_BOTTOM_LEFT,
STAPLE_TOP_RIGHT,
STAPLE_DUAL_TOP,
STAPLE_DUAL_RIGHT,
STAPLE_DUAL_BOTTOM };
-
+
/**
* Constructs a <code>FinishingsDefault</code> object.
- *
+ *
* @param value the value
*/
protected FinishingsDefault(int value)
*
* @return the class <code>FinishingsDefault</code> itself
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return FinishingsDefault.class;
}
{
return "finishings-default";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return 3;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return IppUtilities.getEnumAttribute("finishings", new Integer(getValue()));
}
-/* JobHoldUntilDefault.java --
+/* JobHoldUntilDefault.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* JobHoldUntilDefault attribute provides the default value
* for the attribute type job-hold-until.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class JobHoldUntilDefault extends TextSyntax
+public final class JobHoldUntilDefault extends TextSyntax
implements DefaultValueAttribute
{
-
- // a keyword/name based attribute in IPP
+
+ // a keyword/name based attribute in IPP
// can be extended by administrators
// standard values are predefined
-
+
/** Job should be printed immediately. */
- public static final JobHoldUntilDefault NO_HOLD =
+ public static final JobHoldUntilDefault NO_HOLD =
new JobHoldUntilDefault("no-hold", null);
-
+
/** Job should be hold indefinitely. */
- public static final JobHoldUntilDefault INDEFINITE =
+ public static final JobHoldUntilDefault INDEFINITE =
new JobHoldUntilDefault("indefinite", null);
-
+
/** Job should be processed during the day. */
- public static final JobHoldUntilDefault DAY_TIME =
+ public static final JobHoldUntilDefault DAY_TIME =
new JobHoldUntilDefault("day-time", null);
-
+
/** Job should be processed in the evening. */
- public static final JobHoldUntilDefault EVENING =
+ public static final JobHoldUntilDefault EVENING =
new JobHoldUntilDefault("evening", null);
-
+
/** Job should be processed during night. */
- public static final JobHoldUntilDefault NIGHT =
+ public static final JobHoldUntilDefault NIGHT =
new JobHoldUntilDefault("night", null);
-
+
/** Job should be processed during the weekend. */
- public static final JobHoldUntilDefault WEEKEND =
+ public static final JobHoldUntilDefault WEEKEND =
new JobHoldUntilDefault("weekend", null);
-
- /**
- * Job should be processed as second-shift
- * (after close of business).
+
+ /**
+ * Job should be processed as second-shift
+ * (after close of business).
*/
- public static final JobHoldUntilDefault SECOND_SHIFT =
+ public static final JobHoldUntilDefault SECOND_SHIFT =
new JobHoldUntilDefault("second-shift", null);
-
- /**
- * Job should be processed as third-shift
- * (after midnight).
+
+ /**
+ * Job should be processed as third-shift
+ * (after midnight).
*/
- public static final JobHoldUntilDefault THIRD_SHIFT =
- new JobHoldUntilDefault("third-shift", null);
+ public static final JobHoldUntilDefault THIRD_SHIFT =
+ new JobHoldUntilDefault("third-shift", null);
/**
- * Creates a <code>JobHoldUntilDefault</code> object with the
+ * Creates a <code>JobHoldUntilDefault</code> object with the
* given value and locale.
*
* @param value the value for this syntax
*
* @return The class <code>JobHoldUntilDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobHoldUntilDefault.class;
}
{
return "job-hold-until-default";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
// FIXME Same Mapping problem as in IppPrintService
return new JobHoldUntil(new Date());
-/* JobPriorityDefault.java --
+/* JobPriorityDefault.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* JobPriorityDefault attribute provides the default value of
* the printer object for the job-priority attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class JobPriorityDefault extends IntegerSyntax
implements DefaultValueAttribute
{
-
+
/**
* Creates a <code>JobPriorityDefault</code> object.
*
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
*
* @return The class <code>JobPriorityDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobPriorityDefault.class;
}
{
return "job-priority-default";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return new JobPriority(getValue());
}
-/* JobSheetsDefault.java --
+/* JobSheetsDefault.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* JobSheetsDefault attribute provides the default value of
* the printer object for the job-sheets attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class JobSheetsDefault extends TextSyntax
+public final class JobSheetsDefault extends TextSyntax
implements DefaultValueAttribute
{
- //a keyword/name based attribute in IPP
+ //a keyword/name based attribute in IPP
// can be extended by administrators
// standard values are predefined
-
+
/** No job sheet is the default */
- public static final JobSheetsDefault NONE =
+ public static final JobSheetsDefault NONE =
new JobSheetsDefault("none", Locale.getDefault());
-
+
/** A job sheet is the default */
- public static final JobSheetsDefault STANDARD =
+ public static final JobSheetsDefault STANDARD =
new JobSheetsDefault("standard", Locale.getDefault());
-
+
/**
- * Creates a <code>JobSheetsDefault</code> object with the
+ * Creates a <code>JobSheetsDefault</code> object with the
* given value and locale.
*
* @param value the value for this syntax
{
super(value, locale);
}
-
+
/**
* Returns category of this class.
*
* @return The class <code>JobSheetsDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobSheetsDefault.class;
}
{
return "job-sheets-default";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
* <p>May return null if no value exists in JPS API.</p>
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
if (this.equals(JobSheetsDefault.NONE))
return JobSheets.NONE;
if (this.equals(JobSheetsDefault.STANDARD))
return JobSheets.STANDARD;
-
+
return null;
}
-/* MediaDefault.java --
+/* MediaDefault.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* MediaDefault attribute provides the default value of
* the printer object for the media attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class MediaDefault extends TextSyntax
+public final class MediaDefault extends TextSyntax
implements DefaultValueAttribute
{
-
+
/**
- * Creates a <code>MediaDefault</code> object with the
+ * Creates a <code>MediaDefault</code> object with the
* given value and locale.
*
* @param value the value for this syntax
{
super(value, locale);
}
-
+
/**
* Returns category of this class.
*
* @return The class <code>MediaDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return MediaDefault.class;
}
{
return "media-default";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return IppUtilities.getEnumAttribute("media" , getValue());
}
/**
* <code>MultipleDocumentHandlingDefault</code> provides the
* default value for the MultipleDocumentHandling attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class MultipleDocumentHandlingDefault extends EnumSyntax
implements DefaultValueAttribute
{
-
+
//a keyword based attribute in IPP - int values just starting at 0
-
- /**
- * Supports only multiple documents treated as a single document. This
+
+ /**
+ * Supports only multiple documents treated as a single document. This
* applies to attributes which specify treatment of multiple document jobs.
*/
public static final MultipleDocumentHandlingDefault SINGLE_DOCUMENT =
new MultipleDocumentHandlingDefault(0);
-
+
/** Supports multiple documents as uncollated copies */
public static final MultipleDocumentHandlingDefault SEPARATE_DOCUMENTS_UNCOLLATED_COPIES =
new MultipleDocumentHandlingDefault(1);
-
+
/** Supports multiple documents as collated copies */
public static final MultipleDocumentHandlingDefault SEPARATE_DOCUMENTS_COLLATED_COPIES =
new MultipleDocumentHandlingDefault(2);
-
- /**
+
+ /**
* Supports multiple documents where every single document starts
- * with a new sheet.
+ * with a new sheet.
*/
public static final MultipleDocumentHandlingDefault SINGLE_DOCUMENT_NEW_SHEET =
new MultipleDocumentHandlingDefault(3);
- private static final String[] stringTable = { "single-document",
+ private static final String[] stringTable = { "single-document",
"separate-documents-uncollated-copies",
"separate-documents-collated-copies",
"single-document-new-sheet" };
-
- private static final MultipleDocumentHandlingDefault[] enumValueTable =
+
+ private static final MultipleDocumentHandlingDefault[] enumValueTable =
{ SINGLE_DOCUMENT, SEPARATE_DOCUMENTS_UNCOLLATED_COPIES,
SEPARATE_DOCUMENTS_COLLATED_COPIES, SINGLE_DOCUMENT_NEW_SHEET};
-
+
/**
* Constructs a <code>MultipleDocumentHandlingDefault</code> object.
- *
+ *
* @param value the enum value
*/
protected MultipleDocumentHandlingDefault(int value)
*
* @return The class <code>MultipleDocumentHandlingDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return MultipleDocumentHandlingDefault.class;
}
{
return "multiple-document-handling-default";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
- return IppUtilities.getEnumAttribute("multiple-document-handling",
+ return IppUtilities.getEnumAttribute("multiple-document-handling",
new Integer(getValue()));
}
}
-/* NumberUpDefault.java --
+/* NumberUpDefault.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* NumberUpDefault attribute provides the default value of
* the numper up attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class NumberUpDefault extends IntegerSyntax
implements DefaultValueAttribute
{
-
+
/**
* Creates a <code>NumberUpDefault</code> object.
*
{
super(value);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
*
* @return The class <code>NumberUpDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return NumberUpDefault.class;
}
{
return "number-up-default";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
* <p>May return null if no value exists in JPS API.</p>
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return new NumberUp(getValue());
}
/**
- * The <code>OrientationRequestedDefault</code> attribute provides
+ * The <code>OrientationRequestedDefault</code> attribute provides
* the default value for the job attribute orientation-requested.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class OrientationRequestedDefault extends EnumSyntax
implements DefaultValueAttribute
{
-
+
/** Orientation as portrait. */
public static final OrientationRequestedDefault PORTRAIT =
new OrientationRequestedDefault(3);
-
+
/** Orientation as landscape. */
public static final OrientationRequestedDefault LANDSCAPE =
new OrientationRequestedDefault(4);
-
+
/** Orientation as reversed landscape. */
public static final OrientationRequestedDefault REVERSE_LANDSCAPE =
new OrientationRequestedDefault(5);
-
+
/** Orientation as reversed portrait. */
public static final OrientationRequestedDefault REVERSE_PORTRAIT =
new OrientationRequestedDefault(6);
private static final String[] stringTable = { "portrait", "landscape",
"reverse-landscape",
"reverse-portrait" };
-
- private static final OrientationRequestedDefault[]
- enumValueTable = { PORTRAIT, LANDSCAPE,
+
+ private static final OrientationRequestedDefault[]
+ enumValueTable = { PORTRAIT, LANDSCAPE,
REVERSE_LANDSCAPE, REVERSE_PORTRAIT };
-
+
/**
* Constructs a <code>OrientationRequestedDefault</code> object.
- *
+ *
* @param value the value
*/
protected OrientationRequestedDefault(int value)
*
* @return The class <code>OrientationRequestedDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return OrientationRequestedDefault.class;
}
{
return "orientation-requested-default";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the lowest used value by the enumerations of this class.
* .
{
return 3;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
- return IppUtilities.getEnumAttribute("orientation-requested",
+ return IppUtilities.getEnumAttribute("orientation-requested",
new Integer(getValue()));
}
}
/**
* <code>PrintQualityDefault</code> provides the
* default value for the print-quality attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PrintQualityDefault extends EnumSyntax
{
/** Draft quality of the printer. */
public static final PrintQualityDefault DRAFT = new PrintQualityDefault(3);
-
+
/** Normal quality of the printer. */
public static final PrintQualityDefault NORMAL = new PrintQualityDefault(4);
-
+
/** High quality of the printer. */
public static final PrintQualityDefault HIGH = new PrintQualityDefault(5);
private static final String[] stringTable = { "draft", "normal", "high" };
-
+
private static final PrintQualityDefault[] enumValueTable = { DRAFT, NORMAL, HIGH };
-
+
/**
* Constructs a <code>PrintQualityDefault</code> object.
- *
+ *
* @param value the value of the enum
*/
protected PrintQualityDefault(int value)
*
* @return The class <code>PrintQualityDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrintQualityDefault.class;
}
{
return "print-quality-default";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the lowest used value by the enumerations of this class.
* .
{
return 3;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return IppUtilities.getEnumAttribute(
"print-quality", new Integer(getValue()));
/**
- * The <code>PrinterResolutionDefault</code> attribute provides
+ * The <code>PrinterResolutionDefault</code> attribute provides
* the default value for the job attribute printer-resolution.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PrinterResolutionDefault extends ResolutionSyntax
implements DefaultValueAttribute
{
-
+
/**
* Creates a <code>ResolutionSyntax</code> object with the given arguments.
*
{
super(crossFeedResolution, feedResolution, units);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if(! (obj instanceof PrinterResolutionDefault))
return false;
-
+
return super.equals(obj);
}
*
* @return The class <code>PrinterResolutionDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrinterResolutionDefault.class;
}
{
return "printer-resolution-default";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
- return new PrinterResolution(getCrossFeedResolutionDphi(),
+ return new PrinterResolution(getCrossFeedResolutionDphi(),
getFeedResolutionDphi(), 1);
}
}
/**
* <code>SidesDefault</code> provides the
* default for the sides attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class SidesDefault extends EnumSyntax
implements DefaultValueAttribute
{
-
+
/** Specifies that each page should be printed on one sheet. */
public static final SidesDefault ONE_SIDED = new SidesDefault(0);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the long edge.
*/
- public static final SidesDefault TWO_SIDED_LONG_EDGE =
+ public static final SidesDefault TWO_SIDED_LONG_EDGE =
new SidesDefault(1);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the short edge.
*/
- public static final SidesDefault TWO_SIDED_SHORT_EDGE =
+ public static final SidesDefault TWO_SIDED_SHORT_EDGE =
new SidesDefault(2);
-
+
/** An alias constant for "two sided long edge". */
public static final SidesDefault DUPLEX = new SidesDefault(1);
-
+
/** An alias constant for "two sided short edge". */
public static final SidesDefault TUMBLE = new SidesDefault(2);
- private static final String[] stringTable = { "one-sided",
+ private static final String[] stringTable = { "one-sided",
"two-sided-long-edge",
"two-sided-short-edge" };
-
- private static final SidesDefault[] enumValueTable = { ONE_SIDED,
- TWO_SIDED_LONG_EDGE,
+
+ private static final SidesDefault[] enumValueTable = { ONE_SIDED,
+ TWO_SIDED_LONG_EDGE,
TWO_SIDED_SHORT_EDGE };
-
-
+
+
/**
* Creates a <code>SidesDefault</code> object.
*
*
* @return The class <code>SidesDefault</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return SidesDefault.class;
}
{
return "sides-default";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this DefaultValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Attribute getAssociatedAttribute()
+ public Attribute getAssociatedAttribute()
{
return IppUtilities.getEnumAttribute("sides", new Integer(getValue()));
}
* AttributesCharset attribute as described in RFC 2911 chapter
* 3.1.4 Character Set and Natural Language Operation Attributes.
* <p>
- * This operation attribute identifies the charset used by any text
+ * This operation attribute identifies the charset used by any text
* and name attribute supplied by the client in the request. This
* charset must be used by the printer object in the response.<br>
* All clients and IPP objects must support the 'utf-8' charset.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class AttributesCharset extends CharsetSyntax
+public final class AttributesCharset extends CharsetSyntax
implements Attribute
{
-
+
/** Defines a default UTF-8 charset instance */
public static final AttributesCharset UTF8 = new AttributesCharset("utf-8");
/**
* Creates a <code>AttributesCharset</code> object.
- *
+ *
* @param value the charset string value.
*/
public AttributesCharset(String value)
*
* @return The class <code>AttributesCharset</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return AttributesCharset.class;
}
-/* AttributesNaturalLanguage.java --
+/* AttributesNaturalLanguage.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* <p>
* This operation attribute identifies the natural language used
* by any text and name attribute supplied by the client in the request.
- * The printer object should use this natural language for the response
+ * The printer object should use this natural language for the response
* to this request.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class AttributesNaturalLanguage extends NaturalLanguageSyntax
+public final class AttributesNaturalLanguage extends NaturalLanguageSyntax
implements Attribute
{
-
+
/** Defines the default language EN */
- public static final AttributesNaturalLanguage EN =
+ public static final AttributesNaturalLanguage EN =
new AttributesNaturalLanguage("en");
/**
* Creates a <code>AttributesNaturalLanguage</code> object.
- *
+ *
* @param value the language string value.
*/
public AttributesNaturalLanguage(String value)
*
* @return The class <code>AttributesNaturalLanguage</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return AttributesNaturalLanguage.class;
}
-/* JobDetailedStatusMessages.java --
+/* JobDetailedStatusMessages.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* JobDetailedStatusMessages provides additional detailed and
* technical job informations.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class JobDetailedStatusMessages
+public final class JobDetailedStatusMessages
extends TextSyntax implements Attribute
{
*
* @return The class <code>JobDetailedStatusMessages</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobDetailedStatusMessages.class;
}
-/* JobDocumentAccessErrors.java --
+/* JobDocumentAccessErrors.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* JobDocumentAccessErrors provides additional information
* for each access error for print-uri or document-uri jobs.
* technical job informations.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class JobDocumentAccessErrors
+public final class JobDocumentAccessErrors
extends TextSyntax implements Attribute
{
*
* @return The class <code>JobDocumentAccessErrors</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobDocumentAccessErrors.class;
}
-/* JobId.java --
+/* JobId.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* The <code>JobId</code> attribute contains the ID of a
* print job created or currently being processed.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class JobId extends IntegerSyntax implements Attribute
public JobId(int value)
{
super(value);
-
+
if (value < 1)
throw new IllegalArgumentException("job-id may not be less than 1");
}
*
* @return The class <code>JobId</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobId.class;
}
-/* JobMoreInfo.java --
+/* JobMoreInfo.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* JobMoreInfo attribute as described in RFC 2911 section
* 4.3.4 contains the URI where more information about a job
* (e.g. through a HTML page) can be found.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class JobMoreInfo extends URISyntax implements Attribute
*
* @return The class <code>JobMoreInfo</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobMoreInfo.class;
}
-/* JobPrinterUri.java --
+/* JobPrinterUri.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* JobPrinterUri attribute as described in RFC 2911 section
* 4.3.3 contains the URI of the printer which created and
* processes a job.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class JobPrinterUri extends URISyntax implements Attribute
*
* @return The class <code>JobPrinterUri</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobPrinterUri.class;
}
-/* JobStateMessage.java --
+/* JobStateMessage.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* JobStateMessage attribute describes information about the
* job-state and job-state-reasons in human readable form.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class JobStateMessage
+public final class JobStateMessage
extends TextSyntax implements Attribute
{
*
* @return The class <code>JobStateMessage</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobStateMessage.class;
}
-/* JobUri.java --
+/* JobUri.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* JobUri attribute as described in RFC 2911 section
* 4.3.1 contains the URI for a job generated by the printer
* after a create request.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class JobUri extends URISyntax implements Attribute
*
* @return The class <code>JobUri</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobUri.class;
}
-/* CharsetConfigured.java --
+/* CharsetConfigured.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* CharsetConfigured attribute as described in RFC 2911 section
* 4.4.17 provides the charset which is configured by the
* server to be used in the name and text syntax attribute types.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class CharsetConfigured extends CharsetSyntax
+public final class CharsetConfigured extends CharsetSyntax
implements Attribute
{
/**
* Creates a <code>CharsetConfigured</code> object.
- *
+ *
* @param value the charset string value.
*/
public CharsetConfigured(String value)
*
* @return The class <code>CharsetConfigured</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return CharsetConfigured.class;
}
-/* DocumentFormat.java --
+/* DocumentFormat.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.util.Locale;
import javax.print.DocFlavor;
+import javax.print.attribute.Attribute;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.TextSyntax;
/**
* <code>DocumentFormatSupported</code> specifies the supported document
* formats of a printer. Printer are supplying a set of this attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class DocumentFormat extends TextSyntax
+public final class DocumentFormat extends TextSyntax
implements SupportedValuesAttribute
{
/**
- * Creates a <code>DocumentFormat</code> object with the
+ * Creates a <code>DocumentFormat</code> object with the
* given value and locale.
*
* @param value the value for this syntax
{
super(value, locale);
}
-
+
/**
* Constructs a document format object for the given flavor.
* The constructor reworkes the mimetype of the given flavor
* to remove the quoted charset parameter if present.
- *
+ *
* @param flavor the flavor with the mimetype
* @return The created document format.
*/
String mimetype = flavor.getMediaType() + "/" + flavor.getMediaSubtype();
if (charset != null)
mimetype += "; charset=" + charset;
-
+
return new DocumentFormat(mimetype, null);
}
*
* @return The class <code>DocumentFormat</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return DocumentFormat.class;
}
-/* MultipleOperationTimeOut.java --
+/* MultipleOperationTimeOut.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* 4.4.31 provides the minimum time ins second a printer object waits
* before time out and recovery. The printer object waits e.g. for
* additional SendDocument or SendUri operations.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class MultipleOperationTimeOut extends IntegerSyntax
+public final class MultipleOperationTimeOut extends IntegerSyntax
implements Attribute
{
*
* @return The class <code>MultipleOperationTimeOut</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return MultipleOperationTimeOut.class;
}
-/* NaturalLanguageConfigured.java --
+/* NaturalLanguageConfigured.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import javax.print.attribute.Attribute;
/**
- * NaturalLanguageConfigured attribute as described in RFC 2911
+ * NaturalLanguageConfigured attribute as described in RFC 2911
* section 4.4.19 provides the natural language which is configured
* by the server to be used in the name and text syntax attribute types.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class NaturalLanguageConfigured extends NaturalLanguageSyntax
+public final class NaturalLanguageConfigured extends NaturalLanguageSyntax
implements Attribute
{
/**
* Creates a <code>NaturalLanguageConfigured</code> object.
- *
+ *
* @param value the charset string value.
*/
public NaturalLanguageConfigured(String value)
*
* @return The class <code>NaturalLanguageConfigured</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return NaturalLanguageConfigured.class;
}
-/* PrinterCurrentTime.java --
+/* PrinterCurrentTime.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.util.Date;
+import javax.print.attribute.Attribute;
import javax.print.attribute.DateTimeSyntax;
import javax.print.attribute.PrintServiceAttribute;
* 4.4.30 provides the current time of the print service.
* Its to be used by other attributes like the date-time-at-xxx
* attributes in the creation process.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class PrinterCurrentTime extends DateTimeSyntax
+public final class PrinterCurrentTime extends DateTimeSyntax
implements PrintServiceAttribute
{
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
return super.equals(obj);
}
-
+
/**
* Returns category of this class.
*
* @return The class <code>PrinterCurrentTime</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrinterCurrentTime.class;
}
-/* PrinterDriverInstaller.java --
+/* PrinterDriverInstaller.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* PrinterDriverInstaller attribute as described in RFC 2911 section
* 4.4.81 provides the URI where a printer driver installer
* can be found.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class PrinterDriverInstaller extends URISyntax
+public final class PrinterDriverInstaller extends URISyntax
implements Attribute
{
*
* @return The class <code>PrinterDriverInstaller</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrinterDriverInstaller.class;
}
-/* PrinterStateMessage.java --
+/* PrinterStateMessage.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.util.Locale;
+import javax.print.attribute.Attribute;
import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
* 4.4.13 provides a textual representation of the attributes
* printer-state and printer-state-reasons for consumption by
* humans.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class PrinterStateMessage extends TextSyntax
+public final class PrinterStateMessage extends TextSyntax
implements PrintServiceAttribute
{
/**
- * Creates a <code>PrinterStateMessage</code> object with the
+ * Creates a <code>PrinterStateMessage</code> object with the
* given value and locale.
*
* @param value the value for this syntax
*
* @return The class <code>PrinterStateMessage</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrinterStateMessage.class;
}
-/* PrinterUpTime.java --
+/* PrinterUpTime.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* PrinterUpTime attribute as described in RFC 2911 section
* 4.4.29 provides the uptime of the printer object. This
- * is a value in second starting at 1 after a initialization
+ * is a value in second starting at 1 after a initialization
* or reboot of the printer object.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class PrinterUpTime extends IntegerSyntax
+public final class PrinterUpTime extends IntegerSyntax
implements Attribute
{
*
* @return The class <code>PrinterUpTime</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrinterUpTime.class;
}
-/* CharsetSupported.java --
+/* CharsetSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import gnu.javax.print.ipp.attribute.CharsetSyntax;
+import javax.print.attribute.Attribute;
import javax.print.attribute.SupportedValuesAttribute;
/**
* CharsetSupported attribute as described in RFC 2911 section
* 4.4.18 provides the charset which are supported by the
- * IPP implementation to be used in the name and text syntax
+ * IPP implementation to be used in the name and text syntax
* attribute types.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class CharsetSupported extends CharsetSyntax
+public final class CharsetSupported extends CharsetSyntax
implements SupportedValuesAttribute
{
/**
* Creates a <code>CharsetSupported</code> object.
- *
+ *
* @param value the charset string value.
*/
public CharsetSupported(String value)
*
* @return The class <code>CharsetSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return CharsetSupported.class;
}
import java.util.Iterator;
import java.util.Set;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.standard.Compression;
/**
* <code>CompressionSupported</code> provides the values which are
* supported for the compression attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class CompressionSupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
/** The print data is not compressed. */
public static final CompressionSupported NONE = new CompressionSupported(0);
-
+
/** The print data is ZIP compressed. */
public static final CompressionSupported DEFLATE = new CompressionSupported(1);
-
+
/** The print data is GNU Zip compressed. */
public static final CompressionSupported GZIP = new CompressionSupported(2);
-
+
/** The print data is UNIX compressed. */
public static final CompressionSupported COMPRESS = new CompressionSupported(3);
-
- private static final String[] stringTable = { "none", "deflate",
+
+ private static final String[] stringTable = { "none", "deflate",
"gzip", "compress" };
-
- private static final CompressionSupported[] enumValueTable = { NONE, DEFLATE,
+
+ private static final CompressionSupported[] enumValueTable = { NONE, DEFLATE,
GZIP, COMPRESS };
/**
* Constructs a <code>CompressionSupported</code> object.
- *
+ *
* @param value the enum value
*/
protected CompressionSupported(int value)
*
* @return The class <code>CompressionSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return CompressionSupported.class;
}
{
return "compression-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Compression getAssociatedAttribute()
+ public Compression getAssociatedAttribute()
{
return (Compression) IppUtilities.getEnumAttribute(
"compression", new Integer(getValue()));
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
- *
+ *
* @see #getAssociatedAttribute()
*/
- public static Compression[] getAssociatedAttributeArray(Set set)
+ public static Compression[]
+ getAssociatedAttributeArray(Set<Attribute> set)
{
- CompressionSupported tmp;
- Compression[] result = new Compression[set.size()];
- Iterator it = set.iterator();
+ Compression[] result = new Compression[set.size()];
int j = 0;
- while (it.hasNext())
+ for (Attribute tmp : set)
{
- tmp = (CompressionSupported) it.next();
- result[j] = tmp.getAssociatedAttribute();
+ result[j] = ((CompressionSupported) tmp).getAssociatedAttribute();
j++;
- }
+ }
return result;
}
}
-/* DocumentFormatSupported.java --
+/* DocumentFormatSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.util.Locale;
+import javax.print.attribute.Attribute;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.TextSyntax;
/**
* <code>DocumentFormatSupported</code> specifies the supported document
* formats of a printer. Printer are supplying a set of this attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class DocumentFormatSupported extends TextSyntax
+public final class DocumentFormatSupported extends TextSyntax
implements SupportedValuesAttribute
{
/**
- * Creates a <code>DocumentFormatSupported</code> object with the
+ * Creates a <code>DocumentFormatSupported</code> object with the
* given value and locale.
*
* @param value the value for this syntax
*
* @return The class <code>DocumentFormatSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return DocumentFormatSupported.class;
}
import java.util.Iterator;
import java.util.Set;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.standard.Finishings;
/**
* The <code>FinishingsSupported</code> attribute provides the supported
* values for finishings of a job.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class FinishingsSupported extends EnumSyntax
/** No finishing. */
public static final FinishingsSupported NONE = new FinishingsSupported(3);
-
+
/** Staple the document(s) */
public static final FinishingsSupported STAPLE = new FinishingsSupported(4);
-
+
/** Cover a document */
public static final FinishingsSupported COVER = new FinishingsSupported(6);
-
+
/**
* This value indicates that a binding is to be applied to the document.
* The type and placement of the binding is site-defined.
*/
public static final FinishingsSupported BIND = new FinishingsSupported(7);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches)
- * along the middle fold.
+ * Bind the document(s) with one or more staples (wire stitches)
+ * along the middle fold.
*/
- public static final FinishingsSupported SADDLE_STITCH =
+ public static final FinishingsSupported SADDLE_STITCH =
new FinishingsSupported(8);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches)
- * along one edge.
+ * Bind the document(s) with one or more staples (wire stitches)
+ * along one edge.
*/
- public static final FinishingsSupported EDGE_STITCH =
+ public static final FinishingsSupported EDGE_STITCH =
new FinishingsSupported(9);
-
- /**
- * Bind the document(s) with one or more staples in the top left
- * corner.
+
+ /**
+ * Bind the document(s) with one or more staples in the top left
+ * corner.
*/
- public static final FinishingsSupported STAPLE_TOP_LEFT =
+ public static final FinishingsSupported STAPLE_TOP_LEFT =
new FinishingsSupported(20);
-
- /**
- * Bind the document(s) with one or more staples in the bottom
- * left corner.
+
+ /**
+ * Bind the document(s) with one or more staples in the bottom
+ * left corner.
*/
- public static final FinishingsSupported STAPLE_BOTTOM_LEFT =
+ public static final FinishingsSupported STAPLE_BOTTOM_LEFT =
new FinishingsSupported(21);
-
+
/**
* Bind the document(s) with one or more staples in the top right corner.
*/
- public static final FinishingsSupported STAPLE_TOP_RIGHT =
+ public static final FinishingsSupported STAPLE_TOP_RIGHT =
new FinishingsSupported(22);
-
+
/**
* Bind the document(s) with one or more staples in the bottom right corner.
*/
- public static final FinishingsSupported STAPLE_BOTTOM_RIGHT =
+ public static final FinishingsSupported STAPLE_BOTTOM_RIGHT =
new FinishingsSupported(23);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches)
+ * Bind the document(s) with one or more staples (wire stitches)
* along the left edge.
*/
- public static final FinishingsSupported EDGE_STITCH_LEFT =
+ public static final FinishingsSupported EDGE_STITCH_LEFT =
new FinishingsSupported(24);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches) along
+ * Bind the document(s) with one or more staples (wire stitches) along
* the top edge.
*/
- public static final FinishingsSupported EDGE_STITCH_TOP =
+ public static final FinishingsSupported EDGE_STITCH_TOP =
new FinishingsSupported(25);
-
+
/**
- * Bind the document(s) with one or more staples (wire stitches) along
+ * Bind the document(s) with one or more staples (wire stitches) along
* the right edge.
*/
- public static final FinishingsSupported EDGE_STITCH_RIGHT =
+ public static final FinishingsSupported EDGE_STITCH_RIGHT =
new FinishingsSupported(26);
-
+
/**
* Bind the document(s) with one or more staples (wire stitches) along
- * the bottom edge.
+ * the bottom edge.
*/
- public static final FinishingsSupported EDGE_STITCH_BOTTOM =
+ public static final FinishingsSupported EDGE_STITCH_BOTTOM =
new FinishingsSupported(27);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* left edge assuming a portrait document.
*/
- public static final FinishingsSupported STAPLE_DUAL_LEFT =
+ public static final FinishingsSupported STAPLE_DUAL_LEFT =
new FinishingsSupported(28);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* top edge assuming a portrait document.
*/
- public static final FinishingsSupported STAPLE_DUAL_TOP =
+ public static final FinishingsSupported STAPLE_DUAL_TOP =
new FinishingsSupported(29);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* right edge assuming a portrait document.
*/
- public static final FinishingsSupported STAPLE_DUAL_RIGHT =
+ public static final FinishingsSupported STAPLE_DUAL_RIGHT =
new FinishingsSupported(30);
-
+
/**
- * Bind the document(s) with two staples (wire stitches) along the
+ * Bind the document(s) with two staples (wire stitches) along the
* bottom edge assuming a portrait document.
*/
- public static final FinishingsSupported STAPLE_DUAL_BOTTOM =
+ public static final FinishingsSupported STAPLE_DUAL_BOTTOM =
new FinishingsSupported(31);
- private static final String[] stringTable = { "none", "staple", null,
+ private static final String[] stringTable = { "none", "staple", null,
"cover", "bind", "saddle-stitch",
"edge-stitch", null, null, null,
null, null, null, null, null,
null, null, "staple-top-left",
- "staple-bottom-left",
- "staple-top-right",
+ "staple-bottom-left",
+ "staple-top-right",
"staple-bottom-right",
"edge-stitch-left",
"edge-stitch-top",
"staple-dual-top",
"staple-dual-right",
"staple-dual-bottom" };
-
- private static final FinishingsSupported[] enumValueTable = { NONE, STAPLE,
- null, COVER, BIND,
+
+ private static final FinishingsSupported[] enumValueTable = { NONE, STAPLE,
+ null, COVER, BIND,
SADDLE_STITCH,
- EDGE_STITCH, null,
- null, null, null,
- null, null, null,
- null, null, null,
+ EDGE_STITCH, null,
+ null, null, null,
+ null, null, null,
+ null, null, null,
STAPLE_TOP_LEFT,
STAPLE_BOTTOM_LEFT,
STAPLE_TOP_RIGHT,
STAPLE_DUAL_TOP,
STAPLE_DUAL_RIGHT,
STAPLE_DUAL_BOTTOM };
-
+
/**
* Constructs a <code>FinishingsSupported</code> object.
- *
+ *
* @param value the value
*/
protected FinishingsSupported(int value)
*
* @return the class <code>FinishingsSupported</code> itself
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return FinishingsSupported.class;
}
{
return "finishings-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return 3;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public Finishings getAssociatedAttribute()
+ public Finishings getAssociatedAttribute()
{
return (Finishings) IppUtilities.getEnumAttribute(
"finishings", new Integer(getValue()));
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
- *
+ *
* @see #getAssociatedAttribute()
*/
- public static Finishings[] getAssociatedAttributeArray(Set set)
+ public static Finishings[]
+ getAssociatedAttributeArray(Set<Attribute> set)
{
- FinishingsSupported tmp;
- Finishings[] result = new Finishings[set.size()];
- Iterator it = set.iterator();
+ Finishings[] result = new Finishings[set.size()];
int j = 0;
- while (it.hasNext())
+ for (Attribute tmp : set)
{
- tmp = (FinishingsSupported) it.next();
- result[j] = tmp.getAssociatedAttribute();
+ result[j] = ((FinishingsSupported) tmp).getAssociatedAttribute();
j++;
- }
+ }
return result;
}
}
-/* GeneratedNaturalLanguageSupported.java --
+/* GeneratedNaturalLanguageSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import gnu.javax.print.ipp.attribute.NaturalLanguageSyntax;
+import javax.print.attribute.Attribute;
import javax.print.attribute.SupportedValuesAttribute;
/**
- * GeneratedNaturalLanguageSupported attribute as described
+ * GeneratedNaturalLanguageSupported attribute as described
* in RFC 2911 section 4.4.20 provides the natural languages
- * which are supported by the IPP implementation to be used
+ * which are supported by the IPP implementation to be used
* in the name and text syntax attribute types.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class GeneratedNaturalLanguageSupported
- extends NaturalLanguageSyntax
+public final class GeneratedNaturalLanguageSupported
+ extends NaturalLanguageSyntax
implements SupportedValuesAttribute
{
/**
* Creates a <code>GeneratedNaturalLanguageSupported</code> object.
- *
+ *
* @param value the charset string value.
*/
public GeneratedNaturalLanguageSupported(String value)
*
* @return The class <code>GeneratedNaturalLanguageSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return GeneratedNaturalLanguageSupported.class;
}
-/* IppVersionsSupported.java --
+/* IppVersionsSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.javax.print.ipp.attribute.supported;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
* IppVersionsSupported attribute as described in RFC 2911 section
* 4.4.14 provides the value(s) (implemented as EnumSyntax)
* of the supported IPP versions.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class IppVersionsSupported extends EnumSyntax
+public final class IppVersionsSupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
// a keyword based attribute in IPP - int values just starting at 0
-
+
/** IPP version 1.0 */
- public static final IppVersionsSupported V_1_0 =
+ public static final IppVersionsSupported V_1_0 =
new IppVersionsSupported(0);
-
+
/** IPP version 1.1 */
- public static final IppVersionsSupported V_1_1 =
+ public static final IppVersionsSupported V_1_1 =
new IppVersionsSupported(1);
-
+
private static final String[] stringTable = { "1.0", "1.1" };
-
- private static final IppVersionsSupported[] enumValueTable = { V_1_0,
+
+ private static final IppVersionsSupported[] enumValueTable = { V_1_0,
V_1_1 };
/**
* Constructs a <code>IppVersionsSupported</code> object.
- *
+ *
* @param value the enum value
*/
public IppVersionsSupported(int value)
}
/**
- * Returns category of this class.
+ * Returns the category of this class.
*
* @return The class <code>IppVersionsSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return IppVersionsSupported.class;
}
{
return "ipp-versions-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
-/* JobHoldUntilSupported.java --
+/* JobHoldUntilSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.util.Locale;
+import javax.print.attribute.Attribute;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.TextSyntax;
/**
* JobHoldUntilSupported attribute provides the supported
* values for the attribute type job-hold-until.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class JobHoldUntilSupported extends TextSyntax
+public final class JobHoldUntilSupported extends TextSyntax
implements SupportedValuesAttribute
{
-
- // a keyword/name based attribute in IPP
+
+ // a keyword/name based attribute in IPP
// can be extended by administrators
// standard values are predefined
-
+
/** Job should be printed immediately. */
- public static final JobHoldUntilSupported NO_HOLD =
+ public static final JobHoldUntilSupported NO_HOLD =
new JobHoldUntilSupported("no-hold", null);
-
+
/** Job should be hold indefinitely. */
- public static final JobHoldUntilSupported INDEFINITE =
+ public static final JobHoldUntilSupported INDEFINITE =
new JobHoldUntilSupported("indefinite", null);
-
+
/** Job should be processed during the day. */
- public static final JobHoldUntilSupported DAY_TIME =
+ public static final JobHoldUntilSupported DAY_TIME =
new JobHoldUntilSupported("day-time", null);
-
+
/** Job should be processed in the evening. */
- public static final JobHoldUntilSupported EVENING =
+ public static final JobHoldUntilSupported EVENING =
new JobHoldUntilSupported("evening", null);
-
+
/** Job should be processed during night. */
- public static final JobHoldUntilSupported NIGHT =
+ public static final JobHoldUntilSupported NIGHT =
new JobHoldUntilSupported("night", null);
-
+
/** Job should be processed during the weekend. */
- public static final JobHoldUntilSupported WEEKEND =
+ public static final JobHoldUntilSupported WEEKEND =
new JobHoldUntilSupported("weekend", null);
-
- /**
- * Job should be processed as second-shift
- * (after close of business).
+
+ /**
+ * Job should be processed as second-shift
+ * (after close of business).
*/
- public static final JobHoldUntilSupported SECOND_SHIFT =
+ public static final JobHoldUntilSupported SECOND_SHIFT =
new JobHoldUntilSupported("second-shift", null);
-
- /**
- * Job should be processed as third-shift
- * (after midnight).
+
+ /**
+ * Job should be processed as third-shift
+ * (after midnight).
*/
- public static final JobHoldUntilSupported THIRD_SHIFT =
- new JobHoldUntilSupported("third-shift", null);
+ public static final JobHoldUntilSupported THIRD_SHIFT =
+ new JobHoldUntilSupported("third-shift", null);
/**
- * Creates a <code>JobHoldUntilSupported</code> object with the
+ * Creates a <code>JobHoldUntilSupported</code> object with the
* given value and locale.
*
* @param value the value for this syntax
*
* @return The class <code>JobHoldUntilSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobHoldUntilSupported.class;
}
-/* JobSheetsSupported.java --
+/* JobSheetsSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* JobSheetsSupported attribute provides the supported values
* of the job-sheets attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class JobSheetsSupported extends TextSyntax
+public final class JobSheetsSupported extends TextSyntax
implements SupportedValuesAttribute
{
- //a keyword/name based attribute in IPP
+ //a keyword/name based attribute in IPP
// can be extended by administrators
// standard values are predefined
-
+
/** No job sheet is the default */
- public static final JobSheetsDefault NONE =
+ public static final JobSheetsDefault NONE =
new JobSheetsDefault("none", Locale.getDefault());
-
+
/** A job sheet is the default */
- public static final JobSheetsDefault STANDARD =
+ public static final JobSheetsDefault STANDARD =
new JobSheetsDefault("standard", Locale.getDefault());
-
+
/**
- * Creates a <code>JobSheetsSupported</code> object with the
+ * Creates a <code>JobSheetsSupported</code> object with the
* given value and locale.
*
* @param value the value for this syntax
{
super(value, locale);
}
-
+
/**
* Returns category of this class.
*
* @return The class <code>JobSheetsSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return JobSheetsSupported.class;
}
{
return "job-sheets-supported";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
* <p>May return null if no value exists in JPS API.</p>
- *
+ *
* @return The enum of the standard attribute class.
*/
- public JobSheets getAssociatedAttribute()
+ public JobSheets getAssociatedAttribute()
{
if (this.equals(JobSheetsDefault.NONE))
return JobSheets.NONE;
if (this.equals(JobSheetsDefault.STANDARD))
return JobSheets.STANDARD;
-
+
return null;
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
- *
+ *
* @see #getAssociatedAttribute()
*/
- public static JobSheets[] getAssociatedAttributeArray(Set set)
+ public static JobSheets[]
+ getAssociatedAttributeArray(Set<Attribute> set)
{
- JobSheetsSupported tmp;
- ArrayList result = new ArrayList();
- Iterator it = set.iterator();
+ ArrayList<JobSheets> result = new ArrayList<JobSheets>();
int j = 0;
- while (it.hasNext())
+ for (Attribute tmp : set)
{
- tmp = (JobSheetsSupported) it.next();
- Attribute att = tmp.getAssociatedAttribute();
+ JobSheets att = ((JobSheetsSupported) tmp).getAssociatedAttribute();
if (att != null)
result.add(att);
j++;
- }
- return (JobSheets[]) result.toArray(new JobSheets[result.size()]);
+ }
+ return result.toArray(new JobSheets[result.size()]);
}
-
+
}
-/* MediaSupported.java --
+/* MediaSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.util.Locale;
import java.util.Set;
+import javax.print.attribute.Attribute;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.TextSyntax;
import javax.print.attribute.standard.Media;
/**
* MediaSupported attribute provides the keyword values
* of the media types supported by the printer object.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class MediaSupported extends TextSyntax
+public final class MediaSupported extends TextSyntax
implements SupportedValuesAttribute
{
/**
- * Creates a <code>MediaSupported</code> object with the
+ * Creates a <code>MediaSupported</code> object with the
* given value and locale.
*
* @param value the value for this syntax
*
* @return The class <code>MediaSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return MediaSupported.class;
}
{
return "media-supported";
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
*/
- public static Media[] getAssociatedAttributeArray(Set set)
+ public static Media[] getAssociatedAttributeArray(Set<Attribute> set)
{
- MediaSupported tmp;
Media tmp2;
- ArrayList result = new ArrayList();
- Iterator it = set.iterator();
- while (it.hasNext())
+ ArrayList<Media> result = new ArrayList<Media>();
+ for (Attribute tmp : set)
{
- tmp = (MediaSupported) it.next();
tmp2 = (Media) IppUtilities.getEnumAttribute("media", tmp.toString());
if (tmp2 != null)
result.add(tmp2);
- }
- return (Media[]) result.toArray(new Media[result.size()]);
+ }
+ return result.toArray(new Media[result.size()]);
}
}
import java.util.Iterator;
import java.util.Set;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.standard.MultipleDocumentHandling;
/**
* <code>MultipleDocumentHandlingSupported</code> provides the
* supported values for the MultipleDocumentHandling attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class MultipleDocumentHandlingSupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
//a keyword based attribute in IPP - int values just starting at 0
-
- /**
- * Supports only multiple documents treated as a single document. This
+
+ /**
+ * Supports only multiple documents treated as a single document. This
* applies to attributes which specify treatment of multiple document jobs.
*/
public static final MultipleDocumentHandlingSupported SINGLE_DOCUMENT =
new MultipleDocumentHandlingSupported(0);
-
+
/** Supports multiple documents as uncollated copies */
public static final MultipleDocumentHandlingSupported SEPARATE_DOCUMENTS_UNCOLLATED_COPIES =
new MultipleDocumentHandlingSupported(1);
-
+
/** Supports multiple documents as collated copies */
public static final MultipleDocumentHandlingSupported SEPARATE_DOCUMENTS_COLLATED_COPIES =
new MultipleDocumentHandlingSupported(2);
-
- /**
+
+ /**
* Supports multiple documents where every single document starts
- * with a new sheet.
+ * with a new sheet.
*/
public static final MultipleDocumentHandlingSupported SINGLE_DOCUMENT_NEW_SHEET =
new MultipleDocumentHandlingSupported(3);
- private static final String[] stringTable = { "single-document",
+ private static final String[] stringTable = { "single-document",
"separate-documents-uncollated-copies",
"separate-documents-collated-copies",
"single-document-new-sheet" };
-
- private static final MultipleDocumentHandlingSupported[] enumValueTable =
+
+ private static final MultipleDocumentHandlingSupported[] enumValueTable =
{ SINGLE_DOCUMENT, SEPARATE_DOCUMENTS_UNCOLLATED_COPIES,
SEPARATE_DOCUMENTS_COLLATED_COPIES, SINGLE_DOCUMENT_NEW_SHEET};
-
+
/**
* Constructs a <code>MultipleDocumentHandlingSupported</code> object.
- *
+ *
* @param value the enum value
*/
protected MultipleDocumentHandlingSupported(int value)
*
* @return The class <code>MultipleDocumentHandlingSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return MultipleDocumentHandlingSupported.class;
}
{
return "multiple-document-handling-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public MultipleDocumentHandling getAssociatedAttribute()
+ public MultipleDocumentHandling getAssociatedAttribute()
{
return (MultipleDocumentHandling) IppUtilities.getEnumAttribute(
"multiple-document-handling", new Integer(getValue()));
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
- *
+ *
* @see #getAssociatedAttribute()
*/
- public static MultipleDocumentHandling[] getAssociatedAttributeArray(Set set)
+ public static MultipleDocumentHandling[]
+ getAssociatedAttributeArray(Set<Attribute> set)
{
- MultipleDocumentHandlingSupported tmp;
- MultipleDocumentHandling[] result = new MultipleDocumentHandling[set.size()];
- Iterator it = set.iterator();
+ MultipleDocumentHandling[] result = new MultipleDocumentHandling[set.size()];
int j = 0;
- while (it.hasNext())
+ for (Attribute tmp : set)
{
- tmp = (MultipleDocumentHandlingSupported) it.next();
- result[j] = tmp.getAssociatedAttribute();
+ result[j] = ((MultipleDocumentHandlingSupported) tmp).getAssociatedAttribute();
j++;
- }
+ }
return result;
}
}
-/* MultipleDocumentJobsSupported.java --
+/* MultipleDocumentJobsSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.javax.print.ipp.attribute.supported;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
/**
* <code>MultipleDocumentJobsSupported</code> specifies if a printer
* supported multiple documents in one job.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public class MultipleDocumentJobsSupported extends EnumSyntax
+public class MultipleDocumentJobsSupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
/** Multiple documents per job are not supported. */
- public static final MultipleDocumentJobsSupported NOT_SUPPORTED =
+ public static final MultipleDocumentJobsSupported NOT_SUPPORTED =
new MultipleDocumentJobsSupported(0);
-
+
/** Multiple documents per job are supported. */
- public static final MultipleDocumentJobsSupported SUPPORTED =
+ public static final MultipleDocumentJobsSupported SUPPORTED =
new MultipleDocumentJobsSupported(1);
private static final String[] stringTable = { "not-supported", "supported" };
-
- private static final MultipleDocumentJobsSupported[] enumValueTable =
+
+ private static final MultipleDocumentJobsSupported[] enumValueTable =
{ NOT_SUPPORTED, SUPPORTED };
-
+
/**
* Constructs a <code>MultipleDocumentJobsSupported</code> object.
- *
+ *
* @param value the enum value
*/
protected MultipleDocumentJobsSupported(int value)
*
* @return The class <code>MultipleDocumentJobsSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return MultipleDocumentJobsSupported.class;
}
{
return "multiple-document-jobs-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
-/* OperationsSupported.java --
+/* OperationsSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.javax.print.ipp.attribute.supported;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
* <code>OperationsSupported</code> specifies the enums of the operations
* supported by a given printer or job object. The attribute is further
* specified in RFC 2911 section 4.4.15.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class OperationsSupported extends EnumSyntax
+public final class OperationsSupported extends EnumSyntax
implements SupportedValuesAttribute
-{
+{
/*
* Value Operation Name
----------------- -------------------------------------
0x0013-0x3FFF reserved for future IETF standards track operations
0x4000-0x8FFF reserved for vendor extensions
*/
-
+
// standard ipp 1.1 operations
- /**
+ /**
* Operation to print a job in one request/response. */
- public static final OperationsSupported PRINT_JOB =
+ public static final OperationsSupported PRINT_JOB =
new OperationsSupported(0x02);
-
+
/** Operation to print a document from an URI */
- public static final OperationsSupported PRINT_URI =
+ public static final OperationsSupported PRINT_URI =
new OperationsSupported(0x03);
-
+
/** Operation to validate a job before submission. */
- public static final OperationsSupported VALIDATE_JOB =
+ public static final OperationsSupported VALIDATE_JOB =
new OperationsSupported(0x04);
-
- /**
- * Operation to create an initial job for use with multiple document per job.
+
+ /**
+ * Operation to create an initial job for use with multiple document per job.
*/
- public static final OperationsSupported CREATE_JOB =
+ public static final OperationsSupported CREATE_JOB =
new OperationsSupported(0x05);
-
- /**
- * Operation to send a document to a multidoc job created via CREATE_JOB
+
+ /**
+ * Operation to send a document to a multidoc job created via CREATE_JOB
*/
- public static final OperationsSupported SEND_DOCUMENT =
+ public static final OperationsSupported SEND_DOCUMENT =
new OperationsSupported(0x06);
-
- /**
- * Operation to send a document uri to a multidoc job created
- * via CREATE_JOB. The document accessible from this URI will be printed.
+
+ /**
+ * Operation to send a document uri to a multidoc job created
+ * via CREATE_JOB. The document accessible from this URI will be printed.
*/
- public static final OperationsSupported SEND_URI =
+ public static final OperationsSupported SEND_URI =
new OperationsSupported(0x07);
-
+
/** Operation to cancel a job by its ID or name. */
- public static final OperationsSupported CANCEL_JOB =
+ public static final OperationsSupported CANCEL_JOB =
new OperationsSupported(0x08);
-
+
/** Operation to get job attributes of a current job. */
- public static final OperationsSupported GET_JOB_ATTRIBUTES =
+ public static final OperationsSupported GET_JOB_ATTRIBUTES =
new OperationsSupported(0x09);
-
+
/** Operation to pause a printer. */
- public static final OperationsSupported PAUSE_PRINTER =
+ public static final OperationsSupported PAUSE_PRINTER =
new OperationsSupported(0x10);
-
+
/** Operation to get all currently queued or processed jobs. */
- public static final OperationsSupported GET_JOBS =
+ public static final OperationsSupported GET_JOBS =
new OperationsSupported(0x0A);
-
+
/** Operation to get the attributes of a printer. */
- public static final OperationsSupported GET_PRINTER_ATTRIBUTES =
+ public static final OperationsSupported GET_PRINTER_ATTRIBUTES =
new OperationsSupported(0x0B);
-
+
/** Operation to put a job on hold by its ID or name. */
- public static final OperationsSupported HOLD_JOB =
+ public static final OperationsSupported HOLD_JOB =
new OperationsSupported(0x0C);
-
+
/** Operation to release a job by its ID or name. */
- public static final OperationsSupported RELEASE_JOB =
+ public static final OperationsSupported RELEASE_JOB =
new OperationsSupported(0x0D);
-
+
/** Operation to restart a job by its ID or name. */
- public static final OperationsSupported RESTART_JOB =
+ public static final OperationsSupported RESTART_JOB =
new OperationsSupported(0x0E);
-
+
/** Not yet an operation - reserved for futher use. */
- public static final OperationsSupported RESERVED =
+ public static final OperationsSupported RESERVED =
new OperationsSupported(0x0F);
-
+
/** Operation to resume a printer. */
- public static final OperationsSupported RESUME_PRINTER =
+ public static final OperationsSupported RESUME_PRINTER =
new OperationsSupported(0x11);
-
+
/** Operation to remove all jobs from a printer regardless of state. */
- public static final OperationsSupported PURGE_JOBS =
+ public static final OperationsSupported PURGE_JOBS =
new OperationsSupported(0x12);
- private static final String[] stringTable = { "print-job", "print-uri",
+ private static final String[] stringTable = { "print-job", "print-uri",
"validate-job", "create-job",
- "send-document", "send-uri",
+ "send-document", "send-uri",
"cancel-job", "get-job-attributes",
- "pause-printer", "get-jobs",
+ "pause-printer", "get-jobs",
"get-printer-attributes", "hold-job",
"release-job", "restart-job", "reserved",
"resume-printer", "purge-job"};
-
- private static final OperationsSupported[] enumValueTable =
+
+ private static final OperationsSupported[] enumValueTable =
{ PRINT_JOB, PRINT_URI, VALIDATE_JOB, CREATE_JOB, SEND_DOCUMENT, SEND_URI,
CANCEL_JOB, GET_JOB_ATTRIBUTES, PAUSE_PRINTER, GET_JOBS, GET_PRINTER_ATTRIBUTES,
HOLD_JOB, RELEASE_JOB, RESTART_JOB, RESERVED, RESUME_PRINTER, PURGE_JOBS};
-
-
+
+
/**
* Constructs a <code>OperationsSupported</code> object.
- *
+ *
* @param value the enum value
*/
protected OperationsSupported(int value)
*
* @return The class <code>OperationsSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return OperationsSupported.class;
}
{
return "operations-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
protected int getOffset()
{
return 2;
- }
+ }
}
import java.util.Iterator;
import java.util.Set;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.standard.OrientationRequested;
/**
- * The <code>OrientationRequestedSupported</code> attribute provides
+ * The <code>OrientationRequestedSupported</code> attribute provides
* the supported values for the job attribute orientation-requested.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class OrientationRequestedSupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
/** Orientation as portrait. */
public static final OrientationRequestedSupported PORTRAIT =
new OrientationRequestedSupported(3);
-
+
/** Orientation as landscape. */
public static final OrientationRequestedSupported LANDSCAPE =
new OrientationRequestedSupported(4);
-
+
/** Orientation as reversed landscape. */
public static final OrientationRequestedSupported REVERSE_LANDSCAPE =
new OrientationRequestedSupported(5);
-
+
/** Orientation as reversed portrait. */
public static final OrientationRequestedSupported REVERSE_PORTRAIT =
new OrientationRequestedSupported(6);
private static final String[] stringTable = { "portrait", "landscape",
"reverse-landscape",
"reverse-portrait" };
-
- private static final OrientationRequestedSupported[]
- enumValueTable = { PORTRAIT, LANDSCAPE,
+
+ private static final OrientationRequestedSupported[]
+ enumValueTable = { PORTRAIT, LANDSCAPE,
REVERSE_LANDSCAPE, REVERSE_PORTRAIT };
-
+
/**
* Constructs a <code>OrientationRequestedSupported</code> object.
- *
+ *
* @param value the value
*/
protected OrientationRequestedSupported(int value)
*
* @return The class <code>OrientationRequestedSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return OrientationRequestedSupported.class;
}
{
return "orientation-requested-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the lowest used value by the enumerations of this class.
* .
{
return 3;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public OrientationRequested getAssociatedAttribute()
+ public OrientationRequested getAssociatedAttribute()
{
return (OrientationRequested) IppUtilities.getEnumAttribute(
"orientation-requested", new Integer(getValue()));
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
- *
+ *
* @see #getAssociatedAttribute()
*/
- public static OrientationRequested[] getAssociatedAttributeArray(Set set)
+ public static OrientationRequested[]
+ getAssociatedAttributeArray(Set<Attribute> set)
{
- OrientationRequestedSupported tmp;
- OrientationRequested[] result = new OrientationRequested[set.size()];
- Iterator it = set.iterator();
+ OrientationRequested[] result = new OrientationRequested[set.size()];
int j = 0;
- while (it.hasNext())
+ for (Attribute tmp : set)
{
- tmp = (OrientationRequestedSupported) it.next();
- result[j] = tmp.getAssociatedAttribute();
+ result[j] = ((OrientationRequestedSupported) tmp).getAssociatedAttribute();
j++;
- }
+ }
return result;
}
}
package gnu.javax.print.ipp.attribute.supported;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
-
/**
* <code>PageRangesSupported</code> is a boolean typed
* attribute indicating (as EnumSyntax) if page ranges
* are supported.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PageRangesSupported extends EnumSyntax
implements SupportedValuesAttribute
{
/** Page ranges are not supported. */
- public static final PageRangesSupported NOT_SUPPORTED =
+ public static final PageRangesSupported NOT_SUPPORTED =
new PageRangesSupported(0);
-
+
/** Page ranges are supported. */
- public static final PageRangesSupported SUPPORTED =
+ public static final PageRangesSupported SUPPORTED =
new PageRangesSupported(1);
private static final String[] stringTable = { "not-supported", "supported" };
-
+
private static final PageRangesSupported[] enumValueTable = { NOT_SUPPORTED,
SUPPORTED };
-
+
/**
* Constructs a <code>PageRangesSupported</code> object.
- *
+ *
* @param value the enum value
*/
protected PageRangesSupported(int value)
*
* @return The class <code>PageRangesSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PageRangesSupported.class;
}
{
return "page-ranges-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
import java.util.Iterator;
import java.util.Set;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.standard.PrintQuality;
/**
* <code>PrintQualitySupported</code> provides the
* supported values for the print-quality attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PrintQualitySupported extends EnumSyntax
implements SupportedValuesAttribute
{
/** Draft quality of the printer. */
- public static final PrintQualitySupported DRAFT =
+ public static final PrintQualitySupported DRAFT =
new PrintQualitySupported(3);
-
+
/** Normal quality of the printer. */
- public static final PrintQualitySupported NORMAL =
+ public static final PrintQualitySupported NORMAL =
new PrintQualitySupported(4);
-
+
/** High quality of the printer. */
- public static final PrintQualitySupported HIGH =
+ public static final PrintQualitySupported HIGH =
new PrintQualitySupported(5);
private static final String[] stringTable = { "draft", "normal", "high" };
-
- private static final PrintQualitySupported[] enumValueTable = { DRAFT,
- NORMAL,
+
+ private static final PrintQualitySupported[] enumValueTable = { DRAFT,
+ NORMAL,
HIGH };
-
+
/**
* Constructs a <code>PrintQualitySupported</code> object.
- *
+ *
* @param value the value of the enum
*/
protected PrintQualitySupported(int value)
*
* @return The class <code>PrintQualitySupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrintQualitySupported.class;
}
{
return "print-quality-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
{
return enumValueTable;
}
-
+
/**
* Returns the lowest used value by the enumerations of this class.
* .
{
return 3;
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public PrintQuality getAssociatedAttribute()
+ public PrintQuality getAssociatedAttribute()
{
return (PrintQuality) IppUtilities.getEnumAttribute(
"print-quality", new Integer(getValue()));
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
- *
+ *
* @see #getAssociatedAttribute()
*/
- public static PrintQuality[] getAssociatedAttributeArray(Set set)
+ public static PrintQuality[] getAssociatedAttributeArray(Set<Attribute> set)
{
- PrintQualitySupported tmp;
- PrintQuality[] result = new PrintQuality[set.size()];
- Iterator it = set.iterator();
+ PrintQuality[] result = new PrintQuality[set.size()];
int j = 0;
- while (it.hasNext())
+ for (Attribute tmp : set)
{
- tmp = (PrintQualitySupported) it.next();
- result[j] = tmp.getAssociatedAttribute();
+ result[j] = ((PrintQualitySupported) tmp).getAssociatedAttribute();
j++;
- }
+ }
return result;
}
}
import java.util.Iterator;
import java.util.Set;
+import javax.print.attribute.Attribute;
import javax.print.attribute.ResolutionSyntax;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.standard.PrinterResolution;
/**
- * The <code>PrinterResolutionSupported</code> attribute provides
+ * The <code>PrinterResolutionSupported</code> attribute provides
* the supported values for the job attribute printer-resolution.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class PrinterResolutionSupported extends ResolutionSyntax
implements SupportedValuesAttribute
{
-
+
/**
- * Creates a <code>PrinterResolutionSupported</code> object with the
+ * Creates a <code>PrinterResolutionSupported</code> object with the
* given arguments.
*
* @param crossFeedResolution the cross feed resolution
*
* @exception IllegalArgumentException if preconditions fail
*/
- public PrinterResolutionSupported(int crossFeedResolution,
+ public PrinterResolutionSupported(int crossFeedResolution,
int feedResolution, int units)
{
super(crossFeedResolution, feedResolution, units);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if(! (obj instanceof PrinterResolutionSupported))
return false;
-
+
return super.equals(obj);
}
*
* @return The class <code>PrinterResolutionSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrinterResolutionSupported.class;
}
{
return "printer-resolution-supported";
}
-
+
/**
* Returns the equally enum of the standard attribute class
* of this SupportedValuesAttribute enum.
- *
+ *
* @return The enum of the standard attribute class.
*/
- public PrinterResolution getAssociatedAttribute()
+ public PrinterResolution getAssociatedAttribute()
{
- return new PrinterResolution(getCrossFeedResolutionDphi(),
+ return new PrinterResolution(getCrossFeedResolutionDphi(),
getFeedResolutionDphi(), 1);
}
-
+
/**
* Constructs an array from a set of -supported attributes.
* @param set set to process
* @return The constructed array.
- *
+ *
* @see #getAssociatedAttribute()
*/
- public static PrinterResolution[] getAssociatedAttributeArray(Set set)
+ public static PrinterResolution[]
+ getAssociatedAttributeArray(Set<Attribute> set)
{
- PrinterResolutionSupported tmp;
- PrinterResolution[] result = new PrinterResolution[set.size()];
- Iterator it = set.iterator();
+ PrinterResolution[] result = new PrinterResolution[set.size()];
int j = 0;
- while (it.hasNext())
+ for (Attribute tmp : set)
{
- tmp = (PrinterResolutionSupported) it.next();
- result[j] = tmp.getAssociatedAttribute();
+ result[j] = ((PrinterResolutionSupported) tmp).getAssociatedAttribute();
j++;
- }
+ }
return result;
}
}
-/* PrinterUriSupported.java --
+/* PrinterUriSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.net.URI;
+import javax.print.attribute.Attribute;
import javax.print.attribute.SupportedValuesAttribute;
import javax.print.attribute.URISyntax;
* PrinterUriSupported attribute as described in RFC 2911 section
* 4.4.1 contains one of the URIs the printer supported for
* job processing (e.g. one with authentication).
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class PrinterUriSupported extends URISyntax
+public final class PrinterUriSupported extends URISyntax
implements SupportedValuesAttribute
{
*
* @return The class <code>PrinterUriSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return PrinterUriSupported.class;
}
package gnu.javax.print.ipp.attribute.supported;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
/**
* <code>SidesSupported</code> provides the
* supported values for the sides attribute.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class SidesSupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
/** Specifies that each page should be printed on one sheet. */
public static final SidesSupported ONE_SIDED = new SidesSupported(0);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the long edge.
*/
- public static final SidesSupported TWO_SIDED_LONG_EDGE =
+ public static final SidesSupported TWO_SIDED_LONG_EDGE =
new SidesSupported(1);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the short edge.
*/
- public static final SidesSupported TWO_SIDED_SHORT_EDGE =
+ public static final SidesSupported TWO_SIDED_SHORT_EDGE =
new SidesSupported(2);
-
+
/** An alias constant for "two sided long edge". */
public static final SidesSupported DUPLEX = new SidesSupported(1);
-
+
/** An alias constant for "two sided short edge". */
public static final SidesSupported TUMBLE = new SidesSupported(2);
- private static final String[] stringTable = { "one-sided",
+ private static final String[] stringTable = { "one-sided",
"two-sided-long-edge",
"two-sided-short-edge" };
-
- private static final SidesSupported[]
- enumValueTable = { ONE_SIDED, TWO_SIDED_LONG_EDGE,
+
+ private static final SidesSupported[]
+ enumValueTable = { ONE_SIDED, TWO_SIDED_LONG_EDGE,
TWO_SIDED_SHORT_EDGE };
-
-
+
+
/**
* Creates a <code>SidesSupported</code> object.
*
*
* @return The class <code>SidesSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return SidesSupported.class;
}
{
return "sides-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
-/* UriAuthenticationSupported.java --
+/* UriAuthenticationSupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.javax.print.ipp.attribute.supported;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
/**
* UriAuthenticationSupported attribute as described in RFC 2911 section
- * 4.4.2 provides the keywords (implemented as EnumSyntax) which
+ * 4.4.2 provides the keywords (implemented as EnumSyntax) which
* authentication methods are supported by the printer object. This
* includes a value of none.
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class UriAuthenticationSupported extends EnumSyntax
+public final class UriAuthenticationSupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
// a keyword based attribute in IPP - int values just starting at 0
-
+
/** Supports no authentication - assumes anonymous process */
- public static final UriAuthenticationSupported NONE =
+ public static final UriAuthenticationSupported NONE =
new UriAuthenticationSupported(0);
-
- /**
+
+ /**
* The authenticated user assumed is the value of the
* "requesting-user-name" operation attribute supplied
* with the operation.
*/
- public static final UriAuthenticationSupported REQUESTING_USER_NAME =
+ public static final UriAuthenticationSupported REQUESTING_USER_NAME =
new UriAuthenticationSupported(1);
-
+
/** Supports HTTP basic authentication (RFC 2617) */
- public static final UriAuthenticationSupported BASIC =
+ public static final UriAuthenticationSupported BASIC =
new UriAuthenticationSupported(2);
-
+
/** Supports HTTP digest authentication (RFC 2617) */
- public static final UriAuthenticationSupported DIGEST =
+ public static final UriAuthenticationSupported DIGEST =
new UriAuthenticationSupported(3);
-
+
/** Supports authentication through a client provided certificate */
- public static final UriAuthenticationSupported CERTIFICATE =
+ public static final UriAuthenticationSupported CERTIFICATE =
new UriAuthenticationSupported(4);
-
- private static final String[] stringTable = { "none",
- "requesting-user-name",
- "basic", "digest",
+
+ private static final String[] stringTable = { "none",
+ "requesting-user-name",
+ "basic", "digest",
"certificate" };
-
- private static final UriAuthenticationSupported[] enumValueTable =
+
+ private static final UriAuthenticationSupported[] enumValueTable =
{ NONE, REQUESTING_USER_NAME, BASIC, DIGEST, CERTIFICATE };
/**
* Constructs a <code>UriAuthenticationSupported</code> object.
- *
+ *
* @param value the enum value
*/
public UriAuthenticationSupported(int value)
*
* @return The class <code>UriAuthenticationSupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return UriAuthenticationSupported.class;
}
{
return "uri-authentication-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
-/* UriSecuritySupported.java --
+/* UriSecuritySupported.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.javax.print.ipp.attribute.supported;
+import javax.print.attribute.Attribute;
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.SupportedValuesAttribute;
* 4.4.3 provides the keywords (implemented as EnumSyntax) for
* the security mechanisms supported by the corresponding uri's
* supported (same place in setOf).
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
-public final class UriSecuritySupported extends EnumSyntax
+public final class UriSecuritySupported extends EnumSyntax
implements SupportedValuesAttribute
{
-
+
// a keyword based attribute in IPP - int values just starting at 0
-
+
/** The URI has no secure communication */
- public static final UriSecuritySupported NONE =
+ public static final UriSecuritySupported NONE =
new UriSecuritySupported(0);
-
+
/** The URI has SSL3 communication */
- public static final UriSecuritySupported SSL3 =
+ public static final UriSecuritySupported SSL3 =
new UriSecuritySupported(1);
-
+
/** The URI has TLS (RFC 2246) communication */
- public static final UriSecuritySupported TLS =
+ public static final UriSecuritySupported TLS =
new UriSecuritySupported(2);
-
+
private static final String[] stringTable = { "none", "ssl3", "tls" };
-
- private static final UriSecuritySupported[] enumValueTable = { NONE,
+
+ private static final UriSecuritySupported[] enumValueTable = { NONE,
SSL3, TLS };
/**
* Constructs a <code>UriSecuritySupported</code> object.
- *
+ *
* @param value the enum value
*/
public UriSecuritySupported(int value)
*
* @return The class <code>UriSecuritySupported</code> itself.
*/
- public Class getCategory()
+ public Class<? extends Attribute> getCategory()
{
return UriSecuritySupported.class;
}
{
return "uri-security-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
package gnu.javax.swing.text.html.css;
+import gnu.java.lang.CPStringBuilder;
+
+import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
* @return <code>true</code> when this selector matches the element path,
* <code>false</code> otherwise
*/
- public boolean matches(String[] tags, Map[] attributes)
+ public boolean matches(String[] tags, List<Map<String,String>> attributes)
{
// TODO: This implements class, id and descendent matching. These are
// the most commonly used selector matchers in CSS together with HTML.
boolean tagMatch = false;
for (; tagIndex < numTags && tagMatch == false; tagIndex++)
{
- Object pathClass = attributes[tagIndex].get("class");
+ Object pathClass = attributes.get(tagIndex).get("class");
// Try pseudo class too.
- Object pseudoClass = attributes[tagIndex].get("_pseudo");
- Object dynClass = attributes[tagIndex].get("_dynamic");
- Object pathId = attributes[tagIndex].get("id");
+ Object pseudoClass = attributes.get(tagIndex).get("_pseudo");
+ Object dynClass = attributes.get(tagIndex).get("_dynamic");
+ Object pathId = attributes.get(tagIndex).get("id");
String tag = elements[j];
String clazz = classes[j];
String id = ids[j];
*/
public String toString()
{
- StringBuilder b = new StringBuilder();
+ CPStringBuilder b = new CPStringBuilder();
for (int i = selector.length - 1; i >= 0; i--)
{
b.append(selector[i]);
import javax.xml.stream.StreamFilter;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.util.ReaderDelegate;
+import javax.xml.stream.util.StreamReaderDelegate;
class FilteredStreamReader
- extends ReaderDelegate
+ extends StreamReaderDelegate
{
final XMLStreamReader reader;
import java.io.IOException;
import java.io.Writer;
+import javax.xml.namespace.QName;
import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.Namespace;
protected final String prefix;
protected final String uri;
+ protected final boolean specified;
- protected NamespaceImpl(Location location, String prefix, String uri)
+ protected NamespaceImpl(Location location, String prefix, String uri,
+ boolean specified)
{
super(location);
this.prefix = prefix;
this.uri = uri;
+ this.specified = specified;
}
public int getEventType()
return uri;
}
+ public boolean isSpecified()
+ {
+ return specified;
+ }
+
+ public QName getName()
+ {
+ if (isDefaultNamespaceDeclaration())
+ return new QName("", "xmlns", null);
+ else
+ return new QName("", prefix, "xmlns");
+ }
+
+ public String getDTDType()
+ {
+ return "CDATA";
+ }
+
+ public String getValue()
+ {
+ return uri;
+ }
+
public boolean isDefaultNamespaceDeclaration()
{
return (prefix == null || "".equals(prefix));
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.util.ReaderDelegate;
+import javax.xml.stream.util.StreamReaderDelegate;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
class XIncludeFilter
- extends ReaderDelegate
+ extends StreamReaderDelegate
{
static final String XINCLUDE_NS_URI = "http://www.w3.org/2001/XInclude";
for (int i = 0; i < len; i++)
namespaces.add(new NamespaceImpl(location,
reader.getNamespacePrefix(i),
- reader.getNamespaceURI(i)));
+ reader.getNamespaceURI(i),
+ false));
return new EndElementImpl(location,
reader.getName(),
namespaces);
for (int i = 0; i < len; i++)
namespaces.add(new NamespaceImpl(location,
reader.getNamespacePrefix(i),
- reader.getNamespaceURI(i)));
+ reader.getNamespaceURI(i),
+ false));
len = reader.getAttributeCount();
List attributes = new LinkedList();
for (int i = 0; i < len; i++)
public Namespace createNamespace(String namespaceURI)
{
return new NamespaceImpl(location,
- XMLConstants.DEFAULT_NS_PREFIX, namespaceURI);
+ XMLConstants.DEFAULT_NS_PREFIX,
+ namespaceURI,
+ true);
}
public Namespace createNamespace(String prefix, String namespaceUri)
{
- return new NamespaceImpl(location, prefix, namespaceUri);
+ return new NamespaceImpl(location, prefix, namespaceUri, true);
}
public StartElement createStartElement(QName name,
{
if (namespaceURI != null && !isURI(namespaceURI))
throw new IllegalArgumentException("illegal URI: " + namespaceURI);
- if (prefix != null && !isNCName(prefix))
+ if (prefix != null && !isPrefix(prefix))
throw new IllegalArgumentException("illegal NCName: " + prefix);
if (!isNCName(localName))
throw new IllegalArgumentException("illegal NCName: " + localName);
{
if (namespaceURI != null && !isURI(namespaceURI))
throw new IllegalArgumentException("illegal URI: " + namespaceURI);
- if (prefix != null && !isNCName(prefix))
+ if (prefix != null && !isPrefix(prefix))
throw new IllegalArgumentException("illegal NCName: " + prefix);
if (!isNCName(localName))
throw new IllegalArgumentException("illegal NCName: " + localName);
public void writeNamespace(String prefix, String namespaceURI)
throws XMLStreamException
{
+ if (prefix == null || "".equals(prefix) || "xmlns".equals(prefix))
+ {
+ writeDefaultNamespace(namespaceURI);
+ return;
+ }
if (!inStartElement)
throw new IllegalStateException();
try
{
if (!isURI(namespaceURI))
throw new IllegalArgumentException("illegal URI: " + namespaceURI);
- if (!isNCName(prefix))
+ if (!isPrefix(prefix))
throw new IllegalArgumentException("illegal NCName: " + prefix);
}
catch (IOException e)
{
if (!isURI(uri))
throw new IllegalArgumentException("illegal URI: " + uri);
- if (!isNCName(prefix))
+ if (!isPrefix(prefix))
throw new IllegalArgumentException("illegal NCName: " + prefix);
}
catch (IOException e)
return true;
}
+ private boolean isPrefix(String text)
+ throws IOException
+ {
+ if (XMLConstants.DEFAULT_NS_PREFIX.equals(text)) {
+ return true;
+ }
+ return isNCName(text);
+ }
+
private boolean isNCName(String text)
throws IOException
{
}
+
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2006-12-25.00
+scriptversion=2010-02-06.18; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
fi
if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
/**
* @author E0327023 Hernadi Laszlo
- */
-public class Scanner
+*/
+public class Scanner
implements Iterator <String>
{
- private static final String NOT_LONG = "\" is not a long"; //$NON-NLS-1$
+ private static final String NOT_LONG = "\" is not a long"; //$NON-NLS-1$
- private static final String ERR_PREFIX = "\""; //$NON-NLS-1$
+ private static final String ERR_PREFIX = "\""; //$NON-NLS-1$
- private static final String NOT_INT = "\" is not an integer"; //$NON-NLS-1$
+ private static final String NOT_INT = "\" is not an integer"; //$NON-NLS-1$
- private static final String NOT_DOUBLE = "\" is not a double"; //$NON-NLS-1$
+ private static final String NOT_DOUBLE = "\" is not a double"; //$NON-NLS-1$
- private static final String NOT_BYTE = "\" is not a byte"; //$NON-NLS-1$
+ private static final String NOT_BYTE = "\" is not a byte"; //$NON-NLS-1$
- private static final String NOT_BOOLEAN = "\" is not a boolean"; //$NON-NLS-1$
+ private static final String NOT_BOOLEAN = "\" is not a boolean"; //$NON-NLS-1$
- private static final String IS_NOT = "\" is not "; //$NON-NLS-1$
+ private static final String IS_NOT = "\" is not "; //$NON-NLS-1$
- private static final String DEFAULT_PATTERN_S = "\\p{javaWhitespace}+"; //$NON-NLS-1$
+ private static final String DEFAULT_PATTERN_S = "\\p{javaWhitespace}+"; //$NON-NLS-1$
private static final Pattern DEFAULT_PATTERN =
Pattern.compile (DEFAULT_PATTERN_S);
- private static final String BIG_INTEGER = "BigInteger"; //$NON-NLS-1$
+ private static final String BIG_INTEGER = "BigInteger"; //$NON-NLS-1$
private final static String NEW_LINE =
System.getProperty ("line.separator");
/**
* The current locale.
- *
+ *
* @see #useLocale(Locale)
* @see #locale()
*/
* <source> null </source>.
*/
private Readable readableSource = null;
-
+
/**
* A ReadableByteChannel source if a Constructor with a ReadableByteChannel source is called,
* otherwise it stays <source> null </source>.
* Indicates if the close() method was called.
*/
private boolean isClosed = false;
-
+
/**
* For performance reasons the last Found is saved, if a hasNextXXX method was called.
*/
/**
* Constructs a new Scanner with the given File as source.
* {@link #Scanner(InputStream, String)} is called with <code> null </code> as charsetName.
- *
+ *
* @param source
* The File to use as source.
* @throws FileNotFoundException
* If the file is not found an Exception is thrown.
*/
- public Scanner (final File source) throws FileNotFoundException // TESTED
+ public Scanner (final File source) throws FileNotFoundException // TESTED
{
this (source, null);
}
-
+
/**
* Constructs a new Scanner with the given File as source. <br>
* {@link #Scanner(InputStream, String)} is called with the given charsetName.
- *
+ *
* @param source
* The File to use as source.
* @param charsetName
* If the file is not found an Exception is thrown.
*/
public Scanner (final File source,
- final String charsetName) throws FileNotFoundException
+ final String charsetName) throws FileNotFoundException
{
this (new FileInputStream (source), charsetName);
}
/**
* Constructs a new Scanner with the given inputStream. <br>
* {@link #Scanner(InputStream, String)} is called with <code> null </code> as charsetName.
- *
+ *
* @param source
* The InputStream to use as source.
*/
- public Scanner (final InputStream source) // TESTED
+ public Scanner (final InputStream source) // TESTED
{
this (source, null);
}
/**
* Constructs a new Scanner with the InputSream and a charsetName. Afterwards the Buffer is
* filled.
- *
+ *
* @param source
* The InputStream to use as source.
* @param charsetName
this.charsetName = charsetName;
myFillBuffer ();
}
-
+
/**
* Constructs a new Scanner with a Readable input as source.
- *
+ *
* @param source
* The Readable to use as source.
*/
* Constructs a new Scanner with a ReadableByteChannel as
* source. Therfore the {@link #Scanner(ReadableByteChannel,
* String)} is called with <code> null </code> as charsetName.
- *
+ *
* @param source
* The ReadableByteChannel to use as source.
*/
* Constructs a new Scanner with a ReadableByteChannel as source and
* a given charsetName, which is to be applied on it. <br> It also
* initiates the main Buffer.
- *
+ *
* @param source
* The ReadableByteChannel to use as source.
* @param charsetName
/**
* Constructs a new Scanner using the given String as input only.
- *
+ *
* @param source
* The whole String to be used as source.
*/
- public Scanner (final String source) // TESTED
+ public Scanner (final String source) // TESTED
{
this.actBuffer = new String (source);
this.myMatcher.reset (this.actBuffer);
* the Scanner is closed, all searches will lead to a {@link
* IllegalStateException}.
*/
- public void close ()
+ public void close ()
{
try
{
if (this.bIS != null)
- this.bIS.close ();
+ this.bIS.close ();
if (this.rbcSource != null)
- this.rbcSource.close ();
+ this.rbcSource.close ();
this.isClosed = true;
}
catch (IOException ioe)
/**
* Returns the current delimiter.
- *
+ *
* @return the current delimiter.
*/
- public Pattern delimiter () // TESTED
+ public Pattern delimiter () // TESTED
{
return this.p;
}
/**
* Tries to find the pattern in the current line.
- *
+ *
* @param pattern The pattern which should be searched in the
* current line of the input.
* @throws NoSuchElementException
* @return If the search was successful, the result or otherwise a
* {@link NoSuchElementException} is thrown.
*/
- public String findInLine (final Pattern pattern) throws NoSuchElementException // TESTED
+ public String findInLine (final Pattern pattern) throws NoSuchElementException // TESTED
{
String tmpStr = myNextLine (false);
return myFindPInStr (pattern, tmpStr, 0);
}
-
+
/**
* Compiles the given pattern into a {@link Pattern} and calls
* {@link #findInLine(Pattern)} with the compiled pattern and
* returns whatever it returns.
- *
+ *
* @param pattern
* The pattern which should be matched in the input.
* @throws NoSuchElementException
* If the pattern was not found.
* @return The match in the current line.
*/
- public String findInLine (final String pattern) // TESTED
+ public String findInLine (final String pattern) // TESTED
{
return findInLine (Pattern.compile (pattern));
}
/**
* Trys to match the pattern within the given horizon.
- *
+ *
* @param pattern
* Pattern to search.
* @param horizon
{
if (horizon < 0)
{
- throw new IllegalArgumentException (horizon + " is negative");
+ throw new IllegalArgumentException (horizon + " is negative");
}
if (this.isClosed)
{
- throw new IllegalStateException ("Scanner is closed");
+ throw new IllegalStateException ("Scanner is closed");
}
// doSkipp is set true to get the matching patern together with the found String
if (rc != null)
{
- this.actPos += rc.length ();
+ this.actPos += rc.length ();
}
return rc;
/**
* Compile the pattern and call {@link #findWithinHorizon(Pattern,
* int)}.
- *
+ *
* @param pattern
* Pattern to search.
* @param horizon
* and the length must be greater then 0. If a {@link
* NoSuchElementException} is thrown by the search method, it is
* catched and false is returned.
- *
+ *
* @return <code> true </code> if there is any result using the current delimiter. This wouldn't
* lead to a {@link NoSuchElementException}.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNext () throws IllegalStateException // TESTED
+ public boolean hasNext () throws IllegalStateException // TESTED
{
String tmpStr = null;
-
+
try
{
tmpStr = myCoreNext (false, this.p);
if (tmpStr == null || tmpStr.length () <= 0)
{
- return false;
+ return false;
}
return true;
}
/**
* Searches the pattern in the next subString before the next
* current delimiter.
- *
+ *
* @param pattern
* The pattern to search for.
* @return <code> true </code> if the pattern is found before the current delimiter.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNext (final Pattern pattern) throws IllegalStateException // TESTED
+ public boolean hasNext (final Pattern pattern) throws IllegalStateException // TESTED
{
String tmpStr;
if (tmpStr == null || tmpStr.length () <= 0)
{
- return false;
+ return false;
}
return true;
}
/**
* Compiles the pattern to a {@link Pattern} and calls {@link
* #hasNext(Pattern)}.
- *
+ *
* @see #hasNext(Pattern)
* @param pattern
* The pattern as string to search for.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNext (final String pattern) throws IllegalStateException // TESTED
+ public boolean hasNext (final String pattern) throws IllegalStateException // TESTED
{
return hasNext (Pattern.compile (pattern));
}
* Checks if the string to the next delimiter can be interpreted as
* a BigDecimal number. <br> BigDecimal numbers are always tryed
* with radix 10.
- *
+ *
* @see #nextBigDecimal()
* @return <code> true </code> if the next string is a BigDecimal number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextBigDecimal () throws IllegalStateException // TESTED
+ public boolean hasNextBigDecimal () throws IllegalStateException // TESTED
{
try
{
* Checks if the string to the next delimiter can be interpreted as
* a BigInteger number. <br> Call {@link #hasNextBigInteger(int)}
* with the current radix.
- *
+ *
* @see #nextBigInteger()
* @return <code> true </code> if the next string is a BigInteger number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextBigInteger () throws IllegalStateException // TESTED
+ public boolean hasNextBigInteger () throws IllegalStateException // TESTED
{
return hasNextBigInteger (this.currentRadix);
}
/**
* Checks if the string to the next delimiter can be interpreted as
* a BigInteger number. <br>
- *
+ *
* @param radix
* The radix to use for this check. The global radix of the Scanner will not be
* changed.
* Checks if the next string could be a boolean. The method handles
* the input not case sensitiv, so "true" and "TRUE" and even "tRuE"
* are <code> true </code>.
- *
+ *
* @see #nextBoolean()
* @return Return <code> true </code> if the next string is a boolean.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextBoolean () throws IllegalStateException // TESTED
+ public boolean hasNextBoolean () throws IllegalStateException // TESTED
{
try
{
* Checks if the string to the next delimiter can be interpreted as
* a byte number. <br> Calls {@link #hasNextByte(int)} with the
* current radix.
- *
+ *
* @see #nextByte()
* @return <code> true </code> if the next string is a byte number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextByte () throws IllegalStateException // TESTED
+ public boolean hasNextByte () throws IllegalStateException // TESTED
{
return hasNextByte (this.currentRadix);
}
* a byte number with the given radix. <br> To check, the private
* method {@link #myNextByte(int, boolean)} is called, and if no
* error occurs the next string could be a byte.
- *
+ *
* @see #nextByte(int)
* @param radix The radix to use for this check. The global radix of
* the Scanner will not be changed.
* a double number. <br> To check, the private method {@link
* #myNextDouble(boolean)} is called, and if no error occurs the
* next string could be a double.
- *
+ *
* @see #nextDouble()
* @return <code> true </code> if the next string is a double number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextDouble () throws IllegalStateException // TESTED
+ public boolean hasNextDouble () throws IllegalStateException // TESTED
{
try
{
* checked.<br> To check, the private method {@link
* #myNextDouble(boolean)} is called, and if no error occurs the
* next string could be a double.
- *
+ *
* @see #nextFloat()
* @return <code> true </code> if the next string is a double number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextFloat () throws IllegalStateException // TESTED
+ public boolean hasNextFloat () throws IllegalStateException // TESTED
{
try
{
* an int number. <br> To check, the private method {@link
* #myNextInt(int, boolean)} is called, and if no error occurs the
* next string could be an int.
- *
+ *
* @see #nextInt(int)
* @return <code> true </code> if the next string is an int number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextInt () throws IllegalStateException // TESTED
+ public boolean hasNextInt () throws IllegalStateException // TESTED
{
return hasNextInt (this.currentRadix);
}
* an int number with the given radix. <br> To check, the private
* method {@link #myNextInt(int, boolean)} is called, and if no
* error occurs the next string could be an int.
- *
+ *
* @see #nextInt(int)
* @param radix
* The radix to use for this check. The global radix of the Scanner will not be
/**
* Checks if there is a current line, which ends at the next line
* break or the end of the input.
- *
+ *
* @return <code> true </code> if there is a current line.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextLine () throws IllegalStateException // TESTED
+ public boolean hasNextLine () throws IllegalStateException // TESTED
{
return (myNextLine (false) != null);
}
* a long number. <br> To check, the private method {@link
* #myNextLong(int, boolean)} is called, and if no error occurs the
* next string could be a long.
- *
+ *
* @see #nextLong()
* @return <code> true </code> if the next string is a long number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextLong () throws IllegalStateException // TESTED
+ public boolean hasNextLong () throws IllegalStateException // TESTED
{
return hasNextLong (this.currentRadix);
}
* a long number with the given radix. <br> To check, the private
* method {@link #myNextLong(int, boolean)} is called, and if no
* error occurs the next string could be a long.
- *
+ *
* @see #nextLong(int)
* @param radix
* The radix to use for this check. The global radix of the Scanner will not be
* a short number with the given radix. <br> To check, the private
* method {@link #myNextShort(int, boolean)} is called, and if no
* error occurs the next string could be a short.
- *
+ *
* @see #nextShort(int)
* @return <code> true </code> if the next string is a short number.
* @throws IllegalStateException
* if the Scanner is closed.
*/
- public boolean hasNextShort () throws IllegalStateException // TESTED
+ public boolean hasNextShort () throws IllegalStateException // TESTED
{
return hasNextShort (this.currentRadix);
}
* a short number. <br> To check, the private method {@link
* #myNextShort(int, boolean)} is called, and if no error occurs the
* next string could be a short.
- *
+ *
* @see #nextShort(int)
* @param radix
* The radix to use for this check. The global radix of the Scanner will not be
/**
* Returns the last {@link IOException} occured.
- *
+ *
* @return Returns the last {@link IOException}.
*/
public IOException ioException ()
* Returns the current value of {@link #useLocale}. This is used to
* tell the Scanner if it should use the Locale format or just
* handle numbers of the default format.
- *
+ *
* @see #setUseLocale(boolean)
* @return the useLoclae.
*/
- public boolean isUseLocale () // TESTED
+ public boolean isUseLocale () // TESTED
{
return this.useLocale;
}
/**
* Returns the current Locale. It is initialized with {@link
* Locale#getDefault()}.
- *
+ *
* @see #useLocale(Locale)
* @return Returns the current Locale.
*/
- public Locale locale () // TESTED
+ public Locale locale () // TESTED
{
return this.actLocale;
}
/**
* Returns the last MatchResult found. This is updated after every
* successfully search.
- *
+ *
* @return Returns the last {@link MatchResult} found.
*/
- public MatchResult match () // TESTED
+ public MatchResult match () // TESTED
{
return this.actResult;
}
* buffer. If a string is found the current position is set after
* the delimiter, otherwise a {@link NoSuchElementException} is
* thrown. A successful match sets the matchResult.
- *
+ *
* @see #match()
* @return Returns the next string of the buffer.
* @throws NoSuchElementException
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public String next () throws NoSuchElementException, IllegalStateException // TESTED
+ public String next () throws NoSuchElementException, IllegalStateException // TESTED
{
return myCoreNext (true, this.p);
}
/**
* Tries to match the buffer with the given pattern. The current
* delimiter will not be changed.
- *
+ *
* @param pattern
* The pattern to match.
* @return Returns the next string matching the pattern.
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public String next (final Pattern pattern) throws NoSuchElementException, IllegalStateException // TESTED
+ public String next (final Pattern pattern) throws NoSuchElementException, IllegalStateException // TESTED
{
return myNext (pattern, true);
}
* Tries to match the buffer with the given pattern. The current
* delimiter will not be changed. Calls the {@link #next(Pattern)}
* with the compiled pattern.
- *
+ *
* @see #next(Pattern)
* @param pattern
* The pattern to match.
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public String next (final String pattern) throws NoSuchElementException, IllegalStateException // TESTED
+ public String next (final String pattern) throws NoSuchElementException, IllegalStateException // TESTED
{
return next (Pattern.compile (pattern));
}
/**
* Tries to interpret the next string as a BigDecimal value.
- *
+ *
* @return Returns the BigDecimal value of the next string.
* @throws NoSuchElementException
* If no string is found or the string is not a BigDecimal.
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public BigDecimal nextBigDecimal () throws NoSuchElementException, IllegalStateException // TESTED
+ public BigDecimal nextBigDecimal () throws NoSuchElementException, IllegalStateException // TESTED
{
return myBigDecimal (true);
}
* Tries to interpret the next string as a BigInteger value. Call
* {@link #nextBigInteger(int)} with the current radix as parameter,
* and return the value.
- *
+ *
* @see #nextBigInteger(int)
* @return Returns the BigInteger value of the next string.
* @throws NoSuchElementException
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public BigInteger nextBigInteger () throws NoSuchElementException, IllegalStateException // TESTED
+ public BigInteger nextBigInteger () throws NoSuchElementException, IllegalStateException // TESTED
{
return nextBigInteger (this.currentRadix);
}
/**
* Tries to interpret the next string as a BigInteger value with the
* given radix.
- *
+ *
* @param radix
* The radix to be used for this BigInteger. The current radix of the Scanner is not
* changed.
/**
* Tries to interpret the next string to the delimiter as a boolean
* value, ignoring case.
- *
+ *
* @return Returns the boolean value of the next matching string or throws an exception.
* @throws NoSuchElementException
* If no string is found or the string is not a boolean.
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public boolean nextBoolean () throws NoSuchElementException, IllegalStateException // TESTED
+ public boolean nextBoolean () throws NoSuchElementException, IllegalStateException // TESTED
{
return myNextBoolean (true);
}
* Tries to interpret the next string as a byte value. Call {@link
* #nextByte(int)} with the current radix as parameter, and return
* the value.
- *
+ *
* @see #nextByte(int)
* @return Returns the byte value of the next string.
* @throws NoSuchElementException
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public byte nextByte () throws NoSuchElementException, IllegalStateException // TESTED
+ public byte nextByte () throws NoSuchElementException, IllegalStateException // TESTED
{
return nextByte (this.currentRadix);
}
/**
* Tries to interpret the next string as a byte value with the given
* radix.
- *
+ *
* @param radix
* The radix to be used for this byte. The current radix of the Scanner is not
* changed.
/**
* Tries to interpret the next string as a double value.
- *
+ *
* @return Returns the int value of the next string.
* @throws NoSuchElementException
* If no string is found or the string is not a double.
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public double nextDouble () throws NoSuchElementException, IllegalStateException // TESTED
+ public double nextDouble () throws NoSuchElementException, IllegalStateException // TESTED
{
return myNextDouble (true);
}
/**
* Tries to interpret the next string as a double value, and then
* casts down to float.
- *
+ *
* @return Returns the int value of the next string.
* @throws NoSuchElementException
* If no string is found or the string is not a double.
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public float nextFloat () throws NoSuchElementException, IllegalStateException // TESTED
+ public float nextFloat () throws NoSuchElementException, IllegalStateException // TESTED
{
return (float) myNextDouble (true);
// return myNextFloat(true);
* Tries to interpret the next string as an int value. Calls {@link
* #nextInt(int)} with the current radix as parameter, and return
* the value.
- *
+ *
* @see #nextInt(int)
* @return Returns the int value of the next string.
* @throws NoSuchElementException
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public int nextInt () throws NoSuchElementException, IllegalStateException // TESTED
+ public int nextInt () throws NoSuchElementException, IllegalStateException // TESTED
{
return nextInt (this.currentRadix);
}
/**
* Tries to interpret the next string as an int value with the given
* radix.
- *
+ *
* @param radix
* The radix to be used for this int. The current radix of the Scanner is not changed
* @return Returns the int value of the next string.
/**
* Tries to match the system line seperator, and returns the current
* line.
- *
+ *
* @return Returns the current line.
* @throws NoSuchElementException
* If the current delimiter is not found.
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public String nextLine () throws NoSuchElementException, IllegalStateException // TESTED
+ public String nextLine () throws NoSuchElementException, IllegalStateException // TESTED
{
return myNextLine (true);
}
* Tries to interpret the next string as a long value. Calls {@link
* #nextLong(int)} with the current radix as parameter, and return
* the value.
- *
+ *
* @see #nextLong(int)
* @return Returns the long value of the next string.
* @throws NoSuchElementException
* @throws IllegalStateException
* If the Scanner is closed.
*/
- public long nextLong () throws NoSuchElementException, IllegalStateException // TESTED
+ public long nextLong () throws NoSuchElementException, IllegalStateException // TESTED
{
return nextLong (this.currentRadix);
}
/**
* Tries to interpret the next string as a long value with the given
* radix.
- *
+ *
* @param radix
* The radix to be used for this long. The current radix of the Scanner is not
* changed
* Tries to interpret the next string as a short value. Calls {@link
* #nextShort(int)} with the current radix as parameter, and return
* the value.
- *
+ *
* @see #nextShort(int)
* @return Returns the short value of the next string.
* @throws NoSuchElementException
* If no string is found or the string is not a short.
*/
- public short nextShort () throws NoSuchElementException // TESTED
+ public short nextShort () throws NoSuchElementException // TESTED
{
return nextShort (this.currentRadix);
}
/**
* Tries to interpret the next string as a short value with the
* given radix.
- *
+ *
* @param radix
* The radix to be used for this short. The current radix of the Scanner is not
* changed.
/**
* @param useLocale the useLocale to set.
*/
- public void setUseLocale (final boolean useLocale) // TESTED
+ public void setUseLocale (final boolean useLocale) // TESTED
{
this.useLocale = useLocale;
}
/**
* Skips the given pattern. Sets skipped <code>true</code>.
- *
+ *
* @param pattern
* Pattern which should be skipped.
* @return <code>this</code> with the skipped buffer.
if (!found)
{
- throw new NoSuchElementException ();
+ throw new NoSuchElementException ();
}
return this;
}
/**
* Skips a given pattern. Calls {@link #skip(Pattern)} with the
* compiled pattern.
- *
+ *
* @see #skip(Pattern)
* @param pattern
* Pattern which should be skipped.
/**
* Returns the string representation of this Scanner.
*/
- @Override
+ @Override
public String toString ()
{
String tmpStr2;
/**
* Sets the current pattern to the given parameter, and updates the
* {@link Matcher} with the new pattern.
- *
+ *
* @param pattern
* The new pattern to use.
* @return Returns the Scanner (<code>this</code>) with the new pattern.
*/
- public Scanner useDelimiter (final Pattern pattern) // TESTED
+ public Scanner useDelimiter (final Pattern pattern) // TESTED
{
if (pattern != null)
{
- this.p = pattern;
- this.myMatcher = this.p.matcher (this.actBuffer);
+ this.p = pattern;
+ this.myMatcher = this.p.matcher (this.actBuffer);
}
return this;
}
/**
* Sets the current pattern to the given parameter. Compiles the
* pattern and calls {@link #useDelimiter(Pattern)}
- *
+ *
* @see #useDelimiter(Pattern)
* @param pattern
* The new pattern to use.
* @return Returns the Scanner (<code>this</code>) with the new pattern.
*/
- public Scanner useDelimiter (final String pattern) // TESTED
+ public Scanner useDelimiter (final String pattern) // TESTED
{
return useDelimiter (Pattern.compile (pattern));
}
/**
* Sets the current Locale to the given parameter. Formats and
* Symbols are also set using the new Locale.
- *
+ *
* @param locale The new Locale to use. If it is <code>null</code>
* nothing happens.
* @return Returns the Scanner (<code>this</code>) with the new Locale.
*/
- public Scanner useLocale (final Locale locale) // TESTED
+ public Scanner useLocale (final Locale locale) // TESTED
{
if (locale != null)
{
- this.actLocale = locale;
- this.actFormat = NumberFormat.getInstance (this.actLocale);
- this.dfs = new DecimalFormatSymbols (this.actLocale);
- this.df = (DecimalFormat) this.actFormat;
+ this.actLocale = locale;
+ this.actFormat = NumberFormat.getInstance (this.actLocale);
+ this.dfs = new DecimalFormatSymbols (this.actLocale);
+ this.df = (DecimalFormat) this.actFormat;
}
return this;
}
* Sets the current radix to the current value if the given radix is
* >= 2 and <= 36 otherwise an {@link IllegalArgumentException} is
* thrown.
- *
+ *
* @param radix
* the new radix to use as default.
* @return <code> this </code> with the new radix value.
{
if (radix < 2 || radix > 36)
{
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ();
}
this.currentRadix = radix;
return this;
* String. If so the String is converted using the {@link
* NumberFormat#parse(String)} into a Number and then back to a
* default stringrepresentation of that Number.
- *
+ *
* @see #setUseLocale(boolean)
* @param str
* String to convert into another string.
* if {@link NumberFormat#parse(String)} fails to parse.
*/
private String myApplyLocale (final String str,
- final int radix) throws ParseException
+ final int radix) throws ParseException
{
String rc;
if (this.useLocale && radix == 10)
{
- rc = this.actFormat.parse (str).toString ();
- return rc;
+ rc = this.actFormat.parse (str).toString ();
+ return rc;
}
return str;
* integer part which is converted to a long, and the fraction part
* is appended afterwards. Between the integer and the fraction part
* comes a ".". Finally the resulting string is returned.
- *
+ *
* @see #setUseLocale(boolean)
* @param str String representation of a BigDecimal number.
* @return The default String representation (without Locale) of the
{
if (!this.useLocale || this.currentRadix != 10)
{
- return str;
+ return str;
}
String negPrefix = this.df.getNegativePrefix ();
if (begin2 > 0)
{
- throw new ParseException ("more than one Decimal seperators", begin2);
+ throw new ParseException ("more than one Decimal seperators", begin2);
}
parts = str.substring (0, begin1);
if ((negPrefix.length () > 0
- && str.substring (0, negPrefix.length ()).equals (negPrefix))
- || (negSuffix.length () > 0
- && str.substring (str.length () -
- negSuffix.length ()).equals (negSuffix)))
+ && str.substring (0, negPrefix.length ()).equals (negPrefix))
+ || (negSuffix.length () > 0
+ && str.substring (str.length () -
+ negSuffix.length ()).equals (negSuffix)))
{
- parts += negSuffix;
- isNegativ = true;
+ parts += negSuffix;
+ isNegativ = true;
}
else
if ((posPrefix.length () > 0
- && str.substring (0, posPrefix.length ()).equals (posPrefix))
- || (posSuffix.length () > 0
- && str.substring (str.length () -
- posSuffix.length ()).equals (posSuffix)))
+ && str.substring (0, posPrefix.length ()).equals (posPrefix))
+ || (posSuffix.length () > 0
+ && str.substring (str.length () -
+ posSuffix.length ()).equals (posSuffix)))
{
- parts += posSuffix;
+ parts += posSuffix;
}
tmpStr1 = this.actFormat.parse (parts).toString ();
if (isNegativ)
{
- tmpStr1 +=
- "." + str.substring (str.indexOf (d) + 1,
- str.length () - negSuffix.length ());
+ tmpStr1 +=
+ "." + str.substring (str.indexOf (d) + 1,
+ str.length () - negSuffix.length ());
}
else
{
- tmpStr1 +=
- "." + str.substring (str.indexOf (d) + 1,
- str.length () - posSuffix.length ());
+ tmpStr1 +=
+ "." + str.substring (str.indexOf (d) + 1,
+ str.length () - posSuffix.length ());
}
return tmpStr1;
* next String is get with {@link #myCoreNext(boolean, Pattern)} and
* then {@link #myApplyLocaleBD(String)} is called to convert the
* String into a BigDecimal.
- *
+ *
* @param delete
* Should the found string be deleted or not.
* @return Returns the BigDecimal value of the next string.
catch (ParseException e)
{
throw new InputMismatchException (ERR_PREFIX + tmp + IS_NOT +
- "BigDecimal!!");
+ "BigDecimal!!");
}
rc = new BigDecimal (tmp);
/**
* Applies suffix ("\E") and prefix ("\Q") if str.length != 0 Used
* by the toString method.
- *
+ *
* @param str
* the string on which the suffix and prefix should be applied.
* @return The new new string with the suffix and prefix.
{
if (str != null && str.length () > 0)
{
- return "\\Q" + str + "\\E";
+ return "\\Q" + str + "\\E";
}
return str;
}
* source. The search results are always saved in {@link #actResult}
* which is returned when match() is called. If doSkip is true the
* pattern is also taken.
- *
+ *
* @param delete
* if true the aktPos is set.
* @param pattern
{
if (this.isClosed)
{
- throw new IllegalStateException ("Scanner closed");
+ throw new IllegalStateException ("Scanner closed");
}
if (shallUseLastFound (pattern != null ? pattern : this.p))
{
- if (this.last_RegionEnd != this.myMatcher.regionEnd ())
- {
- System.out.println (this.last_RegionEnd + " != " +
- this.myMatcher.regionEnd () + " (" +
- (this.last_RegionEnd -
- this.myMatcher.regionEnd ()) + ")");
- }
- if (delete)
- {
- this.actPos = this.lastNextPos;
- this.lastFoundPresent = false;
- this.actResult = this.lastResult;
- }
- return this.lastFound;
+ if (this.last_RegionEnd != this.myMatcher.regionEnd ())
+ {
+ System.out.println (this.last_RegionEnd + " != " +
+ this.myMatcher.regionEnd () + " (" +
+ (this.last_RegionEnd -
+ this.myMatcher.regionEnd ()) + ")");
+ }
+ if (delete)
+ {
+ this.actPos = this.lastNextPos;
+ this.lastFoundPresent = false;
+ this.actResult = this.lastResult;
+ }
+ return this.lastFound;
}
boolean found = false;
if (this.actPos > this.MAX_PREFIX)
{
- // skipp the processed chars so that the size of the buffer don't grow to much even with
- // huge files
- this.procesedChars += this.actPos;
- this.actBuffer = this.actBuffer.substring (this.actPos);
- this.actPos = 0;
- this.myMatcher = pattern.matcher (this.actBuffer);
+ // skipp the processed chars so that the size of the buffer don't grow to much even with
+ // huge files
+ this.procesedChars += this.actPos;
+ this.actBuffer = this.actBuffer.substring (this.actPos);
+ this.actPos = 0;
+ this.myMatcher = pattern.matcher (this.actBuffer);
}
left = this.actBuffer.length () - this.actPos;
if (left < this.MIN_BUF_LEN)
{
- myFillBuffer ();
+ myFillBuffer ();
}
found = this.myMatcher.find (this.actPos);
if (found)
{
- if (this.doSkipp)
- {
- endIndex = this.myMatcher.end ();
- }
- else
- {
- endIndex = this.myMatcher.start ();
- }
- tmp2 = this.actBuffer.substring (this.actPos, endIndex);
- this.lastNextPos = this.myMatcher.end ();
- /*
- * if the delete flag is set, just set the current position after the end of the matched
- * pattern.
- */
- if (delete)
- {
- this.actPos = this.lastNextPos;
- }
- else
- {
- this.lastFound = tmp2;
- this.lastFoundPresent = true;
- this.lastPatternHash = pattern.hashCode ();
- }
- this.last_RegionStart = this.myMatcher.regionStart ();
- this.last_RegionEnd = this.myMatcher.regionEnd ();
- this.last_anchor = this.myMatcher.hasAnchoringBounds ();
- this.last_transparent = this.myMatcher.hasTransparentBounds ();
+ if (this.doSkipp)
+ {
+ endIndex = this.myMatcher.end ();
+ }
+ else
+ {
+ endIndex = this.myMatcher.start ();
+ }
+ tmp2 = this.actBuffer.substring (this.actPos, endIndex);
+ this.lastNextPos = this.myMatcher.end ();
+ /*
+ * if the delete flag is set, just set the current position after the end of the matched
+ * pattern.
+ */
+ if (delete)
+ {
+ this.actPos = this.lastNextPos;
+ }
+ else
+ {
+ this.lastFound = tmp2;
+ this.lastFoundPresent = true;
+ this.lastPatternHash = pattern.hashCode ();
+ }
+ this.last_RegionStart = this.myMatcher.regionStart ();
+ this.last_RegionEnd = this.myMatcher.regionEnd ();
+ this.last_anchor = this.myMatcher.hasAnchoringBounds ();
+ this.last_transparent = this.myMatcher.hasTransparentBounds ();
}
else if (this.myMatcher.hitEnd ())
// the end of input is matched
{
- tmp2 = this.actBuffer.substring (this.actPos);
- this.lastNextPos = this.actBuffer.length ();
- if (delete)
- {
- this.actPos = this.lastNextPos;
- }
- else
- {
- this.lastFound = tmp2;
- this.lastFoundPresent = true;
- this.lastPatternHash = pattern.hashCode ();
- }
- this.last_RegionStart = this.myMatcher.regionStart ();
- this.last_RegionEnd = this.myMatcher.regionEnd ();
- this.last_anchor = this.myMatcher.hasAnchoringBounds ();
- this.last_transparent = this.myMatcher.hasTransparentBounds ();
+ tmp2 = this.actBuffer.substring (this.actPos);
+ if (tmp2.length() == 0)
+ tmp2 = null;
+ this.lastNextPos = this.actBuffer.length ();
+ if (delete)
+ {
+ this.actPos = this.lastNextPos;
+ }
+ else
+ {
+ this.lastFound = tmp2;
+ this.lastFoundPresent = true;
+ this.lastPatternHash = pattern.hashCode ();
+ }
+ this.last_RegionStart = this.myMatcher.regionStart ();
+ this.last_RegionEnd = this.myMatcher.regionEnd ();
+ this.last_anchor = this.myMatcher.hasAnchoringBounds ();
+ this.last_transparent = this.myMatcher.hasTransparentBounds ();
}
else
{
- /*
- * if no match found an Exception is throwed
- */
- throw new NoSuchElementException ();
+ /*
+ * if no match found an Exception is throwed
+ */
+ throw new NoSuchElementException ();
}
/*
* change the Result only when a nextXXX() method was called, not if a hasNextXXX() method
*/
if (delete)
{
- this.actResult = this.myMatcher.toMatchResult ();
+ this.actResult = this.myMatcher.toMatchResult ();
- this.matchValid = this.actResult != null;
+ this.matchValid = this.actResult != null;
}
else
{
- this.lastResult = this.myMatcher.toMatchResult ();
+ this.lastResult = this.myMatcher.toMatchResult ();
}
this.skipped = this.doSkipp;
if (this.bIS != null)
{
- try
- {
- len = this.bIS.read (this.tmpBuffer);
- if (len < 0)
- {
- return;
- }
- if (this.charsetName != null)
- {
- tmpStr = new String (this.tmpBuffer, 0, len, this.charsetName);
- }
- else
- {
- tmpStr = new String (this.tmpBuffer, 0, len);
- }
- this.actBuffer += tmpStr;
- }
- catch (IOException e)
- {
- this.lastIOException = e;
- }
+ try
+ {
+ len = this.bIS.read (this.tmpBuffer);
+ if (len < 0)
+ {
+ return;
+ }
+ if (this.charsetName != null)
+ {
+ tmpStr = new String (this.tmpBuffer, 0, len, this.charsetName);
+ }
+ else
+ {
+ tmpStr = new String (this.tmpBuffer, 0, len);
+ }
+ this.actBuffer += tmpStr;
+ }
+ catch (IOException e)
+ {
+ this.lastIOException = e;
+ }
}
else if (this.readableSource != null)
{
- try
- {
- cb = CharBuffer.allocate (1000);
- this.needInput = true;
- len = this.readableSource.read (cb);
- if (len < 0)
- {
- return;
- }
- this.needInput = false;
- tmpStr = new String (cb.array ());
- this.actBuffer += tmpStr;
- }
- catch (IOException e)
- {
- this.lastIOException = e;
- }
+ try
+ {
+ cb = CharBuffer.allocate (1000);
+ this.needInput = true;
+ len = this.readableSource.read (cb);
+ if (len < 0)
+ {
+ return;
+ }
+ this.needInput = false;
+ tmpStr = new String (cb.array ());
+ this.actBuffer += tmpStr;
+ }
+ catch (IOException e)
+ {
+ this.lastIOException = e;
+ }
}
else if (this.rbcSource != null)
{
- try
- {
- bb = ByteBuffer.allocate (1000);
- this.needInput = true;
- len = this.rbcSource.read (bb);
- this.needInput = false;
- if (len < 0)
- {
- return;
- }
- if (this.charsetName != null)
- {
- tmpStr = new String (bb.array (), 0, len, this.charsetName);
- }
- else
- {
- tmpStr = new String (bb.array (), 0, len);
- }
- this.actBuffer += tmpStr;
- }
- catch (IOException e)
- {
- this.lastIOException = e;
- }
+ try
+ {
+ bb = ByteBuffer.allocate (1000);
+ this.needInput = true;
+ len = this.rbcSource.read (bb);
+ this.needInput = false;
+ if (len < 0)
+ {
+ return;
+ }
+ if (this.charsetName != null)
+ {
+ tmpStr = new String (bb.array (), 0, len, this.charsetName);
+ }
+ else
+ {
+ tmpStr = new String (bb.array (), 0, len);
+ }
+ this.actBuffer += tmpStr;
+ }
+ catch (IOException e)
+ {
+ this.lastIOException = e;
+ }
}
this.myMatcher.reset (this.actBuffer);
* A loop in which the {@link #myFillBuffer()} is called and checked
* if the pattern is found in the matcher and if the buffersize
* changes after the read.
- *
+ *
* @param aktM
* The current Matcher.
* @param pos
* @return <code> true </code> if the matcher has found a match.
*/
private boolean myFillBuffer_loop (final Matcher aktM, final int pos,
- boolean found)
+ boolean found)
{
int tmp;
tmp = this.actBuffer.length ();
while (aktM.hitEnd ()
- && ((this.bIS != null) || (this.readableSource != null)
- || (this.rbcSource != null)))
+ && ((this.bIS != null) || (this.readableSource != null)
+ || (this.rbcSource != null)))
{
- myFillBuffer ();
- if (tmp == this.actBuffer.length ())
- {
- break;
- }
- found = aktM.find (pos);
- this.needInput = true;
+ myFillBuffer ();
+ if (tmp == this.actBuffer.length ())
+ {
+ break;
+ }
+ found = aktM.find (pos);
+ this.needInput = true;
}
return found;
}
* overwritten using the given pattern and the given Sting. <br>
* After the search the original values are restored, and skipped is
* set <code> true </code>.
- *
+ *
* @param pattern
* Pattern which should be matched.
* @param str
* @return Returns the String in the given String that matches the pattern.
*/
private String myFindPInStr (final Pattern pattern, final String str,
- final int horizon)
+ final int horizon)
{
String rc = null;
int curPos = this.actPos;
this.myMatcher = pattern.matcher (str);
if (horizon > 0)
{
- this.myMatcher.useAnchoringBounds (true);
- this.myMatcher.useTransparentBounds (true);
- this.myMatcher.region (this.actPos, this.actPos + horizon);
+ this.myMatcher.useAnchoringBounds (true);
+ this.myMatcher.useTransparentBounds (true);
+ this.myMatcher.region (this.actPos, this.actPos + horizon);
}
rc = myCoreNext (true, pattern);
this.myMatcher = aktMatcher;
* subsring.<br> Finally the current Buffer and matcher (which have
* been temporarily changed) are set back.<br> <br> The {@link
* #skipped} is set <code> true </code>.
- *
+ *
* @param pattern
* Pattern to find until the current delimiter.
* @param delete
* and useLocale is <code> true </code>. Afterwards it is tried to
* call the Constructor of a {@link BigInteger} with the given
* radix.
- *
+ *
* @param radix The radix to use.
* @param delete If the found String should be removed from input or
* not.
* If there is a {@link ParseException} or a {@link NumberFormatException}.
*/
private BigInteger myNextBigInteger (final int radix, final boolean delete,
- final String name)
+ final String name)
{
BigInteger rc;
String tmp = myPrepareForNext (this.p, delete);
* an {@link InputMismatchException} is thrown. It ignores the case
* of the string so that "true" and "TRUE" and even "TrUe" are
* accepted.
- *
+ *
* @param delete Should the found value be removed from the input or
* not.
* @return Returns the boolean value (if it is a boolean).
String tmp = myPrepareForNext (this.p, delete);
if (tmp.equalsIgnoreCase ("true"))
{
- return true;
+ return true;
}
else if (tmp.equalsIgnoreCase ("false"))
{
- return false;
+ return false;
}
else
{
- throw new InputMismatchException (ERR_PREFIX + tmp + NOT_BOOLEAN);
+ throw new InputMismatchException (ERR_PREFIX + tmp + NOT_BOOLEAN);
}
}
* String matching the current delimier. Afterwards it is tryed to
* convert the String into a byte. Any Error will lead into a {@link
* InputMismatchException}.
- *
+ *
* @param radix The radix to use.
* @param delete Should the found String be removed from the input.
* @return Returns the byte value of the String.
* @throws InputMismatchException if the next String is not a byte.
*/
private byte myNextByte (final int radix,
- final boolean delete) throws InputMismatchException
+ final boolean delete) throws InputMismatchException
{
byte rc;
String tmp = myPrepareForNext (this.p, delete);
* don't match, an {@link InputMismatchException} is thrown.<br>
* <br> The radix used is always 10 even if the global radix is
* changed.
- *
+ *
* @param delete Should the String be removed, if true it will be
* also removed if the String is not a double value.
* @return Returns the double value of the next String.
tmp = myApplyLocale (tmp, 10);
rc = Double.parseDouble (tmp);
if (("" + rc).equals (tmp))
- {
- return rc;
- }
+ {
+ return rc;
+ }
}
catch (ParseException e)
{
* should be applied or not and then the result is parsed using
* {@link Integer#parseInt(String, int)}. Any Error will lead to an
* {@link InputMismatchException}.
- *
+ *
* @param radix The radix to use.
* @param delete <code> true </code> if the String should be deleted
* from the input.
* @throws InputMismatchException if the next String is not an int.
*/
private int myNextInt (final int radix,
- final boolean delete) throws InputMismatchException
+ final boolean delete) throws InputMismatchException
{
int rc;
String tmp = myPrepareForNext (this.p, delete);
try
{
- tmp = myApplyLocale (tmp, radix);
- rc = Integer.parseInt (tmp, radix);
- return rc;
+ tmp = myApplyLocale (tmp, radix);
+ rc = Integer.parseInt (tmp, radix);
+ return rc;
}
catch (NumberFormatException nfe)
{
/**
* Finds the next line using the {@link #NEW_LINE} constant which is
* set to the system specific line seperator.
- *
- * @param delete Should the found line be deleted from the input.
- * @return Returns the current line.
+ *
+ * @param delete should the found line be deleted from the input.
+ * @return the current line.
*/
private String myNextLine (final boolean delete)
{
- String rc = null;
- rc = myPrepareForNext (Pattern.compile (NEW_LINE), delete);
- return rc;
+ return myPrepareForNext (Pattern.compile (NEW_LINE), delete);
}
/**
* Tries to interpret the next String as a long value with the given
* radix. Therfore the {@link Long#parseLong(String, int)} is called
* and every Error will lead into a {@link InputMismatchException}.
- *
+ *
* @param radix The radix to be used.
* @param delete Should the found String be deleted from the input.
* @return the long value of the next String.
* @throws InputMismatchException if the next String is not a long.
*/
private long myNextLong (final int radix,
- final boolean delete) throws InputMismatchException
+ final boolean delete) throws InputMismatchException
{
long rc;
String tmp = myPrepareForNext (this.p, delete);
try
{
- tmp = myApplyLocale (tmp, radix);
- rc = Long.parseLong (tmp, radix);
- return rc;
+ tmp = myApplyLocale (tmp, radix);
+ rc = Long.parseLong (tmp, radix);
+ return rc;
}
catch (NumberFormatException nfe)
{
* given radix. Therfore the {@link Short#parseShort(String, int)}
* is called and every Error will lead into a {@link
* InputMismatchException} .
- *
+ *
* @param radix
* The radix to be used.
* @param delete
* if the next String is not a short.
*/
private short myNextShort (final int radix,
- final boolean delete) throws
+ final boolean delete) throws
InputMismatchException
{
short rc;
String tmp = myPrepareForNext (this.p, delete);
-
+
try
{
- tmp = myApplyLocale (tmp, radix);
- rc = Short.parseShort (tmp, radix);
- return rc;
+ tmp = myApplyLocale (tmp, radix);
+ rc = Short.parseShort (tmp, radix);
+ return rc;
}
catch (NumberFormatException nfe)
{
{
}
throw new InputMismatchException (ERR_PREFIX + tmp +
- "\" is not a short");
+ "\" is not a short");
}
/**
* Sets the current pattern to the given pattern and calls the
* {@link #myCoreNext(boolean, Pattern)}. Finally sets the pattern
* back to its old value.
- *
+ *
* @param aktPattern Pattern to be used for the next match.
* @param delete Should the found String be deleted or not.
* @return Return the String returned from {@link
* #myCoreNext(boolean, Pattern)}.
*/
private String myPrepareForNext (final Pattern aktPattern,
- final boolean delete)
+ final boolean delete)
{
String rc;
* Determinates if the last found can be used, so that after a
* hasNextXXX the nextXXX has not to search if nothing has
* changed.<br /> Used in {@link #myCoreNext(boolean, Pattern)}.
- *
+ *
* @param aktP The pattern which should be checked.
* @return <code> true </code> if the searchresult is already ready.
*/
private boolean shallUseLastFound (final Pattern aktP)
{
if (this.lastFoundPresent &&
- this.lastPatternHash == aktP.hashCode () &&
- this.last_RegionStart == this.myMatcher.regionStart () &&
- this.last_anchor == this.myMatcher.hasAnchoringBounds () &&
- this.last_transparent == this.myMatcher.hasTransparentBounds ())
+ this.lastPatternHash == aktP.hashCode () &&
+ this.last_RegionStart == this.myMatcher.regionStart () &&
+ this.last_anchor == this.myMatcher.hasAnchoringBounds () &&
+ this.last_transparent == this.myMatcher.hasTransparentBounds ())
{
- if (this.last_RegionEnd != this.myMatcher.regionEnd ())
- {
- int tmpVal =
- this.myMatcher.regionEnd () -
- this.last_RegionEnd - this.MAX_PREFIX;
- if (tmpVal > 0 && tmpVal < 20)
- {
- this.last_RegionEnd =
- this.myMatcher.regionEnd ();
- return true;
- }
- }
- else
- return true;
+ if (this.last_RegionEnd != this.myMatcher.regionEnd ())
+ {
+ int tmpVal =
+ this.myMatcher.regionEnd () -
+ this.last_RegionEnd - this.MAX_PREFIX;
+ if (tmpVal > 0 && tmpVal < 20)
+ {
+ this.last_RegionEnd =
+ this.myMatcher.regionEnd ();
+ return true;
+ }
+ }
+ else
+ return true;
}
return false;
}
{
public int size()
{
- return size();
+ return DescendingMap.this.size();
}
public Iterator<DV> iterator()
public void clear()
{
- clear();
+ DescendingMap.this.clear();
}
};
return values;
* The end of the region of the input on which to match.
*/
private int regionEnd;
-
+
/**
- * True if the match process should look beyond the
+ * True if the match process should look beyond the
* region marked by regionStart to regionEnd when
* performing lookAhead, lookBehind and boundary
* matching.
transparentBounds = false;
anchoringBounds = 0;
}
-
+
/**
* @param sb The target string buffer
* @param replacement The replacement string
{
assertMatchOp();
sb.append(input.subSequence(appendPosition,
- match.getStartIndex()).toString());
+ match.getStartIndex()).toString());
sb.append(RE.getReplacement(replacement, match,
- RE.REG_REPLACE_USE_BACKSLASHESCAPE));
+ RE.REG_REPLACE_USE_BACKSLASHESCAPE));
appendPosition = match.getEndIndex();
return this;
}
sb.append(input.subSequence(appendPosition, input.length()).toString());
return sb;
}
-
+
/**
* @exception IllegalStateException If no match has yet been attempted,
* or if the previous match operation failed
assertMatchOp();
return match.getEndIndex();
}
-
+
/**
* @param group The index of a capturing group in this matcher's pattern
*
assertMatchOp();
return match.getEndIndex(group);
}
-
+
public boolean find ()
{
boolean first = (match == null);
match = pattern.getRE().getMatch(inputCharIndexed, position, anchoringBounds);
else
match = pattern.getRE().getMatch(input.subSequence(regionStart, regionEnd),
- position, anchoringBounds);
+ position, anchoringBounds);
if (match != null)
{
- int endIndex = match.getEndIndex();
- // Are we stuck at the same position?
- if (!first && endIndex == position)
- {
- match = null;
- // Not at the end of the input yet?
- if (position < input.length() - 1)
- {
- position++;
- return find(position);
- }
- else
- return false;
- }
- position = endIndex;
- return true;
+ int endIndex = match.getEndIndex();
+ // Are we stuck at the same position?
+ if (!first && endIndex == position)
+ {
+ match = null;
+ // Not at the end of the input yet?
+ if (position < input.length() - 1)
+ {
+ position++;
+ return find(position);
+ }
+ else
+ return false;
+ }
+ position = endIndex;
+ return true;
}
return false;
- }
+ }
/**
* @param start The index to start the new pattern matching
match = pattern.getRE().getMatch(inputCharIndexed, start, anchoringBounds);
else
match = pattern.getRE().getMatch(input.subSequence(regionStart, regionEnd),
- start, anchoringBounds);
+ start, anchoringBounds);
if (match != null)
{
- position = match.getEndIndex();
- return true;
+ position = match.getEndIndex();
+ return true;
}
return false;
}
-
+
/**
* @exception IllegalStateException If no match has yet been attempted,
* or if the previous match operation failed
assertMatchOp();
return match.toString();
}
-
+
/**
* @param group The index of a capturing group in this matcher's pattern
*
reset();
// Semantics might not quite match
return pattern.getRE().substitute(input, replacement, position,
- RE.REG_REPLACE_USE_BACKSLASHESCAPE);
+ RE.REG_REPLACE_USE_BACKSLASHESCAPE);
}
/**
{
reset();
return pattern.getRE().substituteAll(input, replacement, position,
- RE.REG_REPLACE_USE_BACKSLASHESCAPE);
+ RE.REG_REPLACE_USE_BACKSLASHESCAPE);
}
-
+
public int groupCount ()
{
return pattern.getRE().getNumSubs();
}
-
+
public boolean lookingAt ()
{
if (transparentBounds || (regionStart == 0 && regionEnd == input.length()))
match = pattern.getRE().getMatch(inputCharIndexed, regionStart,
- anchoringBounds|RE.REG_FIX_STARTING_POSITION|RE.REG_ANCHORINDEX);
+ anchoringBounds|RE.REG_FIX_STARTING_POSITION|RE.REG_ANCHORINDEX);
else
match = pattern.getRE().getMatch(input.subSequence(regionStart, regionEnd), 0,
- anchoringBounds|RE.REG_FIX_STARTING_POSITION);
+ anchoringBounds|RE.REG_FIX_STARTING_POSITION);
if (match != null)
{
- if (match.getStartIndex() == 0)
- {
- position = match.getEndIndex();
- return true;
- }
- match = null;
+ if (match.getStartIndex() == 0)
+ {
+ position = match.getEndIndex();
+ return true;
+ }
+ match = null;
}
return false;
}
-
+
/**
- * Attempts to match the entire input sequence against the pattern.
+ * Attempts to match the entire input sequence against the pattern.
*
* If the match succeeds then more information can be obtained via the
* start, end, and group methods.
{
if (transparentBounds || (regionStart == 0 && regionEnd == input.length()))
match = pattern.getRE().getMatch(inputCharIndexed, regionStart,
- anchoringBounds|RE.REG_TRY_ENTIRE_MATCH|RE.REG_FIX_STARTING_POSITION|RE.REG_ANCHORINDEX);
+ anchoringBounds|RE.REG_TRY_ENTIRE_MATCH|RE.REG_FIX_STARTING_POSITION|RE.REG_ANCHORINDEX);
else
match = pattern.getRE().getMatch(input.subSequence(regionStart, regionEnd), 0,
- anchoringBounds|RE.REG_TRY_ENTIRE_MATCH|RE.REG_FIX_STARTING_POSITION);
+ anchoringBounds|RE.REG_TRY_ENTIRE_MATCH|RE.REG_FIX_STARTING_POSITION);
if (match != null)
{
- if (match.getStartIndex() == 0)
- {
- position = match.getEndIndex();
- if (position == input.length())
- return true;
- }
- match = null;
+ if (match.getStartIndex() == 0)
+ {
+ position = match.getEndIndex();
+ if (position == input.length())
+ return true;
+ }
+ match = null;
}
return false;
}
-
+
/**
* Returns the Pattern that is interpreted by this Matcher
*/
{
return pattern;
}
-
+
/**
* Resets the internal state of the matcher, including
* resetting the region to its default state of encompassing
appendPosition = 0;
return this;
}
-
+
/**
* Resets the internal state of the matcher, including
* resetting the region to its default state of encompassing
this.inputCharIndexed = RE.makeCharIndexed(input, 0);
return reset();
}
-
+
/**
* @return the index of a capturing group in this matcher's pattern
*
{
return regionStart;
}
-
+
/**
* The end of the region on which to perform matches (exclusive).
*
public MatchResult toMatchResult()
{
Matcher snapshot = new Matcher(pattern, input);
- snapshot.match = (REMatch) match.clone();
+ if (match != null)
+ snapshot.match = (REMatch) match.clone();
return snapshot;
}
*/
public int inflate (byte[] buf, int off, int len) throws DataFormatException
{
- /* Special case: len may be zero */
- if (len == 0)
- return 0;
/* Check for correct buff, off, len triple */
if (0 > off || off > off + len || off + len > buf.length)
throw new ArrayIndexOutOfBoundsException();
int count = 0;
- int more;
- do
+ for (;;)
{
- if (mode != DECODE_CHKSUM)
- {
- /* Don't give away any output, if we are waiting for the
- * checksum in the input stream.
- *
- * With this trick we have always:
- * needsInput() and not finished()
- * implies more output can be produced.
- */
- more = outputWindow.copyOutput(buf, off, len);
- adler.update(buf, off, more);
- off += more;
- count += more;
- totalOut += more;
- len -= more;
- if (len == 0)
- return count;
- }
+ if (outputWindow.getAvailable() == 0)
+ {
+ if (!decode())
+ break;
+ }
+ else if (len > 0)
+ {
+ int more = outputWindow.copyOutput(buf, off, len);
+ adler.update(buf, off, more);
+ off += more;
+ count += more;
+ totalOut += more;
+ len -= more;
+ }
+ else
+ break;
}
- while (decode() || (outputWindow.getAvailable() > 0
- && mode != DECODE_CHKSUM));
return count;
}
* This class represents a Kerberos ticket. See the Kerberos
* authentication RFC for more information:
* <a href="http://www.ietf.org/rfc/rfc1510.txt">RFC 1510</a>.
- *
+ *
* @since 1.4
*/
public class KerberosTicket
/**
* Create a new ticket given all the facts about it.
- *
+ *
* Note that flags may be null or "short"; any flags not specified
* will be taken to be false.
- *
+ *
* If the key is not renewable, then renewTill may be null.
- *
+ *
* If authTime is null, then it is taken to be the same as startTime.
- *
+ *
* If clientAddresses is null, then the ticket can be used anywhere.
- *
+ *
* @param asn1Encoding the contents of the ticket, as ASN1
* @param client the client principal
* @param server the server principal
{
return (Date) startTime.clone();
}
-
+
/**
* Return the end time for this ticket.
*/
{
return (Date) endTime.clone();
}
-
+
/**
* Return the renewal time for this ticket. For a non-renewable
* ticket, this will return null.
public String toString()
{
- return "FIXME bob";
+ return getClass().getName() +
+ "[client=" + client +
+ ",server=" + server +
+ ",sessionKey=" + sessionKey +
+ ",flags=" + flags +
+ ",authTime=" + authTime +
+ ",startTime= " + startTime +
+ ",endTime=" + endTime +
+ ",renewTill=" + renewTill +
+ ",clientAddresses=" + clientAddresses +
+ "]";
+ }
+
+ /**
+ * <p>
+ * Returns the type of the session key in accordance with
+ * RFC1510. This usually corresponds to the encryption
+ * algorithm used by the key, though more than one algorithm
+ * may use the same key type (e.g. DES with different checksum
+ * mechanisms and chaining modes). Negative values are reserved
+ * for local use. Non-negative values are for officially assigned
+ * type fields. The RFC defines:
+ * </p>
+ * <ul>
+ * <li>0 — null</li>
+ * <li>1 — DES (in CBC mode with either MD4 or MD5 checksums)</li>
+ * </ul>
+ *
+ * @return the type of session key used by this ticket.
+ */
+ public final int getSessionKeyType()
+ {
+ return sessionKey.type;
}
+
}
// FIXME.
return null;
}
+
+ public String toString()
+ {
+ return getClass().getName() +
+ "[type=" + type +
+ ",algorithm=" + algorithm +
+ "]";
+ }
+
}
try
{
styleSheet = new StyleSheet();
- Class c = HTMLEditorKit.class;
+ Class<?> c = HTMLEditorKit.class;
InputStream in = c.getResourceAsStream(DEFAULT_CSS);
InputStreamReader r = new InputStreamReader(in);
styleSheet.loadRules(r, null);
private HTMLDocument htmlDoc = null;
/**
- * Used to keep track of which embeded has been written out.
+ * Used to keep track of which embedded has been written out.
*/
- private HashSet openEmbededTagHashSet = null;
+ private HashSet<HTML.Tag> openEmbeddedTagHashSet = null;
private String new_line_str = "" + NEWLINE;
private int doc_len = -1;
private int doc_offset_remaining = -1;
private int doc_len_remaining = -1;
- private HashSet htmlFragmentParentHashSet = null;
+ private HashSet<Element> htmlFragmentParentHashSet = null;
private Element startElem = null;
private Element endElem = null;
private boolean fg_pass_start_elem = false;
super(writer, doc);
outWriter = writer;
htmlDoc = doc;
- openEmbededTagHashSet = new HashSet();
+ openEmbeddedTagHashSet = new HashSet<HTML.Tag>();
} // public HTMLWriter(Writer writer, HTMLDocument doc)
/**
super(writer, doc, pos, len);
outWriter = writer;
htmlDoc = doc;
- openEmbededTagHashSet = new HashSet();
+ openEmbeddedTagHashSet = new HashSet<HTML.Tag>();
doc_pos = pos;
doc_offset_remaining = pos;
doc_len = len;
doc_len_remaining = len;
- htmlFragmentParentHashSet = new HashSet();
+ htmlFragmentParentHashSet = new HashSet<Element>();
} // public HTMLWriter(Writer writer, HTMLDocument doc, int pos, int len)
/**
} // else
// NOTE: close out remaining open embeded tags.
- Object[] tag_arr = openEmbededTagHashSet.toArray();
+ HTML.Tag[] tag_arr =
+ openEmbeddedTagHashSet.toArray(new HTML.Tag[openEmbeddedTagHashSet.size()]);
for (int i = 0; i < tag_arr.length; i++)
{
protected void writeAttributes(AttributeSet attrSet)
throws IOException
{
- Enumeration attrNameEnum = attrSet.getAttributeNames();
-
+ Enumeration<?> attrNameEnum = attrSet.getAttributeNames();
+
while (attrNameEnum.hasMoreElements())
{
Object key = attrNameEnum.nextElement();
protected void writeEmbeddedTags(AttributeSet attrSet)
throws IOException
{
- Enumeration attrNameEnum = attrSet.getAttributeNames();
+ Enumeration<?> attrNameEnum = attrSet.getAttributeNames();
while (attrNameEnum.hasMoreElements())
{
if (key instanceof HTML.Tag)
{
- if (!openEmbededTagHashSet.contains(key))
+ if (!openEmbeddedTagHashSet.contains(key))
{
writeRaw("<" + key);
writeAttributes((AttributeSet) value);
writeRaw(">");
- openEmbededTagHashSet.add(key);
+ openEmbeddedTagHashSet.add((HTML.Tag) key);
} // if(!openEmbededTagHashSet.contains(key))
} // if(key instanceof HTML.Tag)
} // while(attrNameEnum.hasMoreElements())
protected void closeOutUnwantedEmbeddedTags(AttributeSet attrSet)
throws IOException
{
- Object[] tag_arr = openEmbededTagHashSet.toArray();
+ HTML.Tag[] tag_arr =
+ openEmbeddedTagHashSet.toArray(new HTML.Tag[openEmbeddedTagHashSet.size()]);
for (int i = 0; i < tag_arr.length; i++)
{
- HTML.Tag key = (HTML.Tag) tag_arr[i];
+ HTML.Tag key = tag_arr[i];
if (!attrSet.isDefined(key))
{
writeRaw("</" + key.toString() + ">");
- openEmbededTagHashSet.remove(key);
+ openEmbeddedTagHashSet.remove(key);
} // if(!attrSet.isDefined(key))
} // for(int i = 0; i < tag_arr.length; i++)
if (matchNameAttribute(attrSet, HTML.Tag.TITLE))
{
boolean fg_is_end_tag = false;
- Enumeration attrNameEnum = attrSet.getAttributeNames();
+ Enumeration<?> attrNameEnum = attrSet.getAttributeNames();
while (attrNameEnum.hasMoreElements())
{
if (matchNameAttribute(attrSet, HTML.Tag.TITLE))
{
boolean fg_is_end_tag = false;
- Enumeration attrNameEnum = attrSet.getAttributeNames();
+ Enumeration<?> attrNameEnum = attrSet.getAttributeNames();
while (attrNameEnum.hasMoreElements())
{
private void writeAllAttributes(AttributeSet attrSet)
throws IOException
{
- Enumeration attrNameEnum = attrSet.getAttributeNames();
+ Enumeration<?> attrNameEnum = attrSet.getAttributeNames();
while (attrNameEnum.hasMoreElements())
{
*/
public float getPreferredSpan(int axis)
{
- AttributeSet attrs = getAttributes();
-
Image image = getImage();
if (axis == View.X_AXIS)
Image newIm = getImage();
if (newIm != null)
{
- AttributeSet atts = getAttributes();
// Fetch width.
Length l = spans[X_AXIS];
if (l != null)
import javax.swing.text.StyledDocument;
import java.io.Writer;
import java.io.IOException;
+import java.util.ArrayDeque;
+import java.util.Deque;
import java.util.Enumeration;
-import java.util.Stack;
import java.awt.Color;
/**
public class MinimalHTMLWriter extends AbstractWriter
{
private StyledDocument doc;
- private Stack tagStack;
+ private Deque<String> tagStack;
private boolean inFontTag = false;
/**
{
super(w, doc);
this.doc = doc;
- tagStack = new Stack();
+ tagStack = new ArrayDeque<String>();
}
/**
{
super(w, doc, pos, len);
this.doc = doc;
- tagStack = new Stack();
+ tagStack = new ArrayDeque<String>();
}
/**
{
if(doc instanceof DefaultStyledDocument)
{
- Enumeration styles = ((DefaultStyledDocument)doc).getStyleNames();
+ Enumeration<?> styles = ((DefaultStyledDocument)doc).getStyleNames();
while(styles.hasMoreElements())
writeStyle(doc.getStyle((String)styles.nextElement()));
}
*/
protected void writeAttributes(AttributeSet attr) throws IOException
{
- Enumeration attribs = attr.getAttributeNames();
+ Enumeration<?> attribs = attr.getAttributeNames();
while(attribs.hasMoreElements())
{
Object attribName = attribs.nextElement();
*/
private void endOpenTags() throws IOException
{
- while(!tagStack.empty())
- write((String)tagStack.pop());
+ while(tagStack.size() > 0)
+ write(tagStack.pop());
if( inFontTag() )
{
* The Enumeration for the multiplexed names.
*/
private class MultiNameEnumeration
- implements Enumeration
+ implements Enumeration<Object>
{
/**
* The index of the current AttributeSet.
/**
* The names Enumeration of the current AttributeSet.
*/
- private Enumeration current;
+ private Enumeration<?> current;
/**
* Creates a new instance.
public boolean containsAttributes(AttributeSet attributes)
{
boolean ret = true;
- Enumeration e = attributes.getAttributeNames();
+ Enumeration<?> e = attributes.getAttributeNames();
while (ret && e.hasMoreElements())
{
Object key = e.nextElement();
return n;
}
- public Enumeration getAttributeNames()
+ public Enumeration<?> getAttributeNames()
{
return new MultiNameEnumeration();
}
*
* @author Roman Kennke (kennke@aicas.com)
*/
-public class MultiStyle
+class MultiStyle
extends MultiAttributeSet
implements Style
{
attributes.removeAttribute(name);
}
- public void removeAttributes(Enumeration names)
+ public void removeAttributes(Enumeration<?> names)
{
attributes.removeAttribute(names);
}
String classId = (String) atts.getAttribute("classid");
try
{
- Class objectClass = Class.forName(classId);
+ Class<?> objectClass = Class.forName(classId);
Object instance = objectClass.newInstance();
comp = (Component) instance;
}
*
* @return the resolved style
*/
- private Style getResolvedStyle(String selector, List path, HTML.Tag tag)
+ private Style getResolvedStyle(String selector, List<Element> path, HTML.Tag tag)
{
Style style = resolvedStyles.get(selector);
if (style == null)
/**
* Resolves a style. This creates arrays that hold the tag names,
* class and id attributes and delegates the work to
- * {@link #resolveStyle(String, String[], Map[])}.
+ * {@link #resolveStyle(String, String[], List<Map<String,String>>)}.
*
* @param selector the selector
* @param path the Element path
*
* @return the resolved style
*/
- private Style resolveStyle(String selector, List path, HTML.Tag tag)
+ private Style resolveStyle(String selector, List<Element> path, HTML.Tag tag)
{
int count = path.size();
String[] tags = new String[count];
- Map[] attributes = new Map[count];
+ List<Map<String,String>> attributes =
+ new ArrayList<Map<String,String>>(count);
for (int i = 0; i < count; i++)
{
- Element el = (Element) path.get(i);
+ Element el = path.get(i);
AttributeSet atts = el.getAttributes();
if (i == 0 && el.isLeaf())
{
tags[i] = t.toString();
else
tags[i] = null;
- attributes[i] = attributeSetToMap(atts);
+ attributes.set(i, attributeSetToMap(atts));
}
else
{
tags[i] = null;
- attributes[i] = null;
}
}
tags[0] = tag.toString();
*
* @return the resolved style
*/
- private Style resolveStyle(String selector, String[] tags, Map[] attributes)
+ private Style resolveStyle(String selector, String[] tags,
+ List<Map<String,String>> attributes)
{
// FIXME: This style resolver is not correct. But it works good enough for
// the default.css.
// Sort selectors.
Collections.sort(styles);
- Style[] styleArray = new Style[styles.size()];
- styleArray = (Style[]) styles.toArray(styleArray);
- Style resolved = new MultiStyle(selector,
- (Style[]) styles.toArray(styleArray));
+ Style[] styleArray = styles.toArray(new Style[styles.size()]);
+ Style resolved = new MultiStyle(selector, styleArray);
resolvedStyles.put(selector, resolved);
return resolved;
}
public Style getRule(String selector)
{
CSSStyle best = null;
- for (Iterator i = css.iterator(); i.hasNext();)
+ for (Iterator<CSSStyle> i = css.iterator(); i.hasNext();)
{
- CSSStyle style = (CSSStyle) i.next();
+ CSSStyle style = i.next();
if (style.compareTo(best) < 0)
best = style;
}
public void addStyleSheet(StyleSheet ss)
{
if (linked == null)
- linked = new ArrayList();
+ linked = new ArrayList<StyleSheet>();
linked.add(ss);
}
*
* @return the converted map
*/
- private Map attributeSetToMap(AttributeSet atts)
+ private Map<String,String> attributeSetToMap(AttributeSet atts)
{
HashMap<String,String> map = new HashMap<String,String>();
Enumeration<?> keys = atts.getAttributeNames();
int spans[])
{
updateGrid();
- int numCols = offsets.length;
int realColumn = 0;
int colCount = getViewCount();
for (int i = 0; i < numColumns;)
*
* @return an enumeration of tree nodes
*/
+ @SuppressWarnings("unchecked") // Required for API compatibility
public Enumeration children()
{
if (children.size() == 0)
*/
public TreeNode getChildAt(int index)
{
- return (TreeNode) children.elementAt(index);
+ return children.elementAt(index);
}
/**
*
* @return Enumeration
*/
+ @SuppressWarnings("unchecked") // Required for API compatibility
public Enumeration preorderEnumeration()
{
return new PreorderEnumeration(this);
*
* @return Enumeration
*/
+ @SuppressWarnings("unchecked") // Required for API compatibility
public Enumeration postorderEnumeration()
{
return new PostorderEnumeration(this);
*
* @return Enumeration
*/
+ @SuppressWarnings("unchecked") // Required for API compatibility
public Enumeration breadthFirstEnumeration()
{
return new BreadthFirstEnumeration(this);
*
* @return Enumeration
*/
+ @SuppressWarnings("unchecked") // Required for API compatibility
public Enumeration depthFirstEnumeration()
{
return postorderEnumeration();
*
* @return Enumeration
*/
+ @SuppressWarnings("unchecked") // Required for API compatibility
public Enumeration pathFromAncestorEnumeration(TreeNode node)
{
if (node == null)
*/
public TreeNode getFirstChild()
{
- return (TreeNode) children.firstElement();
+ return children.firstElement();
}
/**
*/
public TreeNode getLastChild()
{
- return (TreeNode) children.lastElement();
+ return children.lastElement();
}
/**
public int getLeafCount()
{
int count = 0;
- Enumeration e = depthFirstEnumeration();
+ Enumeration<?> e = depthFirstEnumeration();
while (e.hasMoreElements())
{
{
if (dirty)
update();
- Vector p = new Vector(parentPath.getPathCount());
+ Vector<TreePath> p = new Vector<TreePath>(parentPath.getPathCount());
Object node;
NodeRecord nr;
node = parentPath.getPathComponent(i);
nr = nodes.get(node);
if (nr.row >= 0)
- p.add(node);
+ p.add((TreePath) node);
}
return p.elements();
}
*
* @return An enumeration of the children of this node.
*/
+ @SuppressWarnings("unchecked") // Required for API compatibility
Enumeration children();
}
TreePath path = null;
// Search row in the nodes map. TODO: This is inefficient, optimize this.
- Enumeration nodesEnum = nodes.elements();
+ Enumeration<NodeRecord> nodesEnum = nodes.elements();
while (nodesEnum.hasMoreElements() && path == null)
{
- NodeRecord record = (NodeRecord) nodesEnum.nextElement();
+ NodeRecord record = nodesEnum.nextElement();
if (record.row == row)
path = record.getPath();
}
{
if (dirty)
update();
- Vector p = new Vector(parentPath.getPathCount());
+ Vector<TreePath> p = new Vector<TreePath>(parentPath.getPathCount());
Object node;
NodeRecord nr;
node = parentPath.getPathComponent(i);
nr = nodes.get(node);
if (nr != null && nr.row >= 0)
- p.add(node);
+ p.add((TreePath) node);
}
return p.elements();
}
*/
protected void removeRedundantState()
{
- Iterator i = preState.keySet().iterator();
+ Iterator<Object> i = preState.keySet().iterator();
while (i.hasNext())
{
Object key = i.next();
protected void _postEdit(UndoableEdit edit)
{
UndoableEditEvent event;
- Iterator iter;
+ Iterator<UndoableEditListener> iter;
// Do nothing if we have no listeners.
if (listeners.isEmpty())
// Iterator, a java.util.ConcurrentModificationException; in the
// case of a direct loop over the Vector elements, some
// index-out-of-bounds exception).
- iter = ((Vector) listeners.clone()).iterator();
+ iter = new Vector<UndoableEditListener>(listeners).iterator();
while (iter.hasNext())
- ((UndoableEditListener) iter.next()).undoableEditHappened(event);
+ iter.next().undoableEditHappened(event);
}
/* XMLEventFactory.java --
- Copyright (C) 2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* system resource</li>
* <li>the default factory class</li>
* </ol>
+ * @param factoryId name of the factory to find, same as a property name
+ * @param classLoader the class loader to use
+ * @return the factory implementation
+ * @exception FactoryConfigurationError if an instance of this factory
+ * cannot be loaded
*/
- static XMLEventFactory newInstance(String factoryId, ClassLoader classLoader)
+ public static XMLEventFactory newInstance(String factoryId,
+ ClassLoader classLoader)
throws FactoryConfigurationError
{
ClassLoader loader = classLoader;
/* XMLInputFactory.java --
- Copyright (C) 2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* system resource</li>
* <li>the default factory class</li>
* </ol>
+ * @param factoryId name of the factory, same as a property name
+ * @param classLoader the class loader to use
+ * @return the factory implementation
+ * @exception FactoryConfigurationError if an instance of this factory
+ * cannot be loaded
*/
public static XMLInputFactory newInstance(String factoryId,
ClassLoader classLoader)
/* XMLOutputFactory.java --
- Copyright (C) 2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
{
}
+ /**
+ * Creates a new <b>output</b> factory.
+ * @see #newInstance(String,ClassLoader)
+ */
+ public static XMLOutputFactory newInstance()
+ throws FactoryConfigurationError
+ {
+ return newInstance(null, null);
+ }
+
/**
* Creates a new <b>output</b> factory.
* The implementation class to load is the first found in the following
* system resource</li>
* <li>the default factory class</li>
* </ol>
+ * @param factoryId the name of the factory, same as the property
+ * @param classLoader the class loader to use
+ * @return a new factory instance
+ * @exception FactoryConfigurationError if an instance of this factory
+ * could not be loaded
*/
- public static XMLOutputFactory newInstance()
+ public static XMLOutputFactory newInstance(String factoryId,
+ ClassLoader classLoader)
throws FactoryConfigurationError
{
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- if (loader == null)
+ if (classLoader == null)
{
- loader = XMLOutputFactory.class.getClassLoader();
+ classLoader = Thread.currentThread().getContextClassLoader();
+ }
+ if (classLoader == null)
+ {
+ classLoader = XMLOutputFactory.class.getClassLoader();
}
String className = null;
int count = 0;
do
{
- className = getFactoryClassName(loader, count++);
+ className = getFactoryClassName(classLoader, count++);
if (className != null)
{
try
{
- Class<?> t = (loader != null) ? loader.loadClass(className) :
+ Class<?> t = (classLoader != null) ?
+ classLoader.loadClass(className) :
Class.forName(className);
return (XMLOutputFactory) t.newInstance();
}
}
}
- /**
- * Creates a new <b>input</b> factory.
- * This appears to be an API design bug.
- * @see javax.xml.stream.XMLInputFactory.newInstance(String,ClassLoader)
- */
- public static XMLInputFactory newInstance(String factoryId,
- ClassLoader classLoader)
- throws FactoryConfigurationError
- {
- return XMLInputFactory.newInstance(factoryId, classLoader);
- }
-
/**
* Creates a new stream writer.
*/
* A namespace declaration event.
*/
public interface Namespace
- extends XMLEvent
+ extends Attribute
{
/**
-/* ReaderDelegate.java --
- Copyright (C) 2005,2006 Free Software Foundation, Inc.
+/* StreamReaderDelegate.java --
+ Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* Base class for XML stream reader filters.
*/
-public class ReaderDelegate
+public class StreamReaderDelegate
implements XMLStreamReader, XMLStreamConstants
{
/**
* Constructs an empty filter with no parent set.
*/
- public ReaderDelegate()
+ public StreamReaderDelegate()
{
}
/**
* Constructs an empty filter with the specfied parent.
*/
- public ReaderDelegate(XMLStreamReader reader)
+ public StreamReaderDelegate(XMLStreamReader reader)
{
parent = reader;
}
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
if test -z "$JAVA"; then
AC_MSG_ERROR(Failed to find either an antlr binary or a suitable Java runtime for ANTLR.)
else
- ANTLR="$JAVA -classpath $ANTLR_JAR antlr.Tool"
+ if test -z "$ANTLR_JAR"; then
+ AC_MSG_ERROR(Failed to find either an antlr binary or a suitable antlr jar file.)
+ else
+ ANTLR="$JAVA -classpath $ANTLR_JAR antlr.Tool"
+ fi
fi
fi
AC_SUBST(ANTLR)
test "x$JAVA" = x && AC_CHECK_PROGS(JAVA, cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT, $JAVAPREFIX)
fi
test "x$JAVA" = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH])
-AC_PROG_JAVA_WORKS
AC_PROVIDE([$0])dnl
])
dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_java_works.html
dnl
-AC_DEFUN([AC_PROG_JAVA_WORKS], [
+AC_DEFUN_ONCE([AC_PROG_JAVA_WORKS], [
+AC_REQUIRE([AC_PROG_JAVA])
AC_CHECK_PROG(uudecode, uudecode$EXEEXT, yes)
if test x$uudecode = xyes; then
AC_CACHE_CHECK([if uudecode can decode base 64 file], ac_cv_prog_uudecode_base64, [
if test x$ac_cv_prog_javac_works = xno; then
AC_MSG_ERROR([Cannot compile java source. $JAVAC does not work properly])
fi
- if test x$ac_cv_prog_javac_works = x; then
- AC_PROG_JAVAC
- fi
fi
AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [
JAVA_TEST=Test.java
EOF
changequote([, ])dnl
if test x$ac_cv_prog_uudecode_base64 != xyes; then
+ AC_REQUIRE([AC_PROG_JAVAC_WORKS])
if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s $CLASS_TEST; then
:
else
dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_try_compile_java.html
dnl
-AC_DEFUN([AC_TRY_COMPILE_JAVA],[
-AC_REQUIRE([AC_PROG_JAVAC])dnl
+AC_DEFUN_ONCE([AC_TRY_COMPILE_JAVA],[
+AC_REQUIRE([AC_PROG_JAVAC_WORKS])dnl
cat << \EOF > Test.java
/* [#]line __oline__ "configure" */
ifelse([$1], , , [import $1;])
dnl
dnl Modified to remove jikes by Andrew John Hughes on 2008-02-11
-AC_DEFUN([AC_PROG_JAVAC],[
+AC_DEFUN_ONCE([AC_PROG_JAVAC],[
AC_REQUIRE([AC_EXEEXT])dnl
ECJ_OPTS="-warn:-deprecation,serial,unusedImport"
JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
fi
test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
AC_CACHE_CHECK([if $JAVAC is a version of gcj], ac_cv_prog_javac_is_gcj, [
-if $JAVAC --version | grep gcj > /dev/null; then
+if $JAVAC --version 2>&1 | grep gcj >&AS_MESSAGE_LOG_FD ; then
ac_cv_prog_javac_is_gcj=yes;
JAVAC="$JAVAC $GCJ_OPTS";
-fi])
+else
+ ac_cv_prog_javac_is_gcj=no;
+fi
+])
AC_SUBST(JAVAC_IS_GCJ, $ac_cv_prog_javac_is_gcj)
AM_CONDITIONAL(GCJ_JAVAC, test x"${JAVAC_IS_GCJ}" = xyes)
-dnl GCJ LOCAL
-if test "$enable_java_maintainer_mode" = yes; then
-AC_PROG_JAVAC_WORKS
-fi
dnl END GCJ LOCAL
AC_PROVIDE([$0])dnl
])
dnl
dnl Modified to test for 1.5 by Andrew John Hughes on 2008-02-11
-AC_DEFUN([AC_PROG_JAVAC_WORKS],[
+AC_DEFUN_ONCE([AC_PROG_JAVAC_WORKS],[
+AC_REQUIRE([AC_PROG_JAVAC])
AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
JAVA_TEST=Object.java
CLASS_TEST=Object.class
+++ /dev/null
-# lib-ld.m4 serial 2 (gettext-0.12)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- acl_cv_prog_gnu_ld=yes
-else
- acl_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
+++ /dev/null
-# lib-link.m4 serial 4 (gettext-0.12)
-dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
+++ /dev/null
-# lib-prefix.m4 serial 2 (gettext-0.12)
-dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2006-05-10.23
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
esac
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
-# the program).
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
case $1 in
- lex|yacc)
+ lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
- tar)
+ tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case $1 in
+case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
touch aclocal.m4
;;
- autoconf)
+ autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
touch configure
;;
- autoheader)
+ autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
while read f; do touch "$f"; done
;;
- autom4te)
+ autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
fi
;;
- bison|yacc)
+ bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
fi
;;
- lex|flex)
+ lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
fi
;;
- help2man)
+ help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
- exit 1
+ exit $?
fi
;;
- makeinfo)
+ makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
touch $file
;;
- tar)
+ tar*)
shift
# We have already tried tar in the generic part.
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
{
struct ip_mreq req;
int ret;
+ struct sockaddr_in *sockaddr = (struct sockaddr_in *)addr->data;
memset(&req, 0, sizeof(req));
- req.imr_multiaddr = ((struct sockaddr_in *)addr->data)->sin_addr;
+ req.imr_multiaddr = sockaddr->sin_addr;
req.imr_interface.s_addr = INADDR_ANY;
ret = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &req, sizeof(req));
if (ret != 0)
{
struct ip_mreq req;
int ret;
+ struct sockaddr_in *sockaddr = (struct sockaddr_in *)addr->data;
memset(&req, 0, sizeof(req));
- req.imr_multiaddr = ((struct sockaddr_in *)addr->data)->sin_addr;
+ req.imr_multiaddr = sockaddr->sin_addr;
req.imr_interface.s_addr = INADDR_ANY;
ret = setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &req, sizeof(req));
if (ret != 0)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ClassLoader loader = GSSManager.class.getClassLoader();
if (loader == null)
loader = ClassLoader.getSystemClassLoader();
- Class c = loader.loadClass(impl);
+ Class<?> c = loader.loadClass(impl);
return (GSSManager) c.newInstance();
}
catch (Exception x)
*
* @throws NO_IMPLEMENT always. If used, the method must be overridden.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public ServantObject _servant_preinvoke(String operation, Class expectedType)
{
throw new NO_IMPLEMENT(INAPPROPRIATE);
*
* @return the servant or null if the servant is not an expected type
* of the method is not supported, for example, due security reasons.
- */
+ */
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
String operation, Class expectedType
)
* @param klass a CORBA class
* @throws NO_IMPLEMENT, always.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public Object read_Object(Class klass)
{
throw new NO_IMPLEMENT();
* @return the servant or null if the servant is not an expected type
* of the method is not supported, for example, due security reasons.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public ServantObject _servant_preinvoke(String method, Class expected_type)
{
return delegate.servant_preinvoke(this, method, expected_type);
*
* @return an abstract interface, unmarshaled from the stream
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public Object read_abstract_interface(Class clz)
{
boolean isValue = read_boolean();
*
* @return an value type structure, unmarshaled from the stream
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public Serializable read_value(Class clz)
{
return Vio.read(this, clz);
*
* @param value a value type object to write.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public void write_value(Serializable value, Class clz)
{
Vio.write(this, value, clz);
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynAnyFactoryOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynAnyOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynArrayOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynEnumOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynFixedOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynSequenceOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynStructOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynUnionOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = DynValueOperations.class;
/**
* This the purpose of this field is undocumented up till 1.5 java API
* inclusive.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = ServantActivatorOperations.class;
/**
* This the purpose of this field is undocumented up till 1.5 java API
* inclusive.
*/
+ @SuppressWarnings("unchecked") // Needed for API compatibility
public static final Class _opsClass = ServantLocatorOperations.class;
/**
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
+ $(top_srcdir)/../../config/lib-ld.m4 \
+ $(top_srcdir)/../../config/lib-link.m4 \
+ $(top_srcdir)/../../config/lib-prefix.m4 \
$(top_srcdir)/../../config/multi.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
+/* com.sun.tools.javadoc.Main - Main wrapper for GJDoc
+ Copyright (C) 2007 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package com.sun.tools.javadoc;
public class Main
-/* gnu.classpath.tools.FileSystemClassLoader\r
- Copyright (C) 2004 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools;\r
-\r
-import java.io.File;\r
-import java.io.FileInputStream;\r
-import java.io.FileNotFoundException;\r
-import java.io.InputStream;\r
-import java.io.IOException;\r
-import java.io.StreamTokenizer;\r
-import java.io.StringReader;\r
-\r
-import java.net.MalformedURLException;\r
-import java.net.URL;\r
-\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.ArrayList;\r
-import java.util.StringTokenizer;\r
-\r
-import java.util.jar.JarEntry;\r
-import java.util.jar.JarFile;\r
-import java.util.jar.Manifest;\r
-import java.util.jar.Attributes;\r
-\r
-/**\r
- * A <code>ClassLoader</code> implementation which looks for classes\r
- * on the local filesystem given a standard search path.\r
- */\r
-public class FileSystemClassLoader extends ClassLoader {\r
-\r
- private File[] pathComponents;\r
-\r
- /**\r
- * Initialize the class loader with a normal path string. The path\r
- * string should contain path components separated by {@link\r
- * File.pathSeparator}. Each path component should either denote a\r
- * directory or a .jar or .zip file.\r
- */\r
- public FileSystemClassLoader(String path)\r
- {\r
- List components = new ArrayList();\r
- for (StringTokenizer st = new StringTokenizer(path, File.pathSeparator); st.hasMoreTokens(); ) {\r
- File pathComponent = new File(st.nextToken());\r
- components.add(pathComponent);\r
- if (pathComponent.exists() && !pathComponent.isDirectory()) {\r
- List subComponents = tryGetJarFileClassPathComponents(pathComponent);\r
- if (null != subComponents) {\r
- components.addAll(subComponents);\r
- }\r
- }\r
- }\r
- File[] componentArray = new File[components.size()];\r
- this.pathComponents = (File[])components.toArray(componentArray);\r
- }\r
-\r
- /**\r
- * Initialize the class loader with an array of path\r
- * components. Each path component should either denote a\r
- * directory or a .jar or .zip file.\r
- */\r
- public FileSystemClassLoader(File[] pathComponents)\r
- {\r
- this.pathComponents = pathComponents;\r
- for (int i = 0; i < pathComponents.length; ++i) {\r
- if (!pathComponents[i].exists()) {\r
- System.err.println("WARNING: Path component '" + pathComponents[i] + "' not found.");\r
- }\r
- }\r
- }\r
-\r
- public Class loadClass(String name)\r
- throws ClassNotFoundException {\r
-\r
- return super.loadClass(name);\r
- }\r
-\r
- public Class findClass(String name)\r
- throws ClassNotFoundException {\r
-\r
- byte[] b = loadClassData(name);\r
- return defineClass(name, b, 0, b.length);\r
- }\r
-\r
- public URL findResource(String name)\r
- {\r
- StreamInfo streamInfo = getResourceStream(name);\r
- if (null == streamInfo) {\r
- return super.findResource(name);\r
- }\r
- else {\r
- try {\r
- return streamInfo.getURL();\r
- }\r
- catch (MalformedURLException e) {\r
- System.err.println("WARNING: In FileSystemClassLoader: could not derive URL from file or jar entry: " + e.toString());\r
- return null;\r
- }\r
- }\r
- }\r
-\r
- private byte[] readFromStream(InputStream in, long size) \r
- throws IOException\r
- {\r
- byte[] result = new byte[(int)size];\r
- int nread = 0;\r
- int offset = 0;\r
- while (offset < size && (nread = in.read(result, offset, (int)(size - offset))) >= 0) {\r
- offset += nread;\r
- }\r
- in.close();\r
- return result;\r
- }\r
-\r
- private byte[] readFromStream(StreamInfo streamInfo)\r
- throws IOException\r
- {\r
- InputStream in = streamInfo.openStream();\r
- long size = streamInfo.getSize();\r
-\r
- byte[] result = new byte[(int)size];\r
- int nread = 0;\r
- int offset = 0;\r
- while (offset < size && (nread = in.read(result, offset, (int)(size - offset))) >= 0) {\r
- offset += nread;\r
- }\r
- in.close();\r
- return result;\r
- }\r
-\r
- private static interface StreamInfo\r
- {\r
- public InputStream openStream()\r
- throws IOException;\r
- public long getSize();\r
- public URL getURL()\r
- throws MalformedURLException;\r
- }\r
-\r
- private static class FileStreamInfo\r
- implements StreamInfo\r
- {\r
- File file;\r
-\r
- FileStreamInfo(File file)\r
- {\r
- this.file = file;\r
- }\r
-\r
- public InputStream openStream()\r
- throws IOException\r
- {\r
- return new FileInputStream(file);\r
- }\r
-\r
- public long getSize()\r
- {\r
- return file.length();\r
- }\r
-\r
- public URL getURL()\r
- throws MalformedURLException\r
- {\r
- return file.toURL();\r
- }\r
- }\r
-\r
- private static class JarStreamInfo\r
- implements StreamInfo\r
- {\r
- private File file;\r
- private JarFile jarFile;\r
- private JarEntry jarEntry;\r
-\r
- JarStreamInfo(File file, JarFile jarFile, JarEntry jarEntry)\r
- {\r
- this.file = file;\r
- this.jarFile = jarFile;\r
- this.jarEntry = jarEntry;\r
- }\r
-\r
- public InputStream openStream()\r
- throws IOException\r
- {\r
- return jarFile.getInputStream(jarEntry);\r
- }\r
-\r
- public long getSize()\r
- {\r
- return jarEntry.getSize();\r
- }\r
-\r
- public URL getURL()\r
- throws MalformedURLException\r
- {\r
- String urlString = "jar:" + file.toURL() + "!/" + jarEntry.getName();\r
- return new URL(urlString);\r
- }\r
- }\r
- \r
- private StreamInfo getResourceStream(String path)\r
- {\r
- for (int i = 0; i < pathComponents.length; ++i) {\r
- try {\r
- File parent = pathComponents[i];\r
- if (parent.isDirectory()) {\r
- File file = new File(parent, path);\r
- if (file.exists()) {\r
- return new FileStreamInfo(file);\r
- }\r
- }\r
- else {\r
- JarFile jarFile = new JarFile(parent, false, JarFile.OPEN_READ);\r
- JarEntry jarEntry = jarFile.getJarEntry(path);\r
- if (null != jarEntry) {\r
- return new JarStreamInfo(parent, jarFile, jarEntry);\r
- }\r
- }\r
- }\r
- catch (IOException ignore) {\r
- }\r
- }\r
- return null;\r
- }\r
-\r
- private byte[] loadClassData(String className) \r
- throws ClassNotFoundException \r
- {\r
- String classFileName = className.replace('.', File.separatorChar) + ".class";\r
- StreamInfo streamInfo = getResourceStream(classFileName);\r
-\r
- try {\r
- if (null != streamInfo) {\r
- return readFromStream(streamInfo);\r
- }\r
- }\r
- catch (IOException ignore) {\r
- }\r
-\r
- throw new ClassNotFoundException(className);\r
- }\r
-\r
- private static List tryGetJarFileClassPathComponents(File file)\r
- {\r
- try {\r
- JarFile jarFile = new JarFile(file, false, JarFile.OPEN_READ);\r
- Manifest manifest = jarFile.getManifest();\r
- if (null != manifest) {\r
- Attributes mainAttributes = manifest.getMainAttributes();\r
- if (null != mainAttributes) {\r
- String classPath = mainAttributes.getValue(Attributes.Name.CLASS_PATH);\r
- if (null != classPath) {\r
- List result = new LinkedList();\r
- StreamTokenizer tokenizer = new StreamTokenizer(new StringReader(classPath));\r
- tokenizer.resetSyntax();\r
- tokenizer.wordChars(0, Integer.MAX_VALUE);\r
- tokenizer.whitespaceChars(9, 9); // tab\r
- tokenizer.whitespaceChars(10, 10); // lf\r
- tokenizer.whitespaceChars(13, 13); // cr\r
- tokenizer.whitespaceChars(32, 32); // space\r
- tokenizer.quoteChar('"');\r
- int token;\r
- while ((token = tokenizer.nextToken()) != StreamTokenizer.TT_EOF) {\r
- if (StreamTokenizer.TT_WORD == token) {\r
- result.add(new File(file.getParentFile(), tokenizer.sval));\r
- }\r
- }\r
- return result;\r
- }\r
- }\r
- }\r
- }\r
- catch (IOException ignore) {\r
- }\r
- return null;\r
- }\r
-}\r
-\r
+/* gnu.classpath.tools.FileSystemClassLoader
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.StreamTokenizer;
+import java.io.StringReader;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+import java.util.jar.Attributes;
+
+/**
+ * A <code>ClassLoader</code> implementation which looks for classes
+ * on the local filesystem given a standard search path.
+ */
+public class FileSystemClassLoader extends ClassLoader {
+
+ private File[] pathComponents;
+
+ /**
+ * Initialize the class loader with a normal path string. The path
+ * string should contain path components separated by {@link
+ * File.pathSeparator}. Each path component should either denote a
+ * directory or a .jar or .zip file.
+ */
+ public FileSystemClassLoader(String path)
+ {
+ List components = new ArrayList();
+ for (StringTokenizer st = new StringTokenizer(path, File.pathSeparator); st.hasMoreTokens(); ) {
+ File pathComponent = new File(st.nextToken());
+ components.add(pathComponent);
+ if (pathComponent.exists() && !pathComponent.isDirectory()) {
+ List subComponents = tryGetJarFileClassPathComponents(pathComponent);
+ if (null != subComponents) {
+ components.addAll(subComponents);
+ }
+ }
+ }
+ File[] componentArray = new File[components.size()];
+ this.pathComponents = (File[])components.toArray(componentArray);
+ }
+
+ /**
+ * Initialize the class loader with an array of path
+ * components. Each path component should either denote a
+ * directory or a .jar or .zip file.
+ */
+ public FileSystemClassLoader(File[] pathComponents)
+ {
+ this.pathComponents = pathComponents;
+ for (int i = 0; i < pathComponents.length; ++i) {
+ if (!pathComponents[i].exists()) {
+ System.err.println("WARNING: Path component '" + pathComponents[i] + "' not found.");
+ }
+ }
+ }
+
+ public Class loadClass(String name)
+ throws ClassNotFoundException {
+
+ return super.loadClass(name);
+ }
+
+ public Class findClass(String name)
+ throws ClassNotFoundException {
+
+ byte[] b = loadClassData(name);
+ return defineClass(name, b, 0, b.length);
+ }
+
+ public URL findResource(String name)
+ {
+ StreamInfo streamInfo = getResourceStream(name);
+ if (null == streamInfo) {
+ return super.findResource(name);
+ }
+ else {
+ try {
+ return streamInfo.getURL();
+ }
+ catch (MalformedURLException e) {
+ System.err.println("WARNING: In FileSystemClassLoader: could not derive URL from file or jar entry: " + e.toString());
+ return null;
+ }
+ }
+ }
+
+ private byte[] readFromStream(InputStream in, long size)
+ throws IOException
+ {
+ byte[] result = new byte[(int)size];
+ int nread = 0;
+ int offset = 0;
+ while (offset < size && (nread = in.read(result, offset, (int)(size - offset))) >= 0) {
+ offset += nread;
+ }
+ in.close();
+ return result;
+ }
+
+ private byte[] readFromStream(StreamInfo streamInfo)
+ throws IOException
+ {
+ InputStream in = streamInfo.openStream();
+ long size = streamInfo.getSize();
+
+ byte[] result = new byte[(int)size];
+ int nread = 0;
+ int offset = 0;
+ while (offset < size && (nread = in.read(result, offset, (int)(size - offset))) >= 0) {
+ offset += nread;
+ }
+ in.close();
+ return result;
+ }
+
+ private static interface StreamInfo
+ {
+ public InputStream openStream()
+ throws IOException;
+ public long getSize();
+ public URL getURL()
+ throws MalformedURLException;
+ }
+
+ private static class FileStreamInfo
+ implements StreamInfo
+ {
+ File file;
+
+ FileStreamInfo(File file)
+ {
+ this.file = file;
+ }
+
+ public InputStream openStream()
+ throws IOException
+ {
+ return new FileInputStream(file);
+ }
+
+ public long getSize()
+ {
+ return file.length();
+ }
+
+ public URL getURL()
+ throws MalformedURLException
+ {
+ return file.toURL();
+ }
+ }
+
+ private static class JarStreamInfo
+ implements StreamInfo
+ {
+ private File file;
+ private JarFile jarFile;
+ private JarEntry jarEntry;
+
+ JarStreamInfo(File file, JarFile jarFile, JarEntry jarEntry)
+ {
+ this.file = file;
+ this.jarFile = jarFile;
+ this.jarEntry = jarEntry;
+ }
+
+ public InputStream openStream()
+ throws IOException
+ {
+ return jarFile.getInputStream(jarEntry);
+ }
+
+ public long getSize()
+ {
+ return jarEntry.getSize();
+ }
+
+ public URL getURL()
+ throws MalformedURLException
+ {
+ String urlString = "jar:" + file.toURL() + "!/" + jarEntry.getName();
+ return new URL(urlString);
+ }
+ }
+
+ private StreamInfo getResourceStream(String path)
+ {
+ for (int i = 0; i < pathComponents.length; ++i) {
+ try {
+ File parent = pathComponents[i];
+ if (parent.isDirectory()) {
+ File file = new File(parent, path);
+ if (file.exists()) {
+ return new FileStreamInfo(file);
+ }
+ }
+ else {
+ JarFile jarFile = new JarFile(parent, false, JarFile.OPEN_READ);
+ JarEntry jarEntry = jarFile.getJarEntry(path);
+ if (null != jarEntry) {
+ return new JarStreamInfo(parent, jarFile, jarEntry);
+ }
+ }
+ }
+ catch (IOException ignore) {
+ }
+ }
+ return null;
+ }
+
+ private byte[] loadClassData(String className)
+ throws ClassNotFoundException
+ {
+ String classFileName = className.replace('.', File.separatorChar) + ".class";
+ StreamInfo streamInfo = getResourceStream(classFileName);
+
+ try {
+ if (null != streamInfo) {
+ return readFromStream(streamInfo);
+ }
+ }
+ catch (IOException ignore) {
+ }
+
+ throw new ClassNotFoundException(className);
+ }
+
+ private static List tryGetJarFileClassPathComponents(File file)
+ {
+ try {
+ JarFile jarFile = new JarFile(file, false, JarFile.OPEN_READ);
+ Manifest manifest = jarFile.getManifest();
+ if (null != manifest) {
+ Attributes mainAttributes = manifest.getMainAttributes();
+ if (null != mainAttributes) {
+ String classPath = mainAttributes.getValue(Attributes.Name.CLASS_PATH);
+ if (null != classPath) {
+ List result = new LinkedList();
+ StreamTokenizer tokenizer = new StreamTokenizer(new StringReader(classPath));
+ tokenizer.resetSyntax();
+ tokenizer.wordChars(0, Integer.MAX_VALUE);
+ tokenizer.whitespaceChars(9, 9); // tab
+ tokenizer.whitespaceChars(10, 10); // lf
+ tokenizer.whitespaceChars(13, 13); // cr
+ tokenizer.whitespaceChars(32, 32); // space
+ tokenizer.quoteChar('"');
+ int token;
+ while ((token = tokenizer.nextToken()) != StreamTokenizer.TT_EOF) {
+ if (StreamTokenizer.TT_WORD == token) {
+ result.add(new File(file.getParentFile(), tokenizer.sval));
+ }
+ }
+ return result;
+ }
+ }
+ }
+ }
+ catch (IOException ignore) {
+ }
+ return null;
+ }
+}
+
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets;
+/* DebugDoclet.java - Doclet for debugging
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package gnu.classpath.tools.doclets.debugdoclet;
import com.sun.javadoc.ClassDoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.htmldoclet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.htmldoclet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.htmldoclet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.htmldoclet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.htmldoclet;
-/* gnu.classpath.tools.doclets.xmldoclet.Driver\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.doclets.xmldoclet;\r
-\r
-import com.sun.javadoc.*;\r
-import java.io.*;\r
-\r
-import com.sun.tools.doclets.Taglet;\r
-\r
-import java.lang.reflect.InvocationTargetException;\r
-import java.lang.reflect.Method;\r
-import java.lang.reflect.Modifier;\r
-\r
-import java.text.DateFormat;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Arrays;\r
-import java.util.Comparator;\r
-import java.util.HashSet;\r
-import java.util.TreeSet;\r
-import java.util.Iterator;\r
-import java.util.LinkedHashMap;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-import java.util.Locale;\r
-import java.util.Map;\r
-import java.util.HashMap;\r
-import java.util.Properties;\r
-import java.util.Set;\r
-import java.util.SortedSet;\r
-import java.util.StringTokenizer;\r
-import java.util.TreeMap;\r
-\r
-import gnu.classpath.tools.gjdoc.TemporaryStore;\r
-import gnu.classpath.tools.gjdoc.GjdocPackageDoc;\r
-\r
-import gnu.classpath.tools.doclets.PackageGroup;\r
-import gnu.classpath.tools.doclets.PackageMatcher;\r
-import gnu.classpath.tools.doclets.InvalidPackageWildcardException;\r
-\r
-import gnu.classpath.tools.doclets.xmldoclet.doctranslet.DocTranslet;\r
-import gnu.classpath.tools.doclets.xmldoclet.doctranslet.DocTransletOptions;\r
-\r
-import gnu.classpath.tools.taglets.AuthorTaglet;\r
-import gnu.classpath.tools.taglets.VersionTaglet;\r
-import gnu.classpath.tools.taglets.SinceTaglet;\r
-import gnu.classpath.tools.taglets.DeprecatedTaglet;\r
-import gnu.classpath.tools.taglets.GenericTaglet;\r
-import gnu.classpath.tools.doclets.StandardTaglet;\r
-\r
-import gnu.classpath.tools.java2xhtml.Java2xhtml;\r
-\r
-import gnu.classpath.tools.IOToolkit;\r
-import gnu.classpath.tools.FileSystemClassLoader;\r
-\r
-/**\r
- * A Doclet which retrieves all information presented by the Doclet\r
- * API, dumping it to stdout in XML format.\r
- *\r
- * @author Julian Scheid\r
- */\r
-public class Driver {\r
-\r
- public static final String XMLDOCLET_VERSION = "0.6.1";\r
-\r
- /**\r
- * Used for redirecting error messages to <code>/dev/null</code>.\r
- */\r
- private static class NullErrorReporter implements DocErrorReporter {\r
- public void printError(String ignore) {}\r
- public void printWarning(String ignore) {}\r
- public void printNotice(String ignore) {}\r
- }\r
-\r
- /*\r
- * Taglet context constants.\r
- */\r
- private static final int CONTEXT_CONSTRUCTOR = 1;\r
- private static final int CONTEXT_FIELD = 2;\r
- private static final int CONTEXT_METHOD = 3;\r
- private static final int CONTEXT_OVERVIEW = 4;\r
- private static final int CONTEXT_PACKAGE = 5;\r
- private static final int CONTEXT_TYPE = 6;\r
-\r
- /**\r
- * All XML output will go to this stream.\r
- */\r
- private PrintWriter out;\r
-\r
- /**\r
- * How many spaces to indent each XML node level,\r
- * i.e. Tab size for output.\r
- */\r
- private static int indentStep = 1;\r
-\r
- /**\r
- * Won't output superfluous spaces if set to true.\r
- * If set to false, output will be more legible.\r
- */\r
- private boolean compress = false;\r
-\r
- /**\r
- * Won't output warning messages while fixing\r
- * HTML code if set to true.\r
- */\r
- private boolean noHTMLWarn = false;\r
-\r
- /**\r
- * Won't output warning messages when encountering tags\r
- * that look like an email address if set to true.\r
- */\r
- private boolean noEmailWarn = false;\r
-\r
- /**\r
- * Will fix HTML if necessary so that each comment\r
- * contains valid XML code if set to true. If set\r
- * to false, HTML code will not be modified and\r
- * instead encapsulated in a CDATA section.\r
- */\r
- private boolean fixHTML = true;\r
-\r
- /**\r
- * User-specified name of the directory where the final version of\r
- * the generated files will be written to.\r
- *\r
- * If no XSLT sheet is given, the XML output will go directly into\r
- * this directory. Otherwise, XML output will go to a temporary\r
- * directory and XSLT output will go to this directory.\r
- */\r
- private File targetDirectory = null;\r
-\r
- /**\r
- * Directory where XML output will be written to. If no XSLT\r
- * sheet was given, this is the target directory specified\r
- * by the user. Otherwise, this is a temporary directory.\r
- */\r
- private File xmlTargetDirectory;\r
-\r
- /**\r
- * Contains a number of TargetContexts which describe which XSLT\r
- * sheet to apply to the output of this doclet, to what directory\r
- * the XSLT output is written, and which postprocess driver to use\r
- * to process XSLT output.\r
- */\r
- private List targets = new ArrayList();\r
-\r
- /**\r
- * XML text to include at the end of every generated page. Read\r
- * from the file specified on the command line using -bottomnote.\r
- * If present, this will be written to the main output file\r
- * (index.xml) in node /gjdoc:rootDoc/gjdoc:bottomnote.\r
- */\r
- private String bottomNote;\r
-\r
- /**\r
- * Brief description of the package set. Can be specified on the\r
- * command line using -title. This will be written to the main\r
- * output file (index.xml) in node\r
- * /gjdoc:rootDoc/gjdoc:title. The HTML generating XSLT sheet\r
- * uses this for example in window titles.\r
- */\r
- private String title;\r
-\r
- /**\r
- * Path to the directory where temporary files should be stored.\r
- * Defaults to system tempdir, but can be overridden by user \r
- * with -workpath.\r
- */\r
- private String workingPath = System.getProperty("java.io.tmpdir");\r
-\r
- /**\r
- * Temporary directory created by this doclet where all \r
- * temporary files will be stored in. If no temporary\r
- * files are needed (i.e. no XSLT postprocessing stage\r
- * specified by user), this is <code>null</code>.\r
- */\r
- private File workingDirectory;\r
-\r
- /**\r
- * Whether to deep-copy the doc-files subdirectory.\r
- */\r
- private boolean docFilesSubdirsEnabled = false;\r
-\r
- /**\r
- * Which direct subdirectories of the doc-files directories to exclude.\r
- * Set of String.\r
- */\r
- private Set excludeDocFilesSubDirs = new HashSet();\r
-\r
- /**\r
- * Stores the Doclet API RootDoc we are operating on.\r
- */\r
- private RootDoc rootDoc;\r
-\r
- /**\r
- * XML namespace prefix used for all tags, except for HTML\r
- * tags copied from Javadoc comments. Excluding colon.\r
- */\r
- public static final String tagPrefix = "gjdoc";\r
-\r
- /**\r
- * Classpath for loading Taglet classes.\r
- */\r
- private String tagletPath = null;\r
-\r
- /**\r
- * The current class that is being processed.\r
- * Set in outputClassDoc().\r
- */\r
- private ClassDoc currentClass;\r
-\r
- /**\r
- * The current member that is being processed.\r
- * Set in outputMemberDoc().\r
- */\r
- private MemberDoc currentMember;\r
-\r
- /**\r
- * The current constructor/method that is being processed.\r
- * Set in outputExecutableMemberDoc().\r
- */\r
- private ExecutableMemberDoc currentExecMember;\r
-\r
- /**\r
- * Mapping from tag type to Taglet for user Taglets specified on\r
- * the command line.\r
- */\r
- private Map tagletMap = new LinkedHashMap();\r
-\r
- /**\r
- * Keeps track of the tags mentioned by the user during option\r
- * processiong so that an error can be emitted if a tag is\r
- * mentioned more than once.\r
- */\r
- private List mentionedTags = new LinkedList();\r
-\r
- /**\r
- * Stores options to be passed to the DocTranslet.\r
- */\r
- private DocTransletOptions docTransletOptions = new DocTransletOptions(); \r
-\r
- /**\r
- * Stores the package groups specified in the user\r
- * options. Contains objects of type PackageGroup.\r
- */\r
- private List packageGroups = new LinkedList();\r
-\r
- private HtmlRepairer htmlRepairer;\r
-\r
- public static boolean start(TemporaryStore _rootDocWrapper) {\r
- return new Driver().instanceStart((RootDoc)_rootDocWrapper.getAndClear());\r
- }\r
-\r
- /**\r
- * Official Doclet entry point.\r
- */\r
- public static boolean start(RootDoc _rootDoc) {\r
-\r
- // Create a new XmlDoclet instance and delegate control.\r
- TemporaryStore tstore = new TemporaryStore(_rootDoc);\r
- _rootDoc = null;\r
- return new Driver().instanceStart((RootDoc)tstore.getAndClear());\r
- }\r
-\r
- /**\r
- * Output an XML tag describing a com.sun.javadoc.Type object.\r
- * Assumes that the tag does not have subtags.\r
- *\r
- * @param level Level of indentation. Will be multiplied by \r
- * <code>indentStep</code> to yield actual amount\r
- * of whitespace inserted at start of line.\r
- * @param tag Identifier for the XML tag being output.\r
- * @param type The Javadoc Type to be output.\r
- */\r
- protected void outputType(int level, String tag, Type type) {\r
- outputType(level, tag, type, true);\r
- }\r
-\r
- protected void outputType(int level, String tag, Type type, boolean atomic) {\r
-\r
- boolean isIncluded = false;\r
- ClassDoc typeAsClassDoc = type.asClassDoc();\r
- String packageName = null;\r
- if (null != typeAsClassDoc) {\r
- isIncluded = typeAsClassDoc.isIncluded();\r
- packageName = typeAsClassDoc.containingPackage().name();\r
- }\r
- println(level, "<"+tagPrefix+":"+tag + " typename=\""+type.typeName()+"\""+\r
- " qualifiedtypename=\""+type.qualifiedTypeName()+"\""\r
- +(type.dimension().length()==0?"":" dimension=\""+type.dimension()+"\"")\r
- +(isIncluded?" isIncluded=\"true\"" : "")\r
- +((null != packageName)?" package=\"" + packageName + "\"" : "")\r
- +(atomic?"/":"")+">");\r
- }\r
-\r
- protected void outputExecutableMemberDocBody(int level, ExecutableMemberDoc memberDoc) {\r
-\r
- currentExecMember = memberDoc;\r
-\r
- outputMemberDocBody(level, memberDoc);\r
-\r
- Parameter[] parameters = memberDoc.parameters();\r
- for (int i=0, ilim=parameters.length; i<ilim; ++i) {\r
- Parameter parameter = parameters[i];\r
- outputType(level, "parameter name=\""+parameter.name()+"\"", parameter.type());\r
- }\r
-\r
- ClassDoc[] exceptions = memberDoc.thrownExceptions();\r
- for (int i=0, ilim=exceptions.length; i<ilim; ++i) {\r
- ClassDoc exception = exceptions[i];\r
- outputType(level, "thrownException", exception);\r
- }\r
-\r
- printAtomTag(level, "signature full=\""+memberDoc.signature()+"\" flat=\""+memberDoc.flatSignature()+"\"");\r
-\r
- if (memberDoc.isNative()) {\r
- printAtomTag(level, "isNative");\r
- }\r
-\r
- if (memberDoc.isSynchronized()) {\r
- printAtomTag(level, "isSynchronized");\r
- }\r
- }\r
-\r
- protected void outputMethodDoc(int level, MethodDoc methodDoc) {\r
- println();\r
- printOpenTag(level, "methoddoc name=\""+methodDoc.name()+"\"");\r
- outputExecutableMemberDocBody(level+1, methodDoc);\r
- outputType(level+1, "returns", methodDoc.returnType());\r
- printCloseTag(level, "methoddoc");\r
- }\r
-\r
- protected void outputMemberDocBody(int level, MemberDoc memberDoc) {\r
- currentMember = memberDoc;\r
- outputProgramElementDocBody(level, memberDoc);\r
- }\r
-\r
- protected void outputFieldDocBody(int level, FieldDoc fieldDoc) {\r
- outputType(level, "type", fieldDoc.type());\r
- if (fieldDoc.isTransient()) {\r
- printAtomTag(level, "isTransient");\r
- }\r
- if (fieldDoc.isVolatile()) {\r
- printAtomTag(level, "isVolatile");\r
- }\r
- }\r
-\r
- private void outputFieldDoc(int level, FieldDoc fieldDoc) {\r
- println();\r
- printOpenTag(level, "fielddoc name=\""+fieldDoc.name()+"\"");\r
- outputMemberDocBody(level+1, fieldDoc);\r
- outputFieldDocBody(level+1, fieldDoc);\r
- printCloseTag(level, "fielddoc");\r
- }\r
-\r
- protected void outputConstructorDoc(int level, ConstructorDoc constructorDoc) {\r
- println();\r
- printOpenTag(level, "constructordoc name=\""+constructorDoc.name()+"\"");\r
- outputExecutableMemberDocBody(level+1, constructorDoc);\r
- printCloseTag(level, "constructordoc");\r
- }\r
-\r
- protected void outputSuperInterfacesRec(int level, ClassDoc classDoc) {\r
- if (null!=classDoc) {\r
- ClassDoc[] interfaces = classDoc.interfaces();\r
- if (null != interfaces) {\r
- for (int i=0, ilim=interfaces.length; i<ilim; ++i) {\r
- outputType(level, "superimplements", interfaces[i]);\r
- }\r
- }\r
- outputSuperInterfacesRec(level, classDoc.superclass());\r
- }\r
- }\r
-\r
- protected void outputClassDocSummary(ClassDoc classDoc) {\r
- println();\r
- printOpenTag(1, "classdoc name=\""+classDoc.name()+"\" qualifiedtypename=\""+classDoc.qualifiedName()+"\" isIncluded=\"true\"");\r
- if (null!=classDoc.superclass()) {\r
- outputType(2, "superclass", classDoc.superclass());\r
- }\r
-\r
- ClassDoc[] interfaces = classDoc.interfaces();\r
- for (int i=0, ilim=interfaces.length; i<ilim; ++i) {\r
- outputType(2, "implements", interfaces[i]);\r
- }\r
- outputSuperInterfacesRec(2, classDoc.superclass());\r
-\r
- printAtomTag(2, "containingPackage name=\""+classDoc.containingPackage().name()+"\"");\r
- if (classDoc.isError()) {\r
- printAtomTag(2, "isError");\r
- }\r
- if (classDoc.isException()) {\r
- printAtomTag(2, "isException");\r
- }\r
- if (classDoc.isInterface()) {\r
- printAtomTag(2, "isInterface");\r
- }\r
- if (classDoc.isOrdinaryClass()) {\r
- printAtomTag(2, "isOrdinaryClass");\r
- }\r
-\r
- printCloseTag(1, "classdoc");\r
- }\r
-\r
- protected void outputPackageDoc(PackageDoc packageDoc) {\r
- println();\r
- printOpenTag(1, "packagedoc name=\""+packageDoc.name()+"\"");\r
- if (packageDoc.firstSentenceTags().length > 0) {\r
- printOpenTag(2, "firstSentenceTags", false);\r
- outputTags(3, packageDoc.firstSentenceTags(), true, CONTEXT_PACKAGE);\r
- printCloseTag(0, "firstSentenceTags");\r
- printOpenTag(2, "inlineTags", false);\r
- outputTags(3, packageDoc.inlineTags(), true, CONTEXT_PACKAGE);\r
- printCloseTag(0, "inlineTags");\r
- }\r
-\r
- if (packageDoc.tags().length > 0) {\r
- printOpenTag(2, "tags");\r
- outputTags(3, packageDoc.tags(), true, CONTEXT_PACKAGE);\r
- printCloseTag(2, "tags");\r
- }\r
-\r
- if (packageDoc.seeTags().length > 0) {\r
- printOpenTag(2, "seeTags");\r
- outputTags(3, packageDoc.seeTags(), true, CONTEXT_PACKAGE);\r
- printCloseTag(2, "seeTags");\r
- }\r
-\r
- ClassDoc[] allClasses = (ClassDoc[]) packageDoc.allClasses().clone();\r
- Arrays.sort(allClasses);\r
-\r
- if (false) {\r
- for (int i = 0, ilim = allClasses.length; i < ilim; ++ i) {\r
- printAtomTag(2, "containsClass qualifiedtypename=\""+allClasses[i].qualifiedTypeName()+"\"");\r
- }\r
- }\r
-\r
- printCloseTag(1, "packagedoc");\r
- }\r
-\r
- protected void outputClassDoc(ClassDoc classDoc) throws IOException {\r
-\r
- currentClass = classDoc;\r
-\r
- println();\r
- printOpenTag(1, "classdoc xmlns=\"http://www.w3.org/TR/REC-html40\" xmlns:"+tagPrefix+"=\"http://www.gnu.org/software/cp-tools/gjdocxml\" name=\""+classDoc.name()+"\" qualifiedtypename=\""+classDoc.qualifiedName()+"\"");\r
-\r
- ClassDoc[] interfaces = classDoc.interfaces();\r
- for (int i=0, ilim=interfaces.length; i<ilim; ++i) {\r
- outputType(2, "implements", interfaces[i]);\r
- }\r
- outputSuperInterfacesRec(2, classDoc.superclass());\r
-\r
- outputProgramElementDocBody(2, classDoc);\r
- if (classDoc.isAbstract())\r
- printAtomTag(2, "isAbstract");\r
- if (classDoc.isSerializable())\r
- printAtomTag(2, "isSerializable");\r
- if (classDoc.isExternalizable())\r
- printAtomTag(2, "isExternalizable");\r
- if (classDoc.definesSerializableFields()) {\r
- printAtomTag(2, "definesSerializableFields");\r
- }\r
-\r
- ConstructorDoc[] constructors = classDoc.constructors();\r
- for (int i=0, ilim=constructors.length; i<ilim; ++i) {\r
- outputConstructorDoc(2, constructors[i]);\r
- }\r
-\r
- MethodDoc[] methods = classDoc.methods();\r
- for (int i=0, ilim=methods.length; i<ilim; ++i) {\r
- outputMethodDoc(2, methods[i]);\r
- }\r
-\r
- FieldDoc[] fields = classDoc.fields();\r
- for (int i=0, ilim=fields.length; i<ilim; ++i) {\r
- outputFieldDoc(2, fields[i]);\r
- }\r
-\r
- if (classDoc.serializableFields().length > 0) {\r
- printOpenTag(2, "serializableFields");\r
-\r
- FieldDoc[] sfields = classDoc.serializableFields();\r
- for (int i=0, ilim=sfields.length; i<ilim; ++i) {\r
- outputFieldDoc(2, sfields[i]);\r
- }\r
- printCloseTag(2, "serializableFields");\r
- }\r
-\r
- Java2xhtml java2xhtml = new Java2xhtml();\r
- Properties properties = new Properties();\r
- properties.setProperty("isCodeSnippet", "true");\r
- properties.setProperty("hasLineNumbers", "true");\r
- java2xhtml.setProperties(properties);\r
-\r
- if (null == classDoc.containingClass() && docTransletOptions.linksource) {\r
- printOpenTag(2, "source");\r
- StringWriter sourceBuffer = new StringWriter();\r
- File sourceFile = new File(((GjdocPackageDoc)classDoc.containingPackage()).packageDirectory(),\r
- classDoc.name() + ".java");\r
- FileReader sourceReader = new FileReader(sourceFile);\r
- IOToolkit.copyStream(sourceReader, sourceBuffer);\r
- print(java2xhtml.makeHTML(sourceBuffer.getBuffer(), sourceFile.getName()));\r
- printCloseTag(2, "source"); \r
- }\r
-\r
- ClassDoc superclassDoc = classDoc.superclass();\r
- while (superclassDoc != null) {\r
- outputType(2, "superclass", superclassDoc, false);\r
-\r
- // FIXME: remove the following after adjusting the XSLT sheets:\r
- printAtomTag(3, "containingPackage name=\"" + superclassDoc.containingPackage().name() + "\"");\r
-\r
- MethodDoc[] superMethods = superclassDoc.methods();\r
- if (null != superMethods) {\r
- for (int i=0, ilim=superMethods.length; i<ilim; ++i) {\r
- printAtomTag(3, "methoddoc name=\"" + superMethods[i].name() + "\" signature=\"" + superMethods[i].signature() + "\"");\r
- }\r
- }\r
- \r
- FieldDoc[] superFields = superclassDoc.fields();\r
- if (null != superFields) {\r
- for (int i=0, ilim=superFields.length; i<ilim; ++i) {\r
- printAtomTag(3, "fielddoc name=\"" + superFields[i].name() + "\"");\r
- }\r
- }\r
- printCloseTag(2, "superclass");\r
- \r
- superclassDoc = superclassDoc.superclass();\r
- }\r
-\r
- outputUsage(classDoc, 2);\r
-\r
- printCloseTag(1, "classdoc");\r
-\r
- currentClass = null;\r
- currentMember = null;\r
- currentExecMember = null;\r
- }\r
-\r
- protected int outputHeritageOpen(int level, ClassDoc classDoc) {\r
-\r
- ClassDoc superClassDoc = classDoc.superclass();\r
- if (null != superClassDoc) {\r
- level = outputHeritageOpen(level, superClassDoc);\r
- ++ level;\r
- }\r
- outputType(level, "heritage", classDoc, false);\r
- return level;\r
- }\r
-\r
- protected void outputHeritageClose(int level, ClassDoc classDoc) {\r
-\r
- ClassDoc superClassDoc = classDoc.superclass();\r
- if (null != superClassDoc) {\r
- outputHeritageClose(level + 1, superClassDoc);\r
- }\r
- printCloseTag(level, "heritage");\r
- }\r
-\r
- protected void outputDocBody(int level, Doc doc) {\r
-\r
- int context = CONTEXT_TYPE;\r
-\r
- if (doc.isClass()) {\r
- printAtomTag(level, "isClass");\r
-\r
- ClassDoc classDoc = (ClassDoc)doc;\r
- ClassDoc[] classes = rootDoc.classes();\r
- for (int i=0, ilim=classes.length; i<ilim; ++i) {\r
- if (classes[i].superclass() == classDoc) {\r
- outputType(level, "extended-by", classes[i]);\r
- }\r
- }\r
-\r
- outputHeritageOpen(level, classDoc);\r
- outputHeritageClose(level, classDoc);\r
- }\r
- if (doc.isConstructor()) {\r
- printAtomTag(level, "isConstructor");\r
- context = CONTEXT_CONSTRUCTOR;\r
- }\r
- if (doc.isError()) {\r
- printAtomTag(level, "isError");\r
- }\r
- if (doc.isException()) {\r
- printAtomTag(level, "isException");\r
- }\r
- if (doc.isField()) {\r
- printAtomTag(level, "isField");\r
- context = CONTEXT_FIELD;\r
- }\r
- if (doc.isIncluded()) {\r
- printAtomTag(level, "isIncluded");\r
- }\r
- if (doc.isInterface()) {\r
- printAtomTag(level, "isInterface");\r
-\r
- ClassDoc classDoc = (ClassDoc)doc;\r
- ClassDoc[] classes = rootDoc.classes();\r
- for (int i=0, ilim=classes.length; i<ilim; ++i) {\r
- ClassDoc[] implementedInterfaces = classes[i].interfaces();\r
- for (int j=0; j<implementedInterfaces.length; ++j) {\r
- if (implementedInterfaces[j] == classDoc) {\r
- if (classDoc.isInterface()) {\r
- outputType(level, "subinterface", classes[i]);\r
- }\r
- else {\r
- outputType(level, "implemented-by", classes[i]);\r
- }\r
- break;\r
- }\r
- }\r
- }\r
- }\r
- if (doc.isMethod()) {\r
- printAtomTag(level, "isMethod");\r
- context = CONTEXT_METHOD;\r
- }\r
- if (doc.isOrdinaryClass()) {\r
- printAtomTag(level, "isOrdinaryClass");\r
- }\r
-\r
- if (doc.inlineTags().length > 0) {\r
- printOpenTag(level, "inlineTags", false);\r
- outputTags(level+1, doc.inlineTags(), true, context);\r
- printCloseTag(0, "inlineTags");\r
- }\r
-\r
- if (doc.firstSentenceTags().length > 0) {\r
- printOpenTag(level, "firstSentenceTags", false);\r
- outputTags(level+1, doc.firstSentenceTags(), true, context);\r
- printCloseTag(0, "firstSentenceTags");\r
- }\r
-\r
- if (doc.tags().length > 0) {\r
- printOpenTag(level, "tags");\r
- outputTaglets(level+1, doc.tags(), true, context);\r
- printCloseTag(level, "tags");\r
- }\r
-\r
- if (doc.seeTags().length > 0) {\r
- printOpenTag(level, "seeTags");\r
- outputTags(level+1, doc.seeTags(), true, context);\r
- printCloseTag(level, "seeTags");\r
- }\r
-\r
- SourcePosition position = doc.position();\r
- if (null != position) {\r
- printAtomTag(level, "position file=\"" + position.file().getAbsolutePath() + "\" line=\"" + position.line() + "\" column=\"" + position.column() + "\"");\r
- }\r
- }\r
-\r
- protected void outputProgramElementDocBody(int level, ProgramElementDoc programElementDoc) {\r
- outputDocBody(level, programElementDoc);\r
- printAtomTag(level, "containingPackage name=\""+programElementDoc.containingPackage().name()+"\"");\r
- if (null!=programElementDoc.containingClass()) {\r
- outputType(level, "containingClass", programElementDoc.containingClass());\r
- }\r
- String access;\r
- if (programElementDoc.isPublic()) \r
- access="public";\r
- else if (programElementDoc.isProtected()) \r
- access="protected";\r
- else if (programElementDoc.isPrivate()) \r
- access="private";\r
- else if (programElementDoc.isPackagePrivate()) \r
- access="package";\r
- else\r
- throw new RuntimeException("Huh? "+programElementDoc+" is neither public, protected, private nor package protected.");\r
- printAtomTag(level, "access scope=\""+access+"\"");\r
- if (programElementDoc.isFinal())\r
- printAtomTag(level, "isFinal");\r
- if (programElementDoc.isStatic())\r
- printAtomTag(level, "isStatic");\r
- }\r
-\r
- protected void outputTags(int level, Tag[] tags, boolean descend, int context) {\r
-\r
- for (int i=0; i<tags.length; ++i) {\r
- outputTag(tags[i], level, descend, context, i == tags.length-1);\r
- }\r
- }\r
-\r
- protected void outputTag(Tag tag, int level, boolean descend, int context, boolean lastTag) {\r
-\r
- if (!"Text".equals(tag.name())) {\r
- printOpenTag(0 /* don't introduce additional whitespace */, \r
- "tag kind=\""+tag.kind()+"\" name=\""+tag.name()+"\"", false);\r
- }\r
- if (tag instanceof ThrowsTag) {\r
- ThrowsTag throwsTag = (ThrowsTag)tag;\r
- if (null!=throwsTag.exception()) {\r
- outputType(level+1, "exception", throwsTag.exception());\r
- }\r
- else {\r
- StringBuffer sb = new StringBuffer("Exception ");\r
- sb.append(throwsTag.exceptionName());\r
- sb.append(" not found in ");\r
- if (currentExecMember instanceof MethodDoc) {\r
- MethodDoc m = (MethodDoc)currentExecMember;\r
- sb.append(m.returnType().typeName());\r
- sb.append(m.returnType().dimension());\r
- sb.append(' ');\r
- }\r
- sb.append(currentClass.qualifiedName());\r
- sb.append('.');\r
- sb.append(currentExecMember.name());\r
- sb.append('(');\r
- Parameter[] params = currentExecMember.parameters();\r
- for (int j=0; j < params.length; j++) {\r
- sb.append(params[j].type().typeName());\r
- sb.append(params[j].type().dimension());\r
- sb.append(' ');\r
- sb.append(params[j].name());\r
- if (j != params.length-1)\r
- sb.append(", ");\r
- }\r
- sb.append(')');\r
- printWarning(sb.toString());\r
-\r
- printAtomTag(level+1, "exception typename=\""+throwsTag.exceptionName()+"\"");\r
- }\r
- }\r
- else if (tag instanceof ParamTag) {\r
- ParamTag paramTag = (ParamTag)tag;\r
- printAtomTag(level+1, "parameter name=\""+paramTag.parameterName()+"\"");\r
- }\r
-\r
- if (null != tag.text()) {\r
- //printOpenTag(level+1, "text", false);\r
- if (fixHTML) {\r
- print(htmlRepairer.getWellformedHTML(tag.text()));\r
- }\r
- else {\r
- print("<![CDATA["+cdata(tag.text())+"]]>");\r
- }\r
- //printCloseTag(0 /* don't introduce additional whitespace */, "text");\r
- }\r
- else {\r
- printWarning("Tag got null text: "+tag);\r
- }\r
-\r
- if ((descend && ("@throws".equals(tag.name()) || "@param".equals(tag.name()))) || "@deprecated".equals(tag.name())) {\r
- if (tag.firstSentenceTags().length>0) {\r
- printOpenTag(level+1, "firstSentenceTags", false);\r
- outputTags(level+2, tag.firstSentenceTags(), false, context);\r
- printCloseTag(0, "firstSentenceTags");\r
- }\r
- \r
- if (tag.inlineTags().length>0) {\r
- printOpenTag(level+1, "inlineTags", false);\r
- outputTags(level+2, tag.firstSentenceTags(), false, context);\r
- printCloseTag(0, "inlineTags");\r
- }\r
- }\r
-\r
- if (fixHTML && lastTag) {\r
- String terminateText = htmlRepairer.terminateText();\r
- if (null != terminateText && terminateText.length() > 0) {\r
- print(terminateText);\r
- }\r
- }\r
-\r
- if (!"Text".equals(tag.name())) {\r
-\r
- Taglet inlineTaglet = (Taglet)tagletMap.get(tag.name().substring(1));\r
- if (null != inlineTaglet && inlineTaglet.isInlineTag()) {\r
- printOpenTag(0, "inlineTagletText", false);\r
- print(inlineTaglet.toString(tag));\r
- printCloseTag(0, "inlineTagletText");\r
- }\r
-\r
- printCloseTag(0, "tag", false);\r
- }\r
- }\r
-\r
- void outputTaglets(int level, Tag[] tags, boolean descend, int context) \r
- {\r
- for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {\r
- String tagName = (String)it.next();\r
- Object o = tagletMap.get(tagName);\r
- Taglet taglet = (Taglet)o;\r
-\r
- if (!taglet.isInlineTag()\r
- && ((context != CONTEXT_CONSTRUCTOR || taglet.inConstructor())\r
- || (context != CONTEXT_FIELD || taglet.inField())\r
- || (context != CONTEXT_METHOD || taglet.inMethod())\r
- || (context != CONTEXT_OVERVIEW || taglet.inOverview())\r
- || (context != CONTEXT_PACKAGE || taglet.inPackage())\r
- || (context != CONTEXT_TYPE || taglet.inType()))) {\r
- \r
- List tagsOfThisType = new ArrayList();\r
- for (int i=0, ilim=tags.length; i<ilim; ++i) {\r
- if (tags[i].name().substring(1).equals(tagName)) {\r
- tagsOfThisType.add(tags[i]);\r
- }\r
- }\r
-\r
- if (!tagsOfThisType.isEmpty()) {\r
- Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);\r
- if (taglet instanceof StandardTaglet) {\r
- Iterator tagIterator = tagsOfThisType.iterator();\r
- while (tagIterator.hasNext()) {\r
- Tag tag = (Tag)tagIterator.next();\r
- outputTag(tag, level, descend, context, !tagIterator.hasNext());\r
- }\r
- }\r
- else {\r
- String tagletString = taglet.toString(tagletTags);\r
- if (null != tagletString) {\r
- printOpenTag(0, "tag name=\"" + tagName + "\" taglet-generated=\"true\"");\r
- if (fixHTML) {\r
- print(htmlRepairer.getWellformedHTML(tagletString));\r
- print(htmlRepairer.terminateText());\r
- }\r
- else {\r
- print("<![CDATA["+cdata(tagletString)+"]]>");\r
- }\r
- printCloseTag(0, "tag", false);\r
- }\r
- }\r
- }\r
- }\r
- }\r
- }\r
-\r
- /**\r
- * Inofficial entry point. We got an instance here.\r
- */\r
- protected boolean instanceStart(RootDoc _rootDoc) {\r
-\r
- this.rootDoc = _rootDoc;\r
- _rootDoc = null;\r
-\r
- boolean xmlOnly = true;\r
-\r
- // Set the default Taglet order\r
-\r
- registerTaglet(new VersionTaglet());\r
- registerTaglet(new AuthorTaglet());\r
- //registerTaglet(new SinceTaglet());\r
- registerTaglet(new StandardTaglet("deprecated"));\r
- registerTaglet(new StandardTaglet("see"));\r
- registerTaglet(new StandardTaglet("param"));\r
-\r
- // Set the built-in Taglet filter\r
-\r
- AuthorTaglet.setTagletEnabled(false);\r
- VersionTaglet.setTagletEnabled(false);\r
- SinceTaglet.setTagletEnabled(true);\r
- DeprecatedTaglet.setTagletEnabled(true);\r
-\r
- try {\r
- {\r
-\r
- // Process command line options passed through to this doclet\r
- \r
- TargetContext targetContext = null;\r
- \r
- TargetContext htmlTargetContext\r
- = new TargetContext(DocTranslet.fromClasspath("/doctranslets/html/gjdoc.xsl"), \r
- targetDirectory);\r
-\r
- for (int i=0, ilim=rootDoc.options().length; i<ilim; ++i) {\r
-\r
- String[] option = rootDoc.options()[i];\r
- String optionTag = option[0];\r
-\r
- if ("-d".equals(optionTag)) {\r
- if (null == targetDirectory) {\r
- targetDirectory = new File(option[1]);\r
- }\r
- if (null != targetContext) {\r
- targetContext.setTargetDirectory(targetDirectory);\r
- }\r
- }\r
-\r
- else if ("-nofixhtml".equals(optionTag)) {\r
- fixHTML = false;\r
- printError("-nofixhtml currently not supported.");\r
- return false;\r
- }\r
- else if ("-compress".equals(optionTag)) {\r
- compress = true;\r
- }\r
- else if ("-nohtmlwarn".equals(optionTag)) {\r
- noHTMLWarn = true;\r
- }\r
- else if ("-noemailwarn".equals(optionTag)) {\r
- noEmailWarn = true;\r
- }\r
- else if ("-indentstep".equals(optionTag)) {\r
- indentStep = Integer.parseInt(option[1]);\r
- }\r
- else if ("-doctranslet".equals(optionTag)) {\r
- targets.add(targetContext = new TargetContext(DocTranslet.fromJarFile(new File(option[1])), \r
- targetDirectory));\r
- }\r
- else if ("-genhtml".equals(optionTag)) {\r
- htmlTargetContext.setTargetDirectory(targetDirectory);\r
- targets.add(targetContext = htmlTargetContext);\r
- xmlOnly = false;\r
- } \r
- else if ("-geninfo".equals(optionTag)) {\r
- targetContext\r
- = new TargetContext(DocTranslet.fromClasspath("/doctranslets/info/gengj.xsl"), \r
- targetDirectory);\r
- targets.add(targetContext);\r
- if (!fixHTML) {\r
- printNotice("NOTE: -geninfo implies -fixhtml.");\r
- fixHTML = true;\r
- }\r
- xmlOnly = false;\r
- }\r
- else if ("-gendocbook".equals(optionTag)) {\r
- targetContext = new TargetContext(DocTranslet.fromClasspath("/doctranslets/docbook/gengj.xsl"), \r
- targetDirectory);\r
- targets.add(targetContext);\r
- if (!fixHTML) {\r
- printNotice("NOTE: -gendocbook implies -fixhtml.");\r
- fixHTML = true;\r
- }\r
- }\r
- else if ("-genpdf".equals(optionTag)) {\r
- targetContext\r
- = new TargetContext(DocTranslet.fromClasspath("/doctranslets/docbook/gengj.xsl"), \r
- targetDirectory);\r
- /** "gnu.classpath.tools.doclets.xmldoclet.DocBookPostprocessor") **/\r
- targets.add(targetContext);\r
- if (!fixHTML) {\r
- printNotice("NOTE: -genpdf implies -fixhtml.");\r
- fixHTML = true;\r
- }\r
- }\r
- else if ("-xmlonly".equals(optionTag)) {\r
- xmlOnly = true;\r
- }\r
- else if ("-bottomnote".equals(optionTag)) {\r
-\r
- FileReader reader = new FileReader(option[1]);\r
- StringWriter writer = new StringWriter();\r
- char[] buf = new char[256];\r
- int nread;\r
- while ((nread = reader.read(buf)) >= 0) {\r
- writer.write(buf, 0, nread);\r
- }\r
- writer.flush();\r
- bottomNote = writer.toString();\r
- writer.close();\r
- reader.close();\r
- }\r
- else if ("-title".equals(optionTag)) {\r
-\r
- title = option[1];\r
- }\r
- else if ("-workpath".equals(optionTag)) {\r
-\r
- workingPath = option[1];\r
- }\r
- else if ("-tagletpath".equals(optionTag)) {\r
-\r
- if (null == tagletPath) {\r
- tagletPath = option[1];\r
- }\r
- else {\r
- tagletPath = tagletPath + File.pathSeparator + option[1];\r
- }\r
- }\r
- else if ("-taglet".equals(optionTag)) {\r
-\r
- boolean tagletLoaded = false;\r
-\r
- String useTagletPath = this.tagletPath;\r
- if (null == useTagletPath) {\r
- useTagletPath = System.getProperty("java.class.path");\r
- }\r
-\r
- try {\r
- Class tagletClass;\r
- try {\r
- tagletClass\r
- = new FileSystemClassLoader(useTagletPath).loadClass(option[1]);\r
- }\r
- catch (ClassNotFoundException e) {\r
- // If not found on specified tagletpath, try default classloader\r
- tagletClass\r
- = Class.forName(option[1]);\r
- }\r
- Method registerTagletMethod\r
- = tagletClass.getDeclaredMethod("register", new Class[] { java.util.Map.class });\r
-\r
- if (!registerTagletMethod.getReturnType().equals(Void.TYPE)) {\r
- printError("Taglet class '" + option[1] + "' found, but register method doesn't return void.");\r
- }\r
- else if (registerTagletMethod.getExceptionTypes().length > 0) {\r
- printError("Taglet class '" + option[1] + "' found, but register method contains throws clause.");\r
- }\r
- else if ((registerTagletMethod.getModifiers() & (Modifier.STATIC | Modifier.PUBLIC | Modifier.ABSTRACT)) != (Modifier.STATIC | Modifier.PUBLIC)) {\r
- printError("Taglet class '" + option[1] + "' found, but register method isn't public static, or is abstract..");\r
- }\r
- else {\r
- Map tempMap = new HashMap();\r
- registerTagletMethod.invoke(null, new Object[] { tempMap });\r
- tagletLoaded = true;\r
- String name = (String)tempMap.keySet().iterator().next();\r
- Taglet taglet = (Taglet)tempMap.get(name);\r
- tagletMap.put(name, taglet);\r
- mentionedTags.add(taglet);\r
- }\r
- }\r
- catch (NoSuchMethodException e) {\r
- printError("Taglet class '" + option[1] + "' found, but doesn't contain the register method.");\r
- }\r
- catch (SecurityException e) {\r
- printError("Taglet class '" + option[1] + "' cannot be loaded: " + e.getMessage());\r
- }\r
- catch (InvocationTargetException e) {\r
- printError("Taglet class '" + option[1] + "' found, but register method throws exception: " + e.toString());\r
- }\r
- catch (IllegalAccessException e) {\r
- printError("Taglet class '" + option[1] + "' found, but there was a problem when accessing the register method: " + e.toString());\r
- }\r
- catch (IllegalArgumentException e) {\r
- printError("Taglet class '" + option[1] + "' found, but there was a problem when accessing the register method: " + e.toString());\r
- }\r
- catch (ClassNotFoundException e) {\r
- printError("Taglet class '" + option[1] + "' cannot be found.");\r
- }\r
- if (!tagletLoaded) {\r
- return false;\r
- }\r
- }\r
- else if ("-author".equals(optionTag)) {\r
- AuthorTaglet.setTagletEnabled(true);\r
- }\r
- else if ("-version".equals(optionTag)) {\r
- VersionTaglet.setTagletEnabled(true);\r
- }\r
- else if ("-nosince".equals(optionTag)) {\r
- SinceTaglet.setTagletEnabled(false);\r
- }\r
- else if ("-nodeprecated".equals(optionTag)) {\r
- DeprecatedTaglet.setTagletEnabled(false);\r
- }\r
- else if ("-authormail".equals(optionTag)) {\r
- \r
- if ("no-replace".equalsIgnoreCase(option[1])) {\r
- AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.NO_REPLACEMENT);\r
- }\r
- else if ("mailto-name".equalsIgnoreCase(option[1])) {\r
- AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.MAILTO_NAME);\r
- }\r
- else if ("name-mailto-address".equalsIgnoreCase(option[1])) {\r
- AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.NAME_MAILTO_ADDRESS);\r
- }\r
- else if ("name-mangled-address".equalsIgnoreCase(option[1])) {\r
- AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.NAME_MANGLED_ADDRESS);\r
- }\r
- else {\r
- printError("Invalid value for option '-authortag-email'. Allowed values are:"\r
- + " no-replace, mailto-name, name-mailto-address, name-mangled-address.");\r
- return false;\r
- }\r
- }\r
- else if ("-mailmangledot".equals(optionTag)) {\r
- AuthorTaglet.setDotReplacement(option[1]);\r
- }\r
- else if ("-mailmangleat".equals(optionTag)) {\r
- AuthorTaglet.setAtReplacement(option[1]);\r
- }\r
- else if ("-docfilessubdirs".equals(optionTag)) {\r
- docFilesSubdirsEnabled = true;\r
- }\r
- else if ("-excludedocfilessubdir".equals(optionTag)) {\r
- StringTokenizer st = new StringTokenizer(option[1]);\r
- while (st.hasMoreTokens()) {\r
- excludeDocFilesSubDirs.add(st.nextToken());\r
- }\r
- }\r
- else if ("-nonavbar".equals(optionTag)) {\r
- docTransletOptions.nonavbar = true;\r
- }\r
- else if ("-noindex".equals(optionTag)) {\r
- docTransletOptions.noindex = true;\r
- }\r
- else if ("-notree".equals(optionTag)) {\r
- docTransletOptions.notree = true;\r
- }\r
- else if ("-nocomment".equals(optionTag)) {\r
- docTransletOptions.nocomment = true;\r
- }\r
- else if ("-nohelp".equals(optionTag)) {\r
- docTransletOptions.nohelp = true;\r
- }\r
- else if ("-splitindex".equals(optionTag)) {\r
- docTransletOptions.splitindex = true;\r
- }\r
- else if ("-linksource".equals(optionTag)) {\r
- docTransletOptions.linksource = true;\r
- }\r
- else if ("-windowtitle".equals(optionTag)) {\r
- docTransletOptions.windowtitle = option[1];\r
- }\r
- else if ("-helpfile".equals(optionTag)) {\r
- docTransletOptions.helpfile = new File(option[1]).toURL().toString();\r
- }\r
- else if ("-stylesheetfile".equals(optionTag)) {\r
- docTransletOptions.stylesheetfile = new File(option[1]).toURL().toString();\r
- }\r
- else if ("-header".equals(optionTag)) {\r
- docTransletOptions.header = option[1];\r
- }\r
- else if ("-footer".equals(optionTag)) {\r
- docTransletOptions.footer = option[1];\r
- }\r
- else if ("-bottom".equals(optionTag)) {\r
- docTransletOptions.bottom = option[1];\r
- }\r
- else if ("-doctitle".equals(optionTag)) {\r
- docTransletOptions.doctitle = option[1];\r
- }\r
- else if ("-nodeprecatedlist".equals(optionTag)) {\r
- docTransletOptions.nodeprecatedlist = true;\r
- }\r
- else if ("-uses".equals(optionTag)) {\r
- docTransletOptions.uses = true;\r
- }\r
- else if ("-group".equals(optionTag)) {\r
- if (!processGroupOption(option[1], option[2])) {\r
- printError("Invalid package wildcard list in -group option \"" + option[1] + "\" " + option[2]);\r
- return false;\r
- }\r
- }\r
- else if ("-tag".equals(optionTag)) {\r
- String tagSpec = option[1];\r
- boolean validTagSpec = false;\r
- int ndx1 = tagSpec.indexOf(':');\r
- if (ndx1 < 0) {\r
- Taglet taglet = (Taglet)tagletMap.get(tagSpec);\r
- if (null == taglet) {\r
- printError("There is no standard tag '" + tagSpec + "'.");\r
- }\r
- else {\r
- if (mentionedTags.contains(taglet)) {\r
- printError("Tag '" + tagSpec + "' has been added or moved before.");\r
- }\r
- else {\r
- mentionedTags.add(taglet);\r
- \r
- // re-append taglet\r
- tagletMap.remove(tagSpec);\r
- tagletMap.put(tagSpec, taglet);\r
- }\r
- }\r
- }\r
- else {\r
- int ndx2 = tagSpec.indexOf(':', ndx1 + 1);\r
- if (ndx2 > ndx1 && ndx2 < tagSpec.length() - 1) {\r
- String tagName = tagSpec.substring(0, ndx1);\r
- String tagHead = null;\r
- if (tagSpec.charAt(ndx2 + 1) == '\"') {\r
- if (tagSpec.charAt(tagSpec.length() - 1) == '\"') {\r
- tagHead = tagSpec.substring(ndx2 + 2, tagSpec.length() - 1);\r
- validTagSpec = true;\r
- }\r
- }\r
- else {\r
- tagHead = tagSpec.substring(ndx2 + 1);\r
- validTagSpec = true;\r
- }\r
-\r
- boolean tagScopeOverview = false;\r
- boolean tagScopePackages = false;\r
- boolean tagScopeTypes = false;\r
- boolean tagScopeConstructors = false;\r
- boolean tagScopeMethods = false;\r
- boolean tagScopeFields = false;\r
- boolean tagDisabled = false;\r
- \r
- tag_option_loop:\r
- for (int n=ndx1+1; n<ndx2; ++n) {\r
- switch (tagSpec.charAt(n)) {\r
- case 'X': \r
- tagDisabled = true;\r
- break;\r
- case 'a':\r
- tagScopeOverview = true;\r
- tagScopePackages = true;\r
- tagScopeTypes = true;\r
- tagScopeConstructors = true;\r
- tagScopeMethods = true;\r
- tagScopeFields = true;\r
- break;\r
- case 'o':\r
- tagScopeOverview = true;\r
- break;\r
- case 'p':\r
- tagScopePackages = true;\r
- break;\r
- case 't':\r
- tagScopeTypes = true;\r
- break;\r
- case 'c':\r
- tagScopeConstructors = true;\r
- break;\r
- case 'm':\r
- tagScopeMethods = true;\r
- break;\r
- case 'f':\r
- tagScopeFields = true;\r
- break;\r
- default:\r
- validTagSpec = false;\r
- break tag_option_loop;\r
- }\r
- }\r
- \r
- if (validTagSpec) {\r
- GenericTaglet taglet\r
- = new GenericTaglet(tagName,\r
- tagHead,\r
- tagScopeOverview,\r
- tagScopePackages,\r
- tagScopeTypes,\r
- tagScopeConstructors,\r
- tagScopeMethods,\r
- tagScopeFields);\r
- taglet.setTagletEnabled(!tagDisabled);\r
- taglet.register(tagletMap);\r
- mentionedTags.add(taglet);\r
- }\r
- }\r
- }\r
- if (!validTagSpec) {\r
- printError("Value for option -tag must be in format \"<tagname>:Xaoptcmf:<taghead>\".");\r
- }\r
- }\r
- }\r
-\r
- // Use current directory if target directory hasn't been set.\r
- if (null == targetDirectory) {\r
- targetDirectory = new File(System.getProperty("user.dir"));\r
- }\r
- if (null != targetContext) {\r
- targetContext.setTargetDirectory(targetDirectory);\r
- }\r
-\r
- // It is illegal to specify targets AND -xmlonly.\r
-\r
- if (xmlOnly && targets.size() > 0) {\r
-\r
- printError("You can only specify one of -xmlonly and a target format.");\r
- return false;\r
- }\r
-\r
- // If no target was specified and XML only was not\r
- // requested, use HTML as default target.\r
-\r
- if (!xmlOnly && targets.size() == 0) {\r
- targets.add(targetContext = htmlTargetContext);\r
- }\r
-\r
- // Set the same target directory for all output.\r
-\r
- // FIXME: Allow separate target directories for different\r
- // output formats.\r
-\r
- for (Iterator it = targets.iterator(); it.hasNext(); ) {\r
- TargetContext t = (TargetContext)it.next();\r
- t.setTargetDirectory(targetDirectory);\r
- }\r
-\r
- // Create temporary directory if necessary\r
-\r
- if (xmlOnly) {\r
-\r
- xmlTargetDirectory = targetDirectory;\r
- }\r
- else {\r
-\r
- File workingTopDirectory = new File(workingPath);\r
-\r
- workingDirectory = new File(workingTopDirectory, "gjdoc.tmp."+System.currentTimeMillis());\r
- \r
- if (!workingDirectory.mkdir()) {\r
- printError("Cannot create temporary directory at "+System.getProperty("java.io.tmpdir"));\r
- return false;\r
- }\r
-\r
- File xmlTempDirectory = new File(workingDirectory, "xmloutput");\r
-\r
- if (!xmlTempDirectory.mkdir()) {\r
- printError("Cannot create temporary directory for XML output at "+System.getProperty("java.io.tmpdir"));\r
- return false;\r
- }\r
-\r
- xmlTargetDirectory = xmlTempDirectory;\r
- }\r
-\r
- // Create target directory if necessary\r
-\r
- if (!targetDirectory.exists()) {\r
- printNotice("Creating destination directory: \""\r
- + targetDirectory + "\"");\r
- if (!targetDirectory.mkdirs()) {\r
- printError("Failed to create destination directory \""\r
- + targetDirectory + "\"");\r
- return false;\r
- }\r
- }\r
-\r
- // Check for deprecation\r
-\r
- boolean hasDeprecatedClasses = false;\r
- boolean hasDeprecatedInterfaces = false;\r
- boolean hasDeprecatedExceptions = false;\r
- boolean hasDeprecatedErrors = false;\r
- boolean hasDeprecatedMethods = false;\r
- boolean hasDeprecatedFields = false;\r
-\r
- {\r
- ClassDoc[] classes = rootDoc.classes();\r
- for (int i = 0, ilim = classes.length; i < ilim; ++ i) {\r
- ClassDoc c = classes[i];\r
- Tag[] deprecatedTags = c.tags("deprecated");\r
- if (null != deprecatedTags && 0 != deprecatedTags.length) {\r
- if (c.isInterface()) {\r
- hasDeprecatedInterfaces = true;\r
- }\r
- else if (c.isException()) {\r
- hasDeprecatedExceptions = true;\r
- }\r
- else if (c.isError()) {\r
- hasDeprecatedErrors = true;\r
- }\r
- else /*if (c.isOrdinaryClass())*/ {\r
- hasDeprecatedClasses = true;\r
- }\r
- }\r
- \r
- MethodDoc[] methods = c.methods();\r
- for (int j = 0, jlim = methods.length; j < jlim; ++ j) {\r
- MethodDoc m = methods[j];\r
- deprecatedTags = m.tags("deprecated");\r
- if (null != deprecatedTags && 0 != deprecatedTags.length) {\r
- hasDeprecatedMethods = true;\r
- }\r
- }\r
- \r
- FieldDoc[] fields = c.fields();\r
- for (int j = 0, jlim = fields.length; j < jlim; ++ j) {\r
- FieldDoc f = fields[j];\r
- deprecatedTags = f.tags("deprecated");\r
- if (null != deprecatedTags && 0 != deprecatedTags.length) {\r
- hasDeprecatedFields = true;\r
- }\r
- }\r
- }\r
- }\r
-\r
- htmlRepairer = new HtmlRepairer(rootDoc, noHTMLWarn, noEmailWarn,\r
- currentClass, currentMember,\r
- false);\r
-\r
- collectUsage();\r
-\r
- // Begin XML generation\r
-\r
- printNotice("Writing XML Index file...");\r
-\r
- // Assign output stream\r
-\r
- setTargetFile("index.xml");\r
-\r
- // Output XML document header\r
-\r
- println(0, "<?xml version=\"1.0\"?>");\r
- println("<!DOCTYPE gjdoc SYSTEM \"dtd/gjdoc.dtd\">");\r
- println();\r
- printOpenTag(0, "rootdoc xmlns=\"http://www.w3.org/TR/REC-html40\" xmlns:gjdoc=\"http://www.gnu.org/software/cp-tools/gjdocxml\"");\r
-\r
- println();\r
- println(1, "<!-- Tags from overview page, if available -->");\r
-\r
- if (rootDoc.firstSentenceTags().length > 0) {\r
- printOpenTag(2, "firstSentenceTags", false);\r
- outputTags(3, rootDoc.firstSentenceTags(), true, CONTEXT_PACKAGE);\r
- printCloseTag(0, "firstSentenceTags");\r
- }\r
-\r
- if (rootDoc.inlineTags().length > 0) {\r
- printOpenTag(2, "inlineTags");\r
- outputTags(3, rootDoc.inlineTags(), true, CONTEXT_PACKAGE);\r
- printCloseTag(2, "inlineTags");\r
- }\r
- \r
- if (null != bottomNote) {\r
- printOpenTag(1, "bottomnote");\r
- print(bottomNote);\r
- printCloseTag(1, "bottomnote");\r
- }\r
-\r
- if (null != title) {\r
- printOpenTag(1, "title");\r
- println(2, title);\r
- printCloseTag(1, "title");\r
- }\r
- \r
- printOpenTag(1, "created");\r
- println(2, DateFormat.getDateInstance(DateFormat.LONG, Locale.US).format(new java.util.Date()));\r
- printCloseTag(1, "created");\r
-\r
- if (hasDeprecatedClasses) printAtomTag(1, "hasDeprecatedClasses");\r
- if (hasDeprecatedInterfaces) printAtomTag(1, "hasDeprecatedInterfaces");\r
- if (hasDeprecatedExceptions) printAtomTag(1, "hasDeprecatedExceptions");\r
- if (hasDeprecatedErrors) printAtomTag(1, "hasDeprecatedErrors");\r
- if (hasDeprecatedMethods) printAtomTag(1, "hasDeprecatedMethods");\r
- if (hasDeprecatedFields) printAtomTag(1, "hasDeprecatedFields");\r
-\r
- // Output summary of all classes specified on command line\r
-\r
- println();\r
- println(1, "<!-- Classes specified by user on command line -->");\r
- ClassDoc[] specifiedClasses = rootDoc.specifiedClasses();\r
- for (int i=0, ilim=specifiedClasses.length; i<ilim; ++i) {\r
- ClassDoc sc = specifiedClasses[i];\r
- printAtomTag(1, "specifiedclass fqname=\""+sc.qualifiedName()+"\" name=\""+sc.name()+"\"");\r
- }\r
- specifiedClasses = null;\r
-\r
- // Output summary of all packages specified on command line\r
-\r
- println();\r
- println(1, "<!-- Packages specified by user on command line -->");\r
- PackageDoc[] specifiedPackages = rootDoc.specifiedPackages();\r
- for (int i=0, ilim=specifiedPackages.length; i<ilim; ++i) {\r
- PackageDoc sp = specifiedPackages[i];\r
- printAtomTag(1, "specifiedpackage name=\""+sp.name()+"\"");\r
- }\r
- specifiedPackages = null;\r
-\r
- // Output package group information specified on the\r
- // command line\r
-\r
- println();\r
- println(1, "<!-- Package groups specified by user on command line -->");\r
- {\r
- Iterator packageGroupIt = packageGroups.iterator();\r
- while (packageGroupIt.hasNext()) {\r
- PackageGroup packageGroup = (PackageGroup)packageGroupIt.next();\r
- SortedSet groupedPackages = packageGroup.getPackages();\r
- if (groupedPackages.isEmpty()) {\r
- printWarning("Package group named '" \r
- + packageGroup.getName() + "' didn't match any packages.");\r
- }\r
- else {\r
- printOpenTag(1, "packagegroup name=\"" + packageGroup.getName() + "\"");\r
- Iterator groupedPackageIt = groupedPackages.iterator();\r
- while (groupedPackageIt.hasNext()) {\r
- PackageDoc groupedPackageDoc = (PackageDoc)groupedPackageIt.next();\r
- printAtomTag(2, "package name=\"" + groupedPackageDoc.name() + "\"");\r
- }\r
- printCloseTag(1, "packagegroup");\r
- }\r
- }\r
- packageGroups = null;\r
- }\r
-\r
- // Output information on all packages for which documentation\r
- // has been made available via the Doclet API\r
-\r
- println();\r
- println(1, "<!-- Documentation for all packages -->");\r
- PackageDoc[] packages = rootDoc.specifiedPackages();\r
- for (int i=0, ilim=packages.length; i<ilim; ++i) {\r
- PackageDoc c = packages[i];\r
- outputPackageDoc(c);\r
- }\r
- packages = null;\r
-\r
- // Output brief summary on all classes for which documentation\r
- // has been made available via the Doclet API.\r
- //\r
- // While this is redundant, it can speed up XSLT\r
- // processing by orders of magnitude\r
-\r
- println();\r
- println(1, "<!-- Brief summary for all classes -->");\r
- ClassDoc[] sumclasses = rootDoc.classes();\r
- for (int i=0, ilim=sumclasses.length; i<ilim; ++i) {\r
- ClassDoc c = sumclasses[i];\r
- outputClassDocSummary(c);\r
- }\r
- sumclasses = null;\r
- \r
- // Output closing tag, finish output stream\r
-\r
- println();\r
- printCloseTag(0, "rootdoc");\r
-\r
- closeTargetFile();\r
-\r
- createIndexByName();\r
-\r
-\r
-\r
- // Output information on all classes for which documentation\r
- // has been made available via the Doclet API\r
- \r
- println();\r
- println(1, "<!-- Documentation for all classes -->");\r
- ClassDoc[] classes = rootDoc.classes();\r
- String prevPackageName = null;\r
- for (int i = 0, ilim = classes.length; i < ilim; ++ i) {\r
- ClassDoc c = classes[i];\r
-\r
- if (isVerbose()) {\r
- printNotice("Writing XML information for "+c.qualifiedName()+"...");\r
- }\r
- else {\r
- String packageName = c.containingPackage().name();\r
- if (null == prevPackageName || !packageName.equals(prevPackageName)) {\r
- printNotice("Writing XML information for "+packageName+"...");\r
- prevPackageName = packageName;\r
- }\r
- }\r
- \r
- setTargetFile(c.qualifiedName().replace('/','.')+".xml");\r
- \r
- println("<?xml version=\"1.0\"?>");\r
- println("<!DOCTYPE gjdoc SYSTEM \"dtd/gjdoc.dtd\">");\r
- \r
- outputClassDoc(c);\r
- \r
- closeTargetFile();\r
- }\r
- classes = null;\r
- }\r
- \r
- // Copy DTD files to temporary directory\r
- \r
- // FIXME: try to solve this via jar: URLs. but this will\r
- // probably break libxmlj compatibility (?)\r
- \r
- String[] resources = new String[] {\r
- "gjdoc.dtd",\r
- "gjdoc-alphaindex.dtd",\r
- "dbcentx.mod",\r
- "ent/iso-amsa.ent",\r
- "ent/iso-amsb.ent",\r
- "ent/iso-amsc.ent",\r
- "ent/iso-amsn.ent",\r
- "ent/iso-amso.ent",\r
- "ent/iso-amsr.ent",\r
- "ent/iso-box.ent",\r
- "ent/iso-cyr1.ent",\r
- "ent/iso-cyr2.ent",\r
- "ent/iso-dia.ent",\r
- "ent/iso-grk1.ent",\r
- "ent/iso-grk2.ent",\r
- "ent/iso-grk3.ent",\r
- "ent/iso-grk4.ent",\r
- "ent/iso-lat1.ent",\r
- "ent/iso-lat2.ent",\r
- "ent/iso-num.ent",\r
- "ent/iso-pub.ent",\r
- "ent/iso-tech.ent",\r
- };\r
-\r
- File tempDtdDirectory = new File(xmlTargetDirectory, "dtd");\r
- File tempDtdEntDirectory = new File(tempDtdDirectory, "ent");\r
-\r
- if ((tempDtdDirectory.exists() || tempDtdDirectory.mkdir())\r
- && (tempDtdEntDirectory.exists() || tempDtdEntDirectory.mkdir())) {\r
- for (int i = 0; i < resources.length; ++ i) {\r
- copyResourceToFile("/dtd/" + resources[i], \r
- new File(tempDtdDirectory, resources[i]));\r
- }\r
- }\r
- else {\r
- printError("Cannot create temporary directories for DTD data at " + tempDtdDirectory);\r
- return false;\r
- }\r
-\r
- // Copy package data-dir directory\r
-\r
- {\r
- PackageDoc[] packages = rootDoc.specifiedPackages();\r
- for (int i=0, ilim=packages.length; i<ilim; ++i) {\r
- PackageDoc c = packages[i];\r
- if (c instanceof GjdocPackageDoc) {\r
- copyPackageDataDir((GjdocPackageDoc)c);\r
- }\r
- }\r
- }\r
-\r
- // All information has been output. Apply stylesheet if given.\r
-\r
- gnu.classpath.tools.gjdoc.Main.releaseRootDoc();\r
- \r
- this.currentClass = null;\r
- this.currentMember = null;\r
- this.currentExecMember = null;\r
- \r
- System.gc(); \r
-\r
- // From this point we are only operating on files, so we don't\r
- // need this anymore and can free up some memory\r
-\r
- for (Iterator it = targets.iterator(); it.hasNext(); ) {\r
-\r
- TargetContext target = (TargetContext)it.next();\r
-\r
- // We have XSLT postprocessing, run DocTranslet.\r
-\r
- //DocTranslet docTranslet = DocTranslet.fromClasspath("/doctranslets/html/gjdoc.xsl");\r
- \r
- //docTranslet.setOptions(docTransletOptions);\r
-\r
- target.getDocTranslet().setOptions(docTransletOptions);\r
-\r
- target.getDocTranslet().apply(xmlTargetDirectory, \r
- target.getTargetDirectory(), \r
- rootDoc);\r
- }\r
-\r
- // Done\r
-\r
- targets = null;\r
-\r
- System.gc();\r
- Runtime.getRuntime().runFinalization();\r
-\r
- return true;\r
- }\r
- catch (Exception e) {\r
-\r
- // Something went wrong. Report to stderr and pass error to\r
- // Javadoc Reporter\r
-\r
- e.printStackTrace();\r
- printError(e.toString());\r
-\r
- Throwable rootCause = e.getCause();\r
- if (null != rootCause) {\r
- while (null != rootCause.getCause()) {\r
- rootCause = rootCause.getCause();\r
- }\r
- System.err.println("Root cause:");\r
- rootCause.printStackTrace();\r
- }\r
-\r
- return false;\r
- }\r
- finally {\r
-\r
- // In any case, delete the working directory if we created one\r
-\r
- if (null != workingDirectory) {\r
-\r
- if (!deleteRecursive(workingDirectory)) {\r
- printWarning("Could not delete temporary directory at "+workingDirectory);\r
- }\r
- }\r
-\r
- printNotice("Done.");\r
- }\r
- }\r
-\r
- /**\r
- * Recursively delete the specified directory and its contents,\r
- * like <code>rm -Rf directory</code>\r
- *\r
- * @return <code>true</code> on success\r
- */\r
- private static boolean deleteRecursive(File directory) {\r
-\r
- boolean success = true;\r
-\r
- File[] files = directory.listFiles();\r
-\r
- for (int i=0, ilim=files.length; i<ilim; ++i) {\r
-\r
- File file = files[i];\r
-\r
- if (file.isDirectory()) {\r
-\r
- success = deleteRecursive(file) && success;\r
- }\r
- else {\r
-\r
- success = file.delete() && success;\r
- }\r
- }\r
-\r
- return directory.delete() && success;\r
- }\r
-\r
- /**\r
- * Prints a string to stdout and appends a newline. Convenience\r
- * method. \r
- */\r
- protected void println(String str) {\r
- out.println(str);\r
- }\r
-\r
- /**\r
- * Prints a string to stdout without appending a newline.\r
- * Convenience method. \r
- */\r
- protected void print(String str) {\r
- out.print(str);\r
- }\r
-\r
- /**\r
- * In standard mode, prints an empty line to stdout.\r
- * In thight mode, nothing happens.\r
- * Convenience method. \r
- */\r
- protected void println() {\r
- if (!compress) {\r
- out.println();\r
- }\r
- }\r
-\r
- /**\r
- * In standard mode, prints the given text indented to stdout and appends newline. \r
- * In tight mode, doesn't print indentation or newlines.\r
- */\r
- protected void print(int indentLevel, String msg) {\r
- if (compress) {\r
- out.print(msg);\r
- }\r
- else {\r
- StringBuffer indentation = new StringBuffer();\r
- for (int i=0; i<indentLevel*indentStep; ++i) {\r
- indentation.append(' ');\r
- }\r
- out.print(indentation+msg);\r
- }\r
- }\r
- \r
- /**\r
- * In tight mode, prints a message at a given indentation level.\r
- * In standard mode, appends a newline in addition.\r
- */\r
- protected void println(int indentLevel, String msg) {\r
- print(indentLevel, msg);\r
- if (!compress) out.println();\r
- }\r
-\r
- /**\r
- * Prints an atom tag at the given indentation level.\r
- */\r
- protected void printAtomTag(int level, String tag) {\r
- println(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+"/>");\r
- }\r
-\r
- /**\r
- * Prints an open tag at the given indentation level.\r
- */\r
- protected void printOpenTag(int level, String tag) {\r
- printOpenTag(level, replaceCharsInTag(tag), true);\r
- }\r
-\r
- /**\r
- * Prints an open tag at the given indentation level and\r
- * conditionally appends a newline (if not in tight mode).\r
- */\r
- protected void printOpenTag(int level, String tag, boolean appendNewline) {\r
- if (appendNewline && !compress) {\r
- println(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+">");\r
- }\r
- else {\r
- print(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+">");\r
- }\r
- }\r
-\r
- /**\r
- * Prints a close tag at the given indentation level.\r
- */\r
- protected void printCloseTag(int level, String tag) {\r
- printCloseTag(level, tag, true);\r
- }\r
-\r
- /**\r
- * Prints a close tag at the given indentation level and\r
- * conditionally appends a newline (if not in tight mode).\r
- */\r
- protected void printCloseTag(int level, String tag, boolean appendNewline) {\r
- if (appendNewline && !compress) {\r
- println(level, "</"+tagPrefix+":"+replaceCharsInTag(tag)+">");\r
- }\r
- else {\r
- print(level, "</"+tagPrefix+":"+replaceCharsInTag(tag)+">");\r
- }\r
- }\r
-\r
- public static int optionLength(String option) {\r
- if ("-d".equals(option)) return 2;\r
- else if ("-fixhtml".equals(option)) return 1;\r
- else if ("-compress".equals(option)) return 1;\r
- else if ("-nohtmlwarn".equals(option)) return 1;\r
- else if ("-noemailwarn".equals(option)) return 1;\r
- else if ("-indentstep".equals(option)) return 2;\r
- else if ("-xslsheet".equals(option)) return 2;\r
- else if ("-xsltdriver".equals(option)) return 2;\r
- else if ("-postprocess".equals(option)) return 2;\r
- else if ("-genhtml".equals(option)) return 1;\r
- else if ("-geninfo".equals(option)) return 1;\r
- else if ("-gendocbook".equals(option)) return 1;\r
- else if ("-xmlonly".equals(option)) return 1;\r
- else if ("-bottomnote".equals(option)) return 2;\r
- else if ("-workpath".equals(option)) return 2;\r
- else if ("-title".equals(option)) return 2;\r
- else if ("-tagletpath".equals(option)) return 2;\r
- else if ("-taglet".equals(option)) return 2;\r
- else if ("-authormail".equals(option)) return 2;\r
- else if ("-mailmangledot".equals(option)) return 2;\r
- else if ("-mailmangleat".equals(option)) return 2;\r
- else if ("-noindex".equals(option)) return 1;\r
- else if ("-nocomment".equals(option)) return 1;\r
- else if ("-notree".equals(option)) return 1;\r
- else if ("-nohelp".equals(option)) return 1;\r
- else if ("-nonavbar".equals(option)) return 1;\r
- else if ("-splitindex".equals(option)) return 1;\r
- else if ("-author".equals(option)) return 1;\r
- else if ("-version".equals(option)) return 1;\r
- else if ("-nosince".equals(option)) return 1;\r
- else if ("-nodeprecated".equals(option)) return 1;\r
- else if ("-linksource".equals(option)) return 1;\r
- else if ("-windowtitle".equals(option)) return 2;\r
- else if ("-helpfile".equals(option)) return 2;\r
- else if ("-stylesheetfile".equals(option)) return 2;\r
- else if ("-tag".equals(option)) return 2;\r
- else if ("-header".equals(option)) return 2;\r
- else if ("-footer".equals(option)) return 2;\r
- else if ("-bottom".equals(option)) return 2;\r
- else if ("-doctitle".equals(option)) return 2;\r
- else if ("-nodeprecatedlist".equals(option)) return 1;\r
- else if ("-uses".equals(option)) return 1;\r
- else if ("-group".equals(option)) return 3;\r
-\r
- else return -1;\r
- }\r
-\r
- public static boolean validOptions(String[][] options) {\r
- return true;\r
- }\r
-\r
-\r
- /**\r
- * Workaround for non well-formed comments: fix tag contents\r
- * by replacing <code><</code> with <code>&lt;</code>,\r
- * <code>></code> with <code>&gt;</code> and\r
- * <code>&</code> with <code>&amp;</code>.\r
- *\r
- * @param tagContent String to process\r
- *\r
- * @return given String with all special characters replaced by \r
- * HTML entities.\r
- */\r
- private static String replaceCharsInTag(String tagContent) {\r
- return \r
- replaceString(\r
- replaceString(\r
- replaceString(\r
- tagContent, \r
- "<", "<"\r
- ), \r
- ">", ">"\r
- ),\r
- "&", "&"\r
- );\r
- }\r
-\r
- /**\r
- * Replaces all occurences of string <code>needle</code> within string\r
- * <code>haystack</code> by string <code>replacement</code>.\r
- *\r
- * @param haystack The string to search and replace in.\r
- * @param needle The string which is searched for.\r
- * @param replacement The string by which every occurence of <code>needle</code> is replaced.\r
- */\r
- private static String replaceString(String haystack, String needle, String replacement) {\r
- int ndx = haystack.indexOf(needle);\r
- if (ndx<0)\r
- return haystack;\r
- else\r
- return haystack.substring(0, ndx) + replacement \r
- + replaceString(haystack.substring(ndx+needle.length()), needle, replacement);\r
- }\r
-\r
- protected void setTargetFile(String filename) throws IOException {\r
-\r
- OutputStream fileOut = new FileOutputStream(new File(xmlTargetDirectory, filename));\r
- out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fileOut, "UTF8")));;\r
- }\r
-\r
- protected void closeTargetFile() {\r
-\r
- out.flush();\r
- out.close();\r
- }\r
-\r
- private String cdata(String str) {\r
-\r
- if (null==str) {\r
- return str;\r
- } // end of if ((null==str)\r
-\r
- StringBuffer rc = new StringBuffer();\r
- for (int i=0; i<str.length(); ++i) {\r
- char c = str.charAt(i);\r
- if (c==0x09 || c==0x0a || c==0x0d || (c>=0x20 && c<=0xd7ff) || (c>=0xe000 && c<=0xfffd) || (c>=0x10000 && c<=0x10ffff)) {\r
- rc.append(c);\r
- }\r
- else {\r
- printWarning("Invalid Unicode character 0x"+Integer.toString(c, 16)+" in javadoc markup has been stripped.");\r
- } // end of else\r
- \r
- }\r
- return rc.toString();\r
- }\r
-\r
- static void copyResourceToFile(String resourceName, File target) throws IOException {\r
- \r
- InputStream in = Driver.class.getResourceAsStream(resourceName);\r
-\r
- if (null != in) {\r
-\r
- FileOutputStream out = new FileOutputStream(target);\r
- int size;\r
- byte[] buffer = new byte[512];\r
- while ((size = in.read(buffer)) >= 0) {\r
- out.write(buffer, 0, size);\r
- }\r
- out.close();\r
- }\r
- else {\r
-\r
- throw new IOException("Can't find resource named "+resourceName);\r
- }\r
- }\r
-\r
- private void printError(String error) {\r
- if (null != rootDoc) {\r
- rootDoc.printError(error);\r
- }\r
- else {\r
- System.err.println("ERROR: "+error);\r
- }\r
- }\r
-\r
- private void printWarning(String warning) {\r
- if (null != rootDoc) {\r
- rootDoc.printWarning(warning);\r
- }\r
- else {\r
- System.err.println("WARNING: "+warning);\r
- }\r
- }\r
-\r
- private void printNotice(String notice) {\r
- if (null != rootDoc) {\r
- rootDoc.printNotice(notice);\r
- }\r
- else {\r
- System.err.println(notice);\r
- }\r
- }\r
-\r
- /**\r
- * Copy the contents of the input directory to the output\r
- * directory. The output directory must exist.\r
- */\r
- private void copyPackageDataDir(GjdocPackageDoc packageDoc) throws IOException {\r
- File docFilesSourceDirectory\r
- = new File(packageDoc.packageDirectory(), "doc-files");\r
- File docFilesTargetDirectory\r
- = new File(this.targetDirectory, \r
- packageDoc.name().replace('.', File.separatorChar));\r
- if (docFilesSourceDirectory.exists()) {\r
- printNotice("Copying files from " + docFilesSourceDirectory);\r
- copyDirectory(docFilesSourceDirectory, docFilesTargetDirectory,\r
- docFilesSubdirsEnabled,\r
- excludeDocFilesSubDirs);\r
- }\r
- }\r
-\r
- /**\r
- * Recursively copy the contents of the input directory to the\r
- * output directory. The output directory must exist.\r
- */\r
- private static void copyDirectory(File sourceDir, File targetDir, \r
- boolean recursive,\r
- Set excludeDirs) throws IOException {\r
- if (!targetDir.exists() && !targetDir.mkdirs()) {\r
- throw new IOException("Cannot create directory " + targetDir);\r
- }\r
-\r
- File[] sourceFiles = sourceDir.listFiles();\r
- for (int i=0; i<sourceFiles.length; ++i) {\r
- if (sourceFiles[i].isDirectory()) {\r
- if (recursive && (null == excludeDirs \r
- || !excludeDirs.contains(sourceFiles[i].getName()))) {\r
- File targetSubDir = new File(targetDir, \r
- sourceFiles[i].getName());\r
- if (targetSubDir.exists() || targetSubDir.mkdir()) {\r
- copyDirectory(sourceFiles[i], targetSubDir, recursive, null);\r
- }\r
- else {\r
- throw new IOException("Cannot create directory " + targetSubDir);\r
- }\r
- }\r
- }\r
- else {\r
- copyFile(sourceFiles[i], new File(targetDir, sourceFiles[i].getName()));\r
- }\r
- }\r
- }\r
-\r
- /**\r
- * Copy the contents of the input file to the output file. The\r
- * output file's parent directory must exist.\r
- */\r
- private static void copyFile(File sourceFile, File targetFile) throws IOException {\r
-\r
- InputStream in = new FileInputStream(sourceFile);\r
- OutputStream out = new FileOutputStream(targetFile);\r
- int nread;\r
- byte[] buf = new byte[512];\r
- while ((nread = in.read(buf)) >= 0) {\r
- out.write(buf, 0, nread);\r
- }\r
- in.close();\r
- out.close();\r
- }\r
-\r
- private void createIndexByName() throws IOException {\r
- // Create index\r
-\r
- // Collect index\r
- \r
- Map indexMap = new TreeMap(new Comparator() {\r
- public int compare(Object o1, Object o2) {\r
- return o1.toString().toLowerCase().compareTo(o2.toString().toLowerCase());\r
- }\r
- });\r
-\r
- // Add packages to index\r
-\r
- PackageDoc[] packages = rootDoc.specifiedPackages();\r
- for (int i=0, ilim=packages.length; i<ilim; ++i) {\r
- PackageDoc c = packages[i];\r
- indexMap.put(c.name(), c);\r
- }\r
-\r
- // Add classes, fields and methods to index\r
-\r
- ClassDoc[] sumclasses = rootDoc.classes();\r
- for (int i=0, ilim=sumclasses.length; i<ilim; ++i) {\r
- ClassDoc c = sumclasses[i];\r
- if (null == c.containingClass()) {\r
- indexMap.put(c.name(), c);\r
- }\r
- else {\r
- indexMap.put(c.name().substring(c.containingClass().name().length() + 1), c);\r
- }\r
- FieldDoc[] fields = c.fields();\r
- for (int j=0, jlim=fields.length; j<jlim; ++j) {\r
- indexMap.put(fields[j].name(), fields[j]);\r
- }\r
- MethodDoc[] methods = c.methods();\r
- for (int j=0, jlim=methods.length; j<jlim; ++j) {\r
- MethodDoc method = methods[j];\r
- StringBuffer signature = new StringBuffer();\r
- signature.append(method.name());\r
- signature.append('(');\r
- Parameter[] parameters = method.parameters();\r
- for (int k=0, klim=parameters.length; k<klim; ++k) {\r
- if (k > 0) {\r
- signature.append(", ");\r
- }\r
- signature.append(parameters[k].typeName());\r
- }\r
- signature.append(')');\r
- indexMap.put(signature.toString(), method);\r
- }\r
- }\r
-\r
- // Assign output stream\r
-\r
- setTargetFile("alphaindex.xml");\r
-\r
- // Output XML document header\r
-\r
- println(0, "<?xml version=\"1.0\"?>");\r
- println("<!DOCTYPE gjdoc SYSTEM \"dtd/gjdoc-alphaindex.dtd\">");\r
- println();\r
- printOpenTag(0, "alphaindex xmlns=\"http://www.w3.org/TR/REC-html40\" xmlns:gjdoc=\"http://www.gnu.org/software/cp-tools/gjdocxml\"");\r
- \r
- Iterator it = indexMap.keySet().iterator();\r
-\r
- char previousCategoryLetter = '\0';\r
- boolean categoryOpen = false;\r
-\r
- while (it.hasNext()) {\r
- String key = (String)it.next();\r
- Doc entry = (Doc)indexMap.get(key);\r
-\r
- char firstChar = Character.toUpperCase(key.charAt(0));\r
- if (firstChar != previousCategoryLetter) {\r
- if (categoryOpen) {\r
- printCloseTag(1, "category");\r
- }\r
- printOpenTag(1, "category letter=\"" + firstChar + "\"");\r
- categoryOpen = true;\r
- previousCategoryLetter = firstChar;\r
- }\r
-\r
- printOpenTag(2, "entry name=\"" + key + "\"");\r
- if (entry instanceof PackageDoc) {\r
- printAtomTag(3, "isPackage");\r
- }\r
- else if (entry instanceof ClassDoc) {\r
- printAtomTag(3, "isClass");\r
- ClassDoc centry = (ClassDoc)entry;\r
- currentClass = centry;\r
- printAtomTag(3, "containingPackage name=\"" + centry.containingPackage().name() + "\"");\r
- if (null != centry.containingClass()) {\r
- printAtomTag(3, "containingClass name=\"" + centry.containingClass().name() + "\"");\r
- }\r
- if (centry.isInterface()) {\r
- printAtomTag(3, "isInterface");\r
- }\r
- if (centry.isException()) {\r
- printAtomTag(3, "isException");\r
- }\r
- if (centry.isError()) {\r
- printAtomTag(3, "isError");\r
- }\r
- if (centry.isOrdinaryClass()) {\r
- printAtomTag(3, "isOrdinaryClass");\r
- }\r
- }\r
- else if (entry instanceof ProgramElementDoc) {\r
- ProgramElementDoc pentry = (ProgramElementDoc)entry;\r
- currentClass = pentry.containingClass();\r
- printAtomTag(3, "containingPackage name=\"" + pentry.containingPackage().name() + "\"");\r
- printAtomTag(3, "containingClass name=\"" + pentry.containingClass().name() + "\"");\r
- if (pentry.isMethod()) {\r
- printAtomTag(3, "isMethod");\r
- ExecutableMemberDoc mentry = (ExecutableMemberDoc)pentry;\r
- printAtomTag(3, "signature full=\""+mentry.signature()+"\" flat=\""+mentry.flatSignature()+"\"");\r
- printAtomTag(3, "method name=\"" + mentry.name() + "\"");\r
- }\r
- if (pentry.isField()) {\r
- printAtomTag(3, "isField");\r
- }\r
- }\r
-\r
- Tag[] tags = entry.firstSentenceTags();\r
- for (int i=0, ilim=tags.length; i<ilim; ++i) {\r
- Tag tag = tags[i];\r
- if (tag.firstSentenceTags().length>0) {\r
- printOpenTag(3, "firstSentenceTags", false);\r
- outputTags(4, tag.firstSentenceTags(), false, CONTEXT_TYPE);\r
- printCloseTag(3, "firstSentenceTags");\r
- }\r
- }\r
-\r
-\r
- printCloseTag(2, "entry");\r
- }\r
-\r
- if (categoryOpen) {\r
- printCloseTag(1, "category");\r
- }\r
-\r
- printCloseTag(0, "alphaindex");\r
-\r
- closeTargetFile();\r
- }\r
-\r
- private static class UsageType\r
- {\r
- public static final UsageType CLASS_DERIVED_FROM = new UsageType("class-derived-from");\r
- public static final UsageType FIELD_OF_TYPE = new UsageType("field-of-type");\r
- public static final UsageType METHOD_WITH_RETURN_TYPE = new UsageType("method-with-return-type");\r
- public static final UsageType METHOD_WITH_PARAMETER_TYPE = new UsageType("method-with-parameter-type");\r
- public static final UsageType METHOD_WITH_THROWN_TYPE = new UsageType("method-with-thrown-type");\r
- public static final UsageType CONSTRUCTOR_WITH_PARAMETER_TYPE = new UsageType("constructor-with-parameter-type");\r
- public static final UsageType CONSTRUCTOR_WITH_THROWN_TYPE = new UsageType("constructor-with-thrown-type");\r
- private String id;\r
-\r
- private UsageType(String id)\r
- {\r
- this.id = id;\r
- }\r
-\r
- public String toString() { \r
- return "UsageType{id=" + id + "}"; \r
- }\r
-\r
- public String getId() {\r
- return id;\r
- }\r
- }\r
-\r
- /**\r
- * ClassDoc -> (PackageDoc -> (UsageType -> (Set of Doc)))\r
- */\r
- private Map usedClassToPackagesMap = new HashMap();\r
-\r
- private void addUsedBy(ClassDoc usedClass, UsageType usageType, Doc user, PackageDoc userPackage)\r
- {\r
- Map packageToUsageTypeMap = (Map)usedClassToPackagesMap.get(usedClass);\r
- if (null == packageToUsageTypeMap) {\r
- packageToUsageTypeMap = new HashMap();\r
- usedClassToPackagesMap.put(usedClass, packageToUsageTypeMap);\r
- }\r
-\r
- Map usageTypeToUsersMap = (Map)packageToUsageTypeMap.get(userPackage);\r
- if (null == usageTypeToUsersMap) {\r
- usageTypeToUsersMap = new HashMap();\r
- packageToUsageTypeMap.put(userPackage, usageTypeToUsersMap);\r
- }\r
-\r
- Set userSet = (Set)usageTypeToUsersMap.get(usageType);\r
- if (null == userSet) {\r
- userSet = new TreeSet(); // FIXME: we need the collator from Main here\r
- usageTypeToUsersMap.put(usageType, userSet);\r
- }\r
- userSet.add(user);\r
- }\r
-\r
- /**\r
- * Create the cross reference database.\r
- */\r
- private void collectUsage() {\r
-\r
- ClassDoc[] classes = rootDoc.classes();\r
- for (int i = 0, ilim = classes.length; i < ilim; ++ i) {\r
- ClassDoc clazz = classes[i];\r
-\r
- // classes derived from\r
- for (ClassDoc superclass = clazz.superclass(); superclass != null; \r
- superclass = superclass.superclass()) {\r
- addUsedBy(superclass, UsageType.CLASS_DERIVED_FROM, clazz, clazz.containingPackage());\r
- }\r
-\r
- FieldDoc[] fields = clazz.fields();\r
- for (int j = 0, jlim = fields.length; j < jlim; ++ j) {\r
- FieldDoc field = fields[j];\r
-\r
- // fields of type \r
- ClassDoc fieldType = field.type().asClassDoc();\r
- if (null != fieldType) {\r
- addUsedBy(fieldType, UsageType.FIELD_OF_TYPE, \r
- field, clazz.containingPackage());\r
- }\r
- }\r
-\r
- MethodDoc[] methods = clazz.methods();\r
- for (int j = 0, jlim = methods.length; j < jlim; ++ j) {\r
- MethodDoc method = methods[j];\r
-\r
- // methods with return type\r
-\r
- ClassDoc returnType = method.returnType().asClassDoc();\r
- if (null != returnType) {\r
- addUsedBy(returnType, UsageType.METHOD_WITH_RETURN_TYPE, \r
- method, clazz.containingPackage());\r
- }\r
- Parameter[] parameters = method.parameters();\r
- for (int k=0; k<parameters.length; ++k) {\r
-\r
- // methods with parameter type\r
-\r
- Parameter parameter = parameters[k];\r
- ClassDoc parameterType = parameter.type().asClassDoc();\r
- if (null != parameterType) {\r
- addUsedBy(parameterType, UsageType.METHOD_WITH_PARAMETER_TYPE, \r
- method, clazz.containingPackage());\r
- }\r
- }\r
-\r
- // methods which throw\r
-\r
- ClassDoc[] thrownExceptions = method.thrownExceptions();\r
- for (int k = 0, klim = thrownExceptions.length; k < klim; ++ k) {\r
- ClassDoc thrownException = thrownExceptions[k];\r
- addUsedBy(thrownException, UsageType.METHOD_WITH_THROWN_TYPE, \r
- method, clazz.containingPackage());\r
- }\r
- }\r
- \r
- ConstructorDoc[] constructors = clazz.constructors();\r
- for (int j = 0, jlim = constructors.length; j < jlim; ++ j) {\r
-\r
- ConstructorDoc constructor = constructors[j];\r
-\r
- Parameter[] parameters = constructor.parameters();\r
- for (int k = 0, klim = parameters.length; k < klim; ++ k) {\r
-\r
- // constructors with parameter type\r
- \r
- Parameter parameter = parameters[k];\r
- ClassDoc parameterType = parameter.type().asClassDoc();\r
- if (null != parameterType) {\r
- addUsedBy(parameterType, UsageType.CONSTRUCTOR_WITH_PARAMETER_TYPE, \r
- constructor, clazz.containingPackage());\r
- }\r
- }\r
-\r
- // constructors which throw\r
-\r
- ClassDoc[] thrownExceptions = constructor.thrownExceptions();\r
- for (int k = 0, klim = thrownExceptions.length; k < klim; ++ k) {\r
- ClassDoc thrownException = thrownExceptions[k];\r
- addUsedBy(thrownException, UsageType.CONSTRUCTOR_WITH_THROWN_TYPE, \r
- constructor, clazz.containingPackage());\r
- }\r
- }\r
- }\r
- }\r
-\r
- private void outputUsage(ClassDoc clazz, int level) {\r
-\r
- Map packageToUsageTypeMap = (Map)usedClassToPackagesMap.get(clazz);\r
- if (null != packageToUsageTypeMap) {\r
- printOpenTag(level, "references");\r
-\r
- Iterator packagesIterator = packageToUsageTypeMap.keySet().iterator();\r
-\r
- while (packagesIterator.hasNext()) {\r
- PackageDoc packageDoc = (PackageDoc)packagesIterator.next();\r
- printOpenTag(level + 1, "referencing-package name=\"" + packageDoc.name() + "\"");\r
- Map usageTypeToUsersMap = (Map)packageToUsageTypeMap.get(packageDoc);\r
- Iterator usageTypeIterator = usageTypeToUsersMap.keySet().iterator();\r
- while (usageTypeIterator.hasNext()) {\r
- UsageType usageType = (UsageType)usageTypeIterator.next();\r
- printOpenTag(level + 2, "usage-type id=\"" + usageType.getId() + "\"");\r
- Set users = (Set)usageTypeToUsersMap.get(usageType);\r
- Iterator userIterator = users.iterator();\r
- while (userIterator.hasNext()) {\r
- Doc user = (Doc)userIterator.next();\r
- if (user instanceof ClassDoc) {\r
- printAtomTag(level + 3, "user"\r
- + " class=\"" + ((ClassDoc)user).name() + "\"");\r
- }\r
- else if (user instanceof FieldDoc) {\r
- FieldDoc fieldDoc = (FieldDoc)user;\r
- printAtomTag(level + 3, "user"\r
- + " class=\"" + fieldDoc.containingClass().name() + "\""\r
- + " field=\"" + fieldDoc.name() + "\"");\r
- }\r
- else if (user instanceof MethodDoc) {\r
- MethodDoc methodDoc = (MethodDoc)user;\r
- printAtomTag(level + 3, "user"\r
- + " class=\"" + methodDoc.containingClass().name() + "\""\r
- + " method=\"" + methodDoc.name() + "\""\r
- + " signature=\"" + methodDoc.signature() + "\""\r
- + " flatSignature=\"" + methodDoc.flatSignature() + "\"");\r
- }\r
- else if (user instanceof ConstructorDoc) {\r
- ConstructorDoc constructorDoc = (ConstructorDoc)user;\r
- printAtomTag(level + 3, "user"\r
- + " class=\"" + constructorDoc.containingClass().name() + "\""\r
- + " signature=\"" + constructorDoc.signature() + "\""\r
- + " flatSignature=\"" + constructorDoc.flatSignature() + "\"");\r
- }\r
- }\r
- printCloseTag(level +2, "usage-type");\r
- }\r
- printCloseTag(level + 1, "referencing-package");\r
- }\r
-\r
- printCloseTag(level, "references");\r
- }\r
- }\r
-\r
- private boolean processGroupOption(String groupName, String colonSeparatedPackageList)\r
- {\r
- try {\r
- PackageMatcher packageMatcher = new PackageMatcher();\r
-\r
- StringTokenizer tokenizer = new StringTokenizer(colonSeparatedPackageList, ":");\r
- while (tokenizer.hasMoreTokens()) {\r
- String packageWildcard = tokenizer.nextToken();\r
- packageMatcher.addWildcard(packageWildcard);\r
- }\r
-\r
- SortedSet groupPackages = packageMatcher.filter(rootDoc.specifiedPackages());\r
-\r
- packageGroups.add(new PackageGroup(groupName, groupPackages));\r
-\r
- return true;\r
- }\r
- catch (InvalidPackageWildcardException e) {\r
- return false;\r
- }\r
- }\r
-\r
- private void registerTaglet(Taglet taglet)\r
- {\r
- tagletMap.put(taglet.getName(), taglet);\r
- }\r
-\r
- private boolean isVerbose()\r
- {\r
- return false;\r
- }\r
-}\r
+/* gnu.classpath.tools.doclets.xmldoclet.Driver
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.doclets.xmldoclet;
+
+import com.sun.javadoc.*;
+import java.io.*;
+
+import com.sun.tools.doclets.Taglet;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+import java.text.DateFormat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.TreeSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Properties;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+import gnu.classpath.tools.gjdoc.TemporaryStore;
+import gnu.classpath.tools.gjdoc.GjdocPackageDoc;
+
+import gnu.classpath.tools.doclets.PackageGroup;
+import gnu.classpath.tools.doclets.PackageMatcher;
+import gnu.classpath.tools.doclets.InvalidPackageWildcardException;
+
+import gnu.classpath.tools.doclets.xmldoclet.doctranslet.DocTranslet;
+import gnu.classpath.tools.doclets.xmldoclet.doctranslet.DocTransletOptions;
+
+import gnu.classpath.tools.taglets.AuthorTaglet;
+import gnu.classpath.tools.taglets.VersionTaglet;
+import gnu.classpath.tools.taglets.SinceTaglet;
+import gnu.classpath.tools.taglets.DeprecatedTaglet;
+import gnu.classpath.tools.taglets.GenericTaglet;
+import gnu.classpath.tools.doclets.StandardTaglet;
+
+import gnu.classpath.tools.java2xhtml.Java2xhtml;
+
+import gnu.classpath.tools.IOToolkit;
+import gnu.classpath.tools.FileSystemClassLoader;
+
+/**
+ * A Doclet which retrieves all information presented by the Doclet
+ * API, dumping it to stdout in XML format.
+ *
+ * @author Julian Scheid
+ */
+public class Driver {
+
+ public static final String XMLDOCLET_VERSION = "0.6.1";
+
+ /**
+ * Used for redirecting error messages to <code>/dev/null</code>.
+ */
+ private static class NullErrorReporter implements DocErrorReporter {
+ public void printError(String ignore) {}
+ public void printWarning(String ignore) {}
+ public void printNotice(String ignore) {}
+ }
+
+ /*
+ * Taglet context constants.
+ */
+ private static final int CONTEXT_CONSTRUCTOR = 1;
+ private static final int CONTEXT_FIELD = 2;
+ private static final int CONTEXT_METHOD = 3;
+ private static final int CONTEXT_OVERVIEW = 4;
+ private static final int CONTEXT_PACKAGE = 5;
+ private static final int CONTEXT_TYPE = 6;
+
+ /**
+ * All XML output will go to this stream.
+ */
+ private PrintWriter out;
+
+ /**
+ * How many spaces to indent each XML node level,
+ * i.e. Tab size for output.
+ */
+ private static int indentStep = 1;
+
+ /**
+ * Won't output superfluous spaces if set to true.
+ * If set to false, output will be more legible.
+ */
+ private boolean compress = false;
+
+ /**
+ * Won't output warning messages while fixing
+ * HTML code if set to true.
+ */
+ private boolean noHTMLWarn = false;
+
+ /**
+ * Won't output warning messages when encountering tags
+ * that look like an email address if set to true.
+ */
+ private boolean noEmailWarn = false;
+
+ /**
+ * Will fix HTML if necessary so that each comment
+ * contains valid XML code if set to true. If set
+ * to false, HTML code will not be modified and
+ * instead encapsulated in a CDATA section.
+ */
+ private boolean fixHTML = true;
+
+ /**
+ * User-specified name of the directory where the final version of
+ * the generated files will be written to.
+ *
+ * If no XSLT sheet is given, the XML output will go directly into
+ * this directory. Otherwise, XML output will go to a temporary
+ * directory and XSLT output will go to this directory.
+ */
+ private File targetDirectory = null;
+
+ /**
+ * Directory where XML output will be written to. If no XSLT
+ * sheet was given, this is the target directory specified
+ * by the user. Otherwise, this is a temporary directory.
+ */
+ private File xmlTargetDirectory;
+
+ /**
+ * Contains a number of TargetContexts which describe which XSLT
+ * sheet to apply to the output of this doclet, to what directory
+ * the XSLT output is written, and which postprocess driver to use
+ * to process XSLT output.
+ */
+ private List targets = new ArrayList();
+
+ /**
+ * XML text to include at the end of every generated page. Read
+ * from the file specified on the command line using -bottomnote.
+ * If present, this will be written to the main output file
+ * (index.xml) in node /gjdoc:rootDoc/gjdoc:bottomnote.
+ */
+ private String bottomNote;
+
+ /**
+ * Brief description of the package set. Can be specified on the
+ * command line using -title. This will be written to the main
+ * output file (index.xml) in node
+ * /gjdoc:rootDoc/gjdoc:title. The HTML generating XSLT sheet
+ * uses this for example in window titles.
+ */
+ private String title;
+
+ /**
+ * Path to the directory where temporary files should be stored.
+ * Defaults to system tempdir, but can be overridden by user
+ * with -workpath.
+ */
+ private String workingPath = System.getProperty("java.io.tmpdir");
+
+ /**
+ * Temporary directory created by this doclet where all
+ * temporary files will be stored in. If no temporary
+ * files are needed (i.e. no XSLT postprocessing stage
+ * specified by user), this is <code>null</code>.
+ */
+ private File workingDirectory;
+
+ /**
+ * Whether to deep-copy the doc-files subdirectory.
+ */
+ private boolean docFilesSubdirsEnabled = false;
+
+ /**
+ * Which direct subdirectories of the doc-files directories to exclude.
+ * Set of String.
+ */
+ private Set excludeDocFilesSubDirs = new HashSet();
+
+ /**
+ * Stores the Doclet API RootDoc we are operating on.
+ */
+ private RootDoc rootDoc;
+
+ /**
+ * XML namespace prefix used for all tags, except for HTML
+ * tags copied from Javadoc comments. Excluding colon.
+ */
+ public static final String tagPrefix = "gjdoc";
+
+ /**
+ * Classpath for loading Taglet classes.
+ */
+ private String tagletPath = null;
+
+ /**
+ * The current class that is being processed.
+ * Set in outputClassDoc().
+ */
+ private ClassDoc currentClass;
+
+ /**
+ * The current member that is being processed.
+ * Set in outputMemberDoc().
+ */
+ private MemberDoc currentMember;
+
+ /**
+ * The current constructor/method that is being processed.
+ * Set in outputExecutableMemberDoc().
+ */
+ private ExecutableMemberDoc currentExecMember;
+
+ /**
+ * Mapping from tag type to Taglet for user Taglets specified on
+ * the command line.
+ */
+ private Map tagletMap = new LinkedHashMap();
+
+ /**
+ * Keeps track of the tags mentioned by the user during option
+ * processiong so that an error can be emitted if a tag is
+ * mentioned more than once.
+ */
+ private List mentionedTags = new LinkedList();
+
+ /**
+ * Stores options to be passed to the DocTranslet.
+ */
+ private DocTransletOptions docTransletOptions = new DocTransletOptions();
+
+ /**
+ * Stores the package groups specified in the user
+ * options. Contains objects of type PackageGroup.
+ */
+ private List packageGroups = new LinkedList();
+
+ private HtmlRepairer htmlRepairer;
+
+ public static boolean start(TemporaryStore _rootDocWrapper) {
+ return new Driver().instanceStart((RootDoc)_rootDocWrapper.getAndClear());
+ }
+
+ /**
+ * Official Doclet entry point.
+ */
+ public static boolean start(RootDoc _rootDoc) {
+
+ // Create a new XmlDoclet instance and delegate control.
+ TemporaryStore tstore = new TemporaryStore(_rootDoc);
+ _rootDoc = null;
+ return new Driver().instanceStart((RootDoc)tstore.getAndClear());
+ }
+
+ /**
+ * Output an XML tag describing a com.sun.javadoc.Type object.
+ * Assumes that the tag does not have subtags.
+ *
+ * @param level Level of indentation. Will be multiplied by
+ * <code>indentStep</code> to yield actual amount
+ * of whitespace inserted at start of line.
+ * @param tag Identifier for the XML tag being output.
+ * @param type The Javadoc Type to be output.
+ */
+ protected void outputType(int level, String tag, Type type) {
+ outputType(level, tag, type, true);
+ }
+
+ protected void outputType(int level, String tag, Type type, boolean atomic) {
+
+ boolean isIncluded = false;
+ ClassDoc typeAsClassDoc = type.asClassDoc();
+ String packageName = null;
+ if (null != typeAsClassDoc) {
+ isIncluded = typeAsClassDoc.isIncluded();
+ packageName = typeAsClassDoc.containingPackage().name();
+ }
+ println(level, "<"+tagPrefix+":"+tag + " typename=\""+type.typeName()+"\""+
+ " qualifiedtypename=\""+type.qualifiedTypeName()+"\""
+ +(type.dimension().length()==0?"":" dimension=\""+type.dimension()+"\"")
+ +(isIncluded?" isIncluded=\"true\"" : "")
+ +((null != packageName)?" package=\"" + packageName + "\"" : "")
+ +(atomic?"/":"")+">");
+ }
+
+ protected void outputExecutableMemberDocBody(int level, ExecutableMemberDoc memberDoc) {
+
+ currentExecMember = memberDoc;
+
+ outputMemberDocBody(level, memberDoc);
+
+ Parameter[] parameters = memberDoc.parameters();
+ for (int i=0, ilim=parameters.length; i<ilim; ++i) {
+ Parameter parameter = parameters[i];
+ outputType(level, "parameter name=\""+parameter.name()+"\"", parameter.type());
+ }
+
+ ClassDoc[] exceptions = memberDoc.thrownExceptions();
+ for (int i=0, ilim=exceptions.length; i<ilim; ++i) {
+ ClassDoc exception = exceptions[i];
+ outputType(level, "thrownException", exception);
+ }
+
+ printAtomTag(level, "signature full=\""+memberDoc.signature()+"\" flat=\""+memberDoc.flatSignature()+"\"");
+
+ if (memberDoc.isNative()) {
+ printAtomTag(level, "isNative");
+ }
+
+ if (memberDoc.isSynchronized()) {
+ printAtomTag(level, "isSynchronized");
+ }
+ }
+
+ protected void outputMethodDoc(int level, MethodDoc methodDoc) {
+ println();
+ printOpenTag(level, "methoddoc name=\""+methodDoc.name()+"\"");
+ outputExecutableMemberDocBody(level+1, methodDoc);
+ outputType(level+1, "returns", methodDoc.returnType());
+ printCloseTag(level, "methoddoc");
+ }
+
+ protected void outputMemberDocBody(int level, MemberDoc memberDoc) {
+ currentMember = memberDoc;
+ outputProgramElementDocBody(level, memberDoc);
+ }
+
+ protected void outputFieldDocBody(int level, FieldDoc fieldDoc) {
+ outputType(level, "type", fieldDoc.type());
+ if (fieldDoc.isTransient()) {
+ printAtomTag(level, "isTransient");
+ }
+ if (fieldDoc.isVolatile()) {
+ printAtomTag(level, "isVolatile");
+ }
+ }
+
+ private void outputFieldDoc(int level, FieldDoc fieldDoc) {
+ println();
+ printOpenTag(level, "fielddoc name=\""+fieldDoc.name()+"\"");
+ outputMemberDocBody(level+1, fieldDoc);
+ outputFieldDocBody(level+1, fieldDoc);
+ printCloseTag(level, "fielddoc");
+ }
+
+ protected void outputConstructorDoc(int level, ConstructorDoc constructorDoc) {
+ println();
+ printOpenTag(level, "constructordoc name=\""+constructorDoc.name()+"\"");
+ outputExecutableMemberDocBody(level+1, constructorDoc);
+ printCloseTag(level, "constructordoc");
+ }
+
+ protected void outputSuperInterfacesRec(int level, ClassDoc classDoc) {
+ if (null!=classDoc) {
+ ClassDoc[] interfaces = classDoc.interfaces();
+ if (null != interfaces) {
+ for (int i=0, ilim=interfaces.length; i<ilim; ++i) {
+ outputType(level, "superimplements", interfaces[i]);
+ }
+ }
+ outputSuperInterfacesRec(level, classDoc.superclass());
+ }
+ }
+
+ protected void outputClassDocSummary(ClassDoc classDoc) {
+ println();
+ printOpenTag(1, "classdoc name=\""+classDoc.name()+"\" qualifiedtypename=\""+classDoc.qualifiedName()+"\" isIncluded=\"true\"");
+ if (null!=classDoc.superclass()) {
+ outputType(2, "superclass", classDoc.superclass());
+ }
+
+ ClassDoc[] interfaces = classDoc.interfaces();
+ for (int i=0, ilim=interfaces.length; i<ilim; ++i) {
+ outputType(2, "implements", interfaces[i]);
+ }
+ outputSuperInterfacesRec(2, classDoc.superclass());
+
+ printAtomTag(2, "containingPackage name=\""+classDoc.containingPackage().name()+"\"");
+ if (classDoc.isError()) {
+ printAtomTag(2, "isError");
+ }
+ if (classDoc.isException()) {
+ printAtomTag(2, "isException");
+ }
+ if (classDoc.isInterface()) {
+ printAtomTag(2, "isInterface");
+ }
+ if (classDoc.isOrdinaryClass()) {
+ printAtomTag(2, "isOrdinaryClass");
+ }
+
+ printCloseTag(1, "classdoc");
+ }
+
+ protected void outputPackageDoc(PackageDoc packageDoc) {
+ println();
+ printOpenTag(1, "packagedoc name=\""+packageDoc.name()+"\"");
+ if (packageDoc.firstSentenceTags().length > 0) {
+ printOpenTag(2, "firstSentenceTags", false);
+ outputTags(3, packageDoc.firstSentenceTags(), true, CONTEXT_PACKAGE);
+ printCloseTag(0, "firstSentenceTags");
+ printOpenTag(2, "inlineTags", false);
+ outputTags(3, packageDoc.inlineTags(), true, CONTEXT_PACKAGE);
+ printCloseTag(0, "inlineTags");
+ }
+
+ if (packageDoc.tags().length > 0) {
+ printOpenTag(2, "tags");
+ outputTags(3, packageDoc.tags(), true, CONTEXT_PACKAGE);
+ printCloseTag(2, "tags");
+ }
+
+ if (packageDoc.seeTags().length > 0) {
+ printOpenTag(2, "seeTags");
+ outputTags(3, packageDoc.seeTags(), true, CONTEXT_PACKAGE);
+ printCloseTag(2, "seeTags");
+ }
+
+ ClassDoc[] allClasses = (ClassDoc[]) packageDoc.allClasses().clone();
+ Arrays.sort(allClasses);
+
+ if (false) {
+ for (int i = 0, ilim = allClasses.length; i < ilim; ++ i) {
+ printAtomTag(2, "containsClass qualifiedtypename=\""+allClasses[i].qualifiedTypeName()+"\"");
+ }
+ }
+
+ printCloseTag(1, "packagedoc");
+ }
+
+ protected void outputClassDoc(ClassDoc classDoc) throws IOException {
+
+ currentClass = classDoc;
+
+ println();
+ printOpenTag(1, "classdoc xmlns=\"http://www.w3.org/TR/REC-html40\" xmlns:"+tagPrefix+"=\"http://www.gnu.org/software/cp-tools/gjdocxml\" name=\""+classDoc.name()+"\" qualifiedtypename=\""+classDoc.qualifiedName()+"\"");
+
+ ClassDoc[] interfaces = classDoc.interfaces();
+ for (int i=0, ilim=interfaces.length; i<ilim; ++i) {
+ outputType(2, "implements", interfaces[i]);
+ }
+ outputSuperInterfacesRec(2, classDoc.superclass());
+
+ outputProgramElementDocBody(2, classDoc);
+ if (classDoc.isAbstract())
+ printAtomTag(2, "isAbstract");
+ if (classDoc.isSerializable())
+ printAtomTag(2, "isSerializable");
+ if (classDoc.isExternalizable())
+ printAtomTag(2, "isExternalizable");
+ if (classDoc.definesSerializableFields()) {
+ printAtomTag(2, "definesSerializableFields");
+ }
+
+ ConstructorDoc[] constructors = classDoc.constructors();
+ for (int i=0, ilim=constructors.length; i<ilim; ++i) {
+ outputConstructorDoc(2, constructors[i]);
+ }
+
+ MethodDoc[] methods = classDoc.methods();
+ for (int i=0, ilim=methods.length; i<ilim; ++i) {
+ outputMethodDoc(2, methods[i]);
+ }
+
+ FieldDoc[] fields = classDoc.fields();
+ for (int i=0, ilim=fields.length; i<ilim; ++i) {
+ outputFieldDoc(2, fields[i]);
+ }
+
+ if (classDoc.serializableFields().length > 0) {
+ printOpenTag(2, "serializableFields");
+
+ FieldDoc[] sfields = classDoc.serializableFields();
+ for (int i=0, ilim=sfields.length; i<ilim; ++i) {
+ outputFieldDoc(2, sfields[i]);
+ }
+ printCloseTag(2, "serializableFields");
+ }
+
+ Java2xhtml java2xhtml = new Java2xhtml();
+ Properties properties = new Properties();
+ properties.setProperty("isCodeSnippet", "true");
+ properties.setProperty("hasLineNumbers", "true");
+ java2xhtml.setProperties(properties);
+
+ if (null == classDoc.containingClass() && docTransletOptions.linksource) {
+ printOpenTag(2, "source");
+ StringWriter sourceBuffer = new StringWriter();
+ File sourceFile = new File(((GjdocPackageDoc)classDoc.containingPackage()).packageDirectory(),
+ classDoc.name() + ".java");
+ FileReader sourceReader = new FileReader(sourceFile);
+ IOToolkit.copyStream(sourceReader, sourceBuffer);
+ print(java2xhtml.makeHTML(sourceBuffer.getBuffer(), sourceFile.getName()));
+ printCloseTag(2, "source");
+ }
+
+ ClassDoc superclassDoc = classDoc.superclass();
+ while (superclassDoc != null) {
+ outputType(2, "superclass", superclassDoc, false);
+
+ // FIXME: remove the following after adjusting the XSLT sheets:
+ printAtomTag(3, "containingPackage name=\"" + superclassDoc.containingPackage().name() + "\"");
+
+ MethodDoc[] superMethods = superclassDoc.methods();
+ if (null != superMethods) {
+ for (int i=0, ilim=superMethods.length; i<ilim; ++i) {
+ printAtomTag(3, "methoddoc name=\"" + superMethods[i].name() + "\" signature=\"" + superMethods[i].signature() + "\"");
+ }
+ }
+
+ FieldDoc[] superFields = superclassDoc.fields();
+ if (null != superFields) {
+ for (int i=0, ilim=superFields.length; i<ilim; ++i) {
+ printAtomTag(3, "fielddoc name=\"" + superFields[i].name() + "\"");
+ }
+ }
+ printCloseTag(2, "superclass");
+
+ superclassDoc = superclassDoc.superclass();
+ }
+
+ outputUsage(classDoc, 2);
+
+ printCloseTag(1, "classdoc");
+
+ currentClass = null;
+ currentMember = null;
+ currentExecMember = null;
+ }
+
+ protected int outputHeritageOpen(int level, ClassDoc classDoc) {
+
+ ClassDoc superClassDoc = classDoc.superclass();
+ if (null != superClassDoc) {
+ level = outputHeritageOpen(level, superClassDoc);
+ ++ level;
+ }
+ outputType(level, "heritage", classDoc, false);
+ return level;
+ }
+
+ protected void outputHeritageClose(int level, ClassDoc classDoc) {
+
+ ClassDoc superClassDoc = classDoc.superclass();
+ if (null != superClassDoc) {
+ outputHeritageClose(level + 1, superClassDoc);
+ }
+ printCloseTag(level, "heritage");
+ }
+
+ protected void outputDocBody(int level, Doc doc) {
+
+ int context = CONTEXT_TYPE;
+
+ if (doc.isClass()) {
+ printAtomTag(level, "isClass");
+
+ ClassDoc classDoc = (ClassDoc)doc;
+ ClassDoc[] classes = rootDoc.classes();
+ for (int i=0, ilim=classes.length; i<ilim; ++i) {
+ if (classes[i].superclass() == classDoc) {
+ outputType(level, "extended-by", classes[i]);
+ }
+ }
+
+ outputHeritageOpen(level, classDoc);
+ outputHeritageClose(level, classDoc);
+ }
+ if (doc.isConstructor()) {
+ printAtomTag(level, "isConstructor");
+ context = CONTEXT_CONSTRUCTOR;
+ }
+ if (doc.isError()) {
+ printAtomTag(level, "isError");
+ }
+ if (doc.isException()) {
+ printAtomTag(level, "isException");
+ }
+ if (doc.isField()) {
+ printAtomTag(level, "isField");
+ context = CONTEXT_FIELD;
+ }
+ if (doc.isIncluded()) {
+ printAtomTag(level, "isIncluded");
+ }
+ if (doc.isInterface()) {
+ printAtomTag(level, "isInterface");
+
+ ClassDoc classDoc = (ClassDoc)doc;
+ ClassDoc[] classes = rootDoc.classes();
+ for (int i=0, ilim=classes.length; i<ilim; ++i) {
+ ClassDoc[] implementedInterfaces = classes[i].interfaces();
+ for (int j=0; j<implementedInterfaces.length; ++j) {
+ if (implementedInterfaces[j] == classDoc) {
+ if (classDoc.isInterface()) {
+ outputType(level, "subinterface", classes[i]);
+ }
+ else {
+ outputType(level, "implemented-by", classes[i]);
+ }
+ break;
+ }
+ }
+ }
+ }
+ if (doc.isMethod()) {
+ printAtomTag(level, "isMethod");
+ context = CONTEXT_METHOD;
+ }
+ if (doc.isOrdinaryClass()) {
+ printAtomTag(level, "isOrdinaryClass");
+ }
+
+ if (doc.inlineTags().length > 0) {
+ printOpenTag(level, "inlineTags", false);
+ outputTags(level+1, doc.inlineTags(), true, context);
+ printCloseTag(0, "inlineTags");
+ }
+
+ if (doc.firstSentenceTags().length > 0) {
+ printOpenTag(level, "firstSentenceTags", false);
+ outputTags(level+1, doc.firstSentenceTags(), true, context);
+ printCloseTag(0, "firstSentenceTags");
+ }
+
+ if (doc.tags().length > 0) {
+ printOpenTag(level, "tags");
+ outputTaglets(level+1, doc.tags(), true, context);
+ printCloseTag(level, "tags");
+ }
+
+ if (doc.seeTags().length > 0) {
+ printOpenTag(level, "seeTags");
+ outputTags(level+1, doc.seeTags(), true, context);
+ printCloseTag(level, "seeTags");
+ }
+
+ SourcePosition position = doc.position();
+ if (null != position) {
+ printAtomTag(level, "position file=\"" + position.file().getAbsolutePath() + "\" line=\"" + position.line() + "\" column=\"" + position.column() + "\"");
+ }
+ }
+
+ protected void outputProgramElementDocBody(int level, ProgramElementDoc programElementDoc) {
+ outputDocBody(level, programElementDoc);
+ printAtomTag(level, "containingPackage name=\""+programElementDoc.containingPackage().name()+"\"");
+ if (null!=programElementDoc.containingClass()) {
+ outputType(level, "containingClass", programElementDoc.containingClass());
+ }
+ String access;
+ if (programElementDoc.isPublic())
+ access="public";
+ else if (programElementDoc.isProtected())
+ access="protected";
+ else if (programElementDoc.isPrivate())
+ access="private";
+ else if (programElementDoc.isPackagePrivate())
+ access="package";
+ else
+ throw new RuntimeException("Huh? "+programElementDoc+" is neither public, protected, private nor package protected.");
+ printAtomTag(level, "access scope=\""+access+"\"");
+ if (programElementDoc.isFinal())
+ printAtomTag(level, "isFinal");
+ if (programElementDoc.isStatic())
+ printAtomTag(level, "isStatic");
+ }
+
+ protected void outputTags(int level, Tag[] tags, boolean descend, int context) {
+
+ for (int i=0; i<tags.length; ++i) {
+ outputTag(tags[i], level, descend, context, i == tags.length-1);
+ }
+ }
+
+ protected void outputTag(Tag tag, int level, boolean descend, int context, boolean lastTag) {
+
+ if (!"Text".equals(tag.name())) {
+ printOpenTag(0 /* don't introduce additional whitespace */,
+ "tag kind=\""+tag.kind()+"\" name=\""+tag.name()+"\"", false);
+ }
+ if (tag instanceof ThrowsTag) {
+ ThrowsTag throwsTag = (ThrowsTag)tag;
+ if (null!=throwsTag.exception()) {
+ outputType(level+1, "exception", throwsTag.exception());
+ }
+ else {
+ StringBuffer sb = new StringBuffer("Exception ");
+ sb.append(throwsTag.exceptionName());
+ sb.append(" not found in ");
+ if (currentExecMember instanceof MethodDoc) {
+ MethodDoc m = (MethodDoc)currentExecMember;
+ sb.append(m.returnType().typeName());
+ sb.append(m.returnType().dimension());
+ sb.append(' ');
+ }
+ sb.append(currentClass.qualifiedName());
+ sb.append('.');
+ sb.append(currentExecMember.name());
+ sb.append('(');
+ Parameter[] params = currentExecMember.parameters();
+ for (int j=0; j < params.length; j++) {
+ sb.append(params[j].type().typeName());
+ sb.append(params[j].type().dimension());
+ sb.append(' ');
+ sb.append(params[j].name());
+ if (j != params.length-1)
+ sb.append(", ");
+ }
+ sb.append(')');
+ printWarning(sb.toString());
+
+ printAtomTag(level+1, "exception typename=\""+throwsTag.exceptionName()+"\"");
+ }
+ }
+ else if (tag instanceof ParamTag) {
+ ParamTag paramTag = (ParamTag)tag;
+ printAtomTag(level+1, "parameter name=\""+paramTag.parameterName()+"\"");
+ }
+
+ if (null != tag.text()) {
+ //printOpenTag(level+1, "text", false);
+ if (fixHTML) {
+ print(htmlRepairer.getWellformedHTML(tag.text()));
+ }
+ else {
+ print("<![CDATA["+cdata(tag.text())+"]]>");
+ }
+ //printCloseTag(0 /* don't introduce additional whitespace */, "text");
+ }
+ else {
+ printWarning("Tag got null text: "+tag);
+ }
+
+ if ((descend && ("@throws".equals(tag.name()) || "@param".equals(tag.name()))) || "@deprecated".equals(tag.name())) {
+ if (tag.firstSentenceTags().length>0) {
+ printOpenTag(level+1, "firstSentenceTags", false);
+ outputTags(level+2, tag.firstSentenceTags(), false, context);
+ printCloseTag(0, "firstSentenceTags");
+ }
+
+ if (tag.inlineTags().length>0) {
+ printOpenTag(level+1, "inlineTags", false);
+ outputTags(level+2, tag.firstSentenceTags(), false, context);
+ printCloseTag(0, "inlineTags");
+ }
+ }
+
+ if (fixHTML && lastTag) {
+ String terminateText = htmlRepairer.terminateText();
+ if (null != terminateText && terminateText.length() > 0) {
+ print(terminateText);
+ }
+ }
+
+ if (!"Text".equals(tag.name())) {
+
+ Taglet inlineTaglet = (Taglet)tagletMap.get(tag.name().substring(1));
+ if (null != inlineTaglet && inlineTaglet.isInlineTag()) {
+ printOpenTag(0, "inlineTagletText", false);
+ print(inlineTaglet.toString(tag));
+ printCloseTag(0, "inlineTagletText");
+ }
+
+ printCloseTag(0, "tag", false);
+ }
+ }
+
+ void outputTaglets(int level, Tag[] tags, boolean descend, int context)
+ {
+ for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
+ String tagName = (String)it.next();
+ Object o = tagletMap.get(tagName);
+ Taglet taglet = (Taglet)o;
+
+ if (!taglet.isInlineTag()
+ && ((context != CONTEXT_CONSTRUCTOR || taglet.inConstructor())
+ || (context != CONTEXT_FIELD || taglet.inField())
+ || (context != CONTEXT_METHOD || taglet.inMethod())
+ || (context != CONTEXT_OVERVIEW || taglet.inOverview())
+ || (context != CONTEXT_PACKAGE || taglet.inPackage())
+ || (context != CONTEXT_TYPE || taglet.inType()))) {
+
+ List tagsOfThisType = new ArrayList();
+ for (int i=0, ilim=tags.length; i<ilim; ++i) {
+ if (tags[i].name().substring(1).equals(tagName)) {
+ tagsOfThisType.add(tags[i]);
+ }
+ }
+
+ if (!tagsOfThisType.isEmpty()) {
+ Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
+ if (taglet instanceof StandardTaglet) {
+ Iterator tagIterator = tagsOfThisType.iterator();
+ while (tagIterator.hasNext()) {
+ Tag tag = (Tag)tagIterator.next();
+ outputTag(tag, level, descend, context, !tagIterator.hasNext());
+ }
+ }
+ else {
+ String tagletString = taglet.toString(tagletTags);
+ if (null != tagletString) {
+ printOpenTag(0, "tag name=\"" + tagName + "\" taglet-generated=\"true\"");
+ if (fixHTML) {
+ print(htmlRepairer.getWellformedHTML(tagletString));
+ print(htmlRepairer.terminateText());
+ }
+ else {
+ print("<![CDATA["+cdata(tagletString)+"]]>");
+ }
+ printCloseTag(0, "tag", false);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Inofficial entry point. We got an instance here.
+ */
+ protected boolean instanceStart(RootDoc _rootDoc) {
+
+ this.rootDoc = _rootDoc;
+ _rootDoc = null;
+
+ boolean xmlOnly = true;
+
+ // Set the default Taglet order
+
+ registerTaglet(new VersionTaglet());
+ registerTaglet(new AuthorTaglet());
+ //registerTaglet(new SinceTaglet());
+ registerTaglet(new StandardTaglet("deprecated"));
+ registerTaglet(new StandardTaglet("see"));
+ registerTaglet(new StandardTaglet("param"));
+
+ // Set the built-in Taglet filter
+
+ AuthorTaglet.setTagletEnabled(false);
+ VersionTaglet.setTagletEnabled(false);
+ SinceTaglet.setTagletEnabled(true);
+ DeprecatedTaglet.setTagletEnabled(true);
+
+ try {
+ {
+
+ // Process command line options passed through to this doclet
+
+ TargetContext targetContext = null;
+
+ TargetContext htmlTargetContext
+ = new TargetContext(DocTranslet.fromClasspath("/doctranslets/html/gjdoc.xsl"),
+ targetDirectory);
+
+ for (int i=0, ilim=rootDoc.options().length; i<ilim; ++i) {
+
+ String[] option = rootDoc.options()[i];
+ String optionTag = option[0];
+
+ if ("-d".equals(optionTag)) {
+ if (null == targetDirectory) {
+ targetDirectory = new File(option[1]);
+ }
+ if (null != targetContext) {
+ targetContext.setTargetDirectory(targetDirectory);
+ }
+ }
+
+ else if ("-nofixhtml".equals(optionTag)) {
+ fixHTML = false;
+ printError("-nofixhtml currently not supported.");
+ return false;
+ }
+ else if ("-compress".equals(optionTag)) {
+ compress = true;
+ }
+ else if ("-nohtmlwarn".equals(optionTag)) {
+ noHTMLWarn = true;
+ }
+ else if ("-noemailwarn".equals(optionTag)) {
+ noEmailWarn = true;
+ }
+ else if ("-indentstep".equals(optionTag)) {
+ indentStep = Integer.parseInt(option[1]);
+ }
+ else if ("-doctranslet".equals(optionTag)) {
+ targets.add(targetContext = new TargetContext(DocTranslet.fromJarFile(new File(option[1])),
+ targetDirectory));
+ }
+ else if ("-genhtml".equals(optionTag)) {
+ htmlTargetContext.setTargetDirectory(targetDirectory);
+ targets.add(targetContext = htmlTargetContext);
+ xmlOnly = false;
+ }
+ else if ("-geninfo".equals(optionTag)) {
+ targetContext
+ = new TargetContext(DocTranslet.fromClasspath("/doctranslets/info/gengj.xsl"),
+ targetDirectory);
+ targets.add(targetContext);
+ if (!fixHTML) {
+ printNotice("NOTE: -geninfo implies -fixhtml.");
+ fixHTML = true;
+ }
+ xmlOnly = false;
+ }
+ else if ("-gendocbook".equals(optionTag)) {
+ targetContext = new TargetContext(DocTranslet.fromClasspath("/doctranslets/docbook/gengj.xsl"),
+ targetDirectory);
+ targets.add(targetContext);
+ if (!fixHTML) {
+ printNotice("NOTE: -gendocbook implies -fixhtml.");
+ fixHTML = true;
+ }
+ }
+ else if ("-genpdf".equals(optionTag)) {
+ targetContext
+ = new TargetContext(DocTranslet.fromClasspath("/doctranslets/docbook/gengj.xsl"),
+ targetDirectory);
+ /** "gnu.classpath.tools.doclets.xmldoclet.DocBookPostprocessor") **/
+ targets.add(targetContext);
+ if (!fixHTML) {
+ printNotice("NOTE: -genpdf implies -fixhtml.");
+ fixHTML = true;
+ }
+ }
+ else if ("-xmlonly".equals(optionTag)) {
+ xmlOnly = true;
+ }
+ else if ("-bottomnote".equals(optionTag)) {
+
+ FileReader reader = new FileReader(option[1]);
+ StringWriter writer = new StringWriter();
+ char[] buf = new char[256];
+ int nread;
+ while ((nread = reader.read(buf)) >= 0) {
+ writer.write(buf, 0, nread);
+ }
+ writer.flush();
+ bottomNote = writer.toString();
+ writer.close();
+ reader.close();
+ }
+ else if ("-title".equals(optionTag)) {
+
+ title = option[1];
+ }
+ else if ("-workpath".equals(optionTag)) {
+
+ workingPath = option[1];
+ }
+ else if ("-tagletpath".equals(optionTag)) {
+
+ if (null == tagletPath) {
+ tagletPath = option[1];
+ }
+ else {
+ tagletPath = tagletPath + File.pathSeparator + option[1];
+ }
+ }
+ else if ("-taglet".equals(optionTag)) {
+
+ boolean tagletLoaded = false;
+
+ String useTagletPath = this.tagletPath;
+ if (null == useTagletPath) {
+ useTagletPath = System.getProperty("java.class.path");
+ }
+
+ try {
+ Class tagletClass;
+ try {
+ tagletClass
+ = new FileSystemClassLoader(useTagletPath).loadClass(option[1]);
+ }
+ catch (ClassNotFoundException e) {
+ // If not found on specified tagletpath, try default classloader
+ tagletClass
+ = Class.forName(option[1]);
+ }
+ Method registerTagletMethod
+ = tagletClass.getDeclaredMethod("register", new Class[] { java.util.Map.class });
+
+ if (!registerTagletMethod.getReturnType().equals(Void.TYPE)) {
+ printError("Taglet class '" + option[1] + "' found, but register method doesn't return void.");
+ }
+ else if (registerTagletMethod.getExceptionTypes().length > 0) {
+ printError("Taglet class '" + option[1] + "' found, but register method contains throws clause.");
+ }
+ else if ((registerTagletMethod.getModifiers() & (Modifier.STATIC | Modifier.PUBLIC | Modifier.ABSTRACT)) != (Modifier.STATIC | Modifier.PUBLIC)) {
+ printError("Taglet class '" + option[1] + "' found, but register method isn't public static, or is abstract..");
+ }
+ else {
+ Map tempMap = new HashMap();
+ registerTagletMethod.invoke(null, new Object[] { tempMap });
+ tagletLoaded = true;
+ String name = (String)tempMap.keySet().iterator().next();
+ Taglet taglet = (Taglet)tempMap.get(name);
+ tagletMap.put(name, taglet);
+ mentionedTags.add(taglet);
+ }
+ }
+ catch (NoSuchMethodException e) {
+ printError("Taglet class '" + option[1] + "' found, but doesn't contain the register method.");
+ }
+ catch (SecurityException e) {
+ printError("Taglet class '" + option[1] + "' cannot be loaded: " + e.getMessage());
+ }
+ catch (InvocationTargetException e) {
+ printError("Taglet class '" + option[1] + "' found, but register method throws exception: " + e.toString());
+ }
+ catch (IllegalAccessException e) {
+ printError("Taglet class '" + option[1] + "' found, but there was a problem when accessing the register method: " + e.toString());
+ }
+ catch (IllegalArgumentException e) {
+ printError("Taglet class '" + option[1] + "' found, but there was a problem when accessing the register method: " + e.toString());
+ }
+ catch (ClassNotFoundException e) {
+ printError("Taglet class '" + option[1] + "' cannot be found.");
+ }
+ if (!tagletLoaded) {
+ return false;
+ }
+ }
+ else if ("-author".equals(optionTag)) {
+ AuthorTaglet.setTagletEnabled(true);
+ }
+ else if ("-version".equals(optionTag)) {
+ VersionTaglet.setTagletEnabled(true);
+ }
+ else if ("-nosince".equals(optionTag)) {
+ SinceTaglet.setTagletEnabled(false);
+ }
+ else if ("-nodeprecated".equals(optionTag)) {
+ DeprecatedTaglet.setTagletEnabled(false);
+ }
+ else if ("-authormail".equals(optionTag)) {
+
+ if ("no-replace".equalsIgnoreCase(option[1])) {
+ AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.NO_REPLACEMENT);
+ }
+ else if ("mailto-name".equalsIgnoreCase(option[1])) {
+ AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.MAILTO_NAME);
+ }
+ else if ("name-mailto-address".equalsIgnoreCase(option[1])) {
+ AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.NAME_MAILTO_ADDRESS);
+ }
+ else if ("name-mangled-address".equalsIgnoreCase(option[1])) {
+ AuthorTaglet.setEmailReplacementType(AuthorTaglet.EmailReplacement.NAME_MANGLED_ADDRESS);
+ }
+ else {
+ printError("Invalid value for option '-authortag-email'. Allowed values are:"
+ + " no-replace, mailto-name, name-mailto-address, name-mangled-address.");
+ return false;
+ }
+ }
+ else if ("-mailmangledot".equals(optionTag)) {
+ AuthorTaglet.setDotReplacement(option[1]);
+ }
+ else if ("-mailmangleat".equals(optionTag)) {
+ AuthorTaglet.setAtReplacement(option[1]);
+ }
+ else if ("-docfilessubdirs".equals(optionTag)) {
+ docFilesSubdirsEnabled = true;
+ }
+ else if ("-excludedocfilessubdir".equals(optionTag)) {
+ StringTokenizer st = new StringTokenizer(option[1]);
+ while (st.hasMoreTokens()) {
+ excludeDocFilesSubDirs.add(st.nextToken());
+ }
+ }
+ else if ("-nonavbar".equals(optionTag)) {
+ docTransletOptions.nonavbar = true;
+ }
+ else if ("-noindex".equals(optionTag)) {
+ docTransletOptions.noindex = true;
+ }
+ else if ("-notree".equals(optionTag)) {
+ docTransletOptions.notree = true;
+ }
+ else if ("-nocomment".equals(optionTag)) {
+ docTransletOptions.nocomment = true;
+ }
+ else if ("-nohelp".equals(optionTag)) {
+ docTransletOptions.nohelp = true;
+ }
+ else if ("-splitindex".equals(optionTag)) {
+ docTransletOptions.splitindex = true;
+ }
+ else if ("-linksource".equals(optionTag)) {
+ docTransletOptions.linksource = true;
+ }
+ else if ("-windowtitle".equals(optionTag)) {
+ docTransletOptions.windowtitle = option[1];
+ }
+ else if ("-helpfile".equals(optionTag)) {
+ docTransletOptions.helpfile = new File(option[1]).toURL().toString();
+ }
+ else if ("-stylesheetfile".equals(optionTag)) {
+ docTransletOptions.stylesheetfile = new File(option[1]).toURL().toString();
+ }
+ else if ("-header".equals(optionTag)) {
+ docTransletOptions.header = option[1];
+ }
+ else if ("-footer".equals(optionTag)) {
+ docTransletOptions.footer = option[1];
+ }
+ else if ("-bottom".equals(optionTag)) {
+ docTransletOptions.bottom = option[1];
+ }
+ else if ("-doctitle".equals(optionTag)) {
+ docTransletOptions.doctitle = option[1];
+ }
+ else if ("-nodeprecatedlist".equals(optionTag)) {
+ docTransletOptions.nodeprecatedlist = true;
+ }
+ else if ("-uses".equals(optionTag)) {
+ docTransletOptions.uses = true;
+ }
+ else if ("-group".equals(optionTag)) {
+ if (!processGroupOption(option[1], option[2])) {
+ printError("Invalid package wildcard list in -group option \"" + option[1] + "\" " + option[2]);
+ return false;
+ }
+ }
+ else if ("-tag".equals(optionTag)) {
+ String tagSpec = option[1];
+ boolean validTagSpec = false;
+ int ndx1 = tagSpec.indexOf(':');
+ if (ndx1 < 0) {
+ Taglet taglet = (Taglet)tagletMap.get(tagSpec);
+ if (null == taglet) {
+ printError("There is no standard tag '" + tagSpec + "'.");
+ }
+ else {
+ if (mentionedTags.contains(taglet)) {
+ printError("Tag '" + tagSpec + "' has been added or moved before.");
+ }
+ else {
+ mentionedTags.add(taglet);
+
+ // re-append taglet
+ tagletMap.remove(tagSpec);
+ tagletMap.put(tagSpec, taglet);
+ }
+ }
+ }
+ else {
+ int ndx2 = tagSpec.indexOf(':', ndx1 + 1);
+ if (ndx2 > ndx1 && ndx2 < tagSpec.length() - 1) {
+ String tagName = tagSpec.substring(0, ndx1);
+ String tagHead = null;
+ if (tagSpec.charAt(ndx2 + 1) == '\"') {
+ if (tagSpec.charAt(tagSpec.length() - 1) == '\"') {
+ tagHead = tagSpec.substring(ndx2 + 2, tagSpec.length() - 1);
+ validTagSpec = true;
+ }
+ }
+ else {
+ tagHead = tagSpec.substring(ndx2 + 1);
+ validTagSpec = true;
+ }
+
+ boolean tagScopeOverview = false;
+ boolean tagScopePackages = false;
+ boolean tagScopeTypes = false;
+ boolean tagScopeConstructors = false;
+ boolean tagScopeMethods = false;
+ boolean tagScopeFields = false;
+ boolean tagDisabled = false;
+
+ tag_option_loop:
+ for (int n=ndx1+1; n<ndx2; ++n) {
+ switch (tagSpec.charAt(n)) {
+ case 'X':
+ tagDisabled = true;
+ break;
+ case 'a':
+ tagScopeOverview = true;
+ tagScopePackages = true;
+ tagScopeTypes = true;
+ tagScopeConstructors = true;
+ tagScopeMethods = true;
+ tagScopeFields = true;
+ break;
+ case 'o':
+ tagScopeOverview = true;
+ break;
+ case 'p':
+ tagScopePackages = true;
+ break;
+ case 't':
+ tagScopeTypes = true;
+ break;
+ case 'c':
+ tagScopeConstructors = true;
+ break;
+ case 'm':
+ tagScopeMethods = true;
+ break;
+ case 'f':
+ tagScopeFields = true;
+ break;
+ default:
+ validTagSpec = false;
+ break tag_option_loop;
+ }
+ }
+
+ if (validTagSpec) {
+ GenericTaglet taglet
+ = new GenericTaglet(tagName,
+ tagHead,
+ tagScopeOverview,
+ tagScopePackages,
+ tagScopeTypes,
+ tagScopeConstructors,
+ tagScopeMethods,
+ tagScopeFields);
+ taglet.setTagletEnabled(!tagDisabled);
+ taglet.register(tagletMap);
+ mentionedTags.add(taglet);
+ }
+ }
+ }
+ if (!validTagSpec) {
+ printError("Value for option -tag must be in format \"<tagname>:Xaoptcmf:<taghead>\".");
+ }
+ }
+ }
+
+ // Use current directory if target directory hasn't been set.
+ if (null == targetDirectory) {
+ targetDirectory = new File(System.getProperty("user.dir"));
+ }
+ if (null != targetContext) {
+ targetContext.setTargetDirectory(targetDirectory);
+ }
+
+ // It is illegal to specify targets AND -xmlonly.
+
+ if (xmlOnly && targets.size() > 0) {
+
+ printError("You can only specify one of -xmlonly and a target format.");
+ return false;
+ }
+
+ // If no target was specified and XML only was not
+ // requested, use HTML as default target.
+
+ if (!xmlOnly && targets.size() == 0) {
+ targets.add(targetContext = htmlTargetContext);
+ }
+
+ // Set the same target directory for all output.
+
+ // FIXME: Allow separate target directories for different
+ // output formats.
+
+ for (Iterator it = targets.iterator(); it.hasNext(); ) {
+ TargetContext t = (TargetContext)it.next();
+ t.setTargetDirectory(targetDirectory);
+ }
+
+ // Create temporary directory if necessary
+
+ if (xmlOnly) {
+
+ xmlTargetDirectory = targetDirectory;
+ }
+ else {
+
+ File workingTopDirectory = new File(workingPath);
+
+ workingDirectory = new File(workingTopDirectory, "gjdoc.tmp."+System.currentTimeMillis());
+
+ if (!workingDirectory.mkdir()) {
+ printError("Cannot create temporary directory at "+System.getProperty("java.io.tmpdir"));
+ return false;
+ }
+
+ File xmlTempDirectory = new File(workingDirectory, "xmloutput");
+
+ if (!xmlTempDirectory.mkdir()) {
+ printError("Cannot create temporary directory for XML output at "+System.getProperty("java.io.tmpdir"));
+ return false;
+ }
+
+ xmlTargetDirectory = xmlTempDirectory;
+ }
+
+ // Create target directory if necessary
+
+ if (!targetDirectory.exists()) {
+ printNotice("Creating destination directory: \""
+ + targetDirectory + "\"");
+ if (!targetDirectory.mkdirs()) {
+ printError("Failed to create destination directory \""
+ + targetDirectory + "\"");
+ return false;
+ }
+ }
+
+ // Check for deprecation
+
+ boolean hasDeprecatedClasses = false;
+ boolean hasDeprecatedInterfaces = false;
+ boolean hasDeprecatedExceptions = false;
+ boolean hasDeprecatedErrors = false;
+ boolean hasDeprecatedMethods = false;
+ boolean hasDeprecatedFields = false;
+
+ {
+ ClassDoc[] classes = rootDoc.classes();
+ for (int i = 0, ilim = classes.length; i < ilim; ++ i) {
+ ClassDoc c = classes[i];
+ Tag[] deprecatedTags = c.tags("deprecated");
+ if (null != deprecatedTags && 0 != deprecatedTags.length) {
+ if (c.isInterface()) {
+ hasDeprecatedInterfaces = true;
+ }
+ else if (c.isException()) {
+ hasDeprecatedExceptions = true;
+ }
+ else if (c.isError()) {
+ hasDeprecatedErrors = true;
+ }
+ else /*if (c.isOrdinaryClass())*/ {
+ hasDeprecatedClasses = true;
+ }
+ }
+
+ MethodDoc[] methods = c.methods();
+ for (int j = 0, jlim = methods.length; j < jlim; ++ j) {
+ MethodDoc m = methods[j];
+ deprecatedTags = m.tags("deprecated");
+ if (null != deprecatedTags && 0 != deprecatedTags.length) {
+ hasDeprecatedMethods = true;
+ }
+ }
+
+ FieldDoc[] fields = c.fields();
+ for (int j = 0, jlim = fields.length; j < jlim; ++ j) {
+ FieldDoc f = fields[j];
+ deprecatedTags = f.tags("deprecated");
+ if (null != deprecatedTags && 0 != deprecatedTags.length) {
+ hasDeprecatedFields = true;
+ }
+ }
+ }
+ }
+
+ htmlRepairer = new HtmlRepairer(rootDoc, noHTMLWarn, noEmailWarn,
+ currentClass, currentMember,
+ false);
+
+ collectUsage();
+
+ // Begin XML generation
+
+ printNotice("Writing XML Index file...");
+
+ // Assign output stream
+
+ setTargetFile("index.xml");
+
+ // Output XML document header
+
+ println(0, "<?xml version=\"1.0\"?>");
+ println("<!DOCTYPE gjdoc SYSTEM \"dtd/gjdoc.dtd\">");
+ println();
+ printOpenTag(0, "rootdoc xmlns=\"http://www.w3.org/TR/REC-html40\" xmlns:gjdoc=\"http://www.gnu.org/software/cp-tools/gjdocxml\"");
+
+ println();
+ println(1, "<!-- Tags from overview page, if available -->");
+
+ if (rootDoc.firstSentenceTags().length > 0) {
+ printOpenTag(2, "firstSentenceTags", false);
+ outputTags(3, rootDoc.firstSentenceTags(), true, CONTEXT_PACKAGE);
+ printCloseTag(0, "firstSentenceTags");
+ }
+
+ if (rootDoc.inlineTags().length > 0) {
+ printOpenTag(2, "inlineTags");
+ outputTags(3, rootDoc.inlineTags(), true, CONTEXT_PACKAGE);
+ printCloseTag(2, "inlineTags");
+ }
+
+ if (null != bottomNote) {
+ printOpenTag(1, "bottomnote");
+ print(bottomNote);
+ printCloseTag(1, "bottomnote");
+ }
+
+ if (null != title) {
+ printOpenTag(1, "title");
+ println(2, title);
+ printCloseTag(1, "title");
+ }
+
+ printOpenTag(1, "created");
+ println(2, DateFormat.getDateInstance(DateFormat.LONG, Locale.US).format(new java.util.Date()));
+ printCloseTag(1, "created");
+
+ if (hasDeprecatedClasses) printAtomTag(1, "hasDeprecatedClasses");
+ if (hasDeprecatedInterfaces) printAtomTag(1, "hasDeprecatedInterfaces");
+ if (hasDeprecatedExceptions) printAtomTag(1, "hasDeprecatedExceptions");
+ if (hasDeprecatedErrors) printAtomTag(1, "hasDeprecatedErrors");
+ if (hasDeprecatedMethods) printAtomTag(1, "hasDeprecatedMethods");
+ if (hasDeprecatedFields) printAtomTag(1, "hasDeprecatedFields");
+
+ // Output summary of all classes specified on command line
+
+ println();
+ println(1, "<!-- Classes specified by user on command line -->");
+ ClassDoc[] specifiedClasses = rootDoc.specifiedClasses();
+ for (int i=0, ilim=specifiedClasses.length; i<ilim; ++i) {
+ ClassDoc sc = specifiedClasses[i];
+ printAtomTag(1, "specifiedclass fqname=\""+sc.qualifiedName()+"\" name=\""+sc.name()+"\"");
+ }
+ specifiedClasses = null;
+
+ // Output summary of all packages specified on command line
+
+ println();
+ println(1, "<!-- Packages specified by user on command line -->");
+ PackageDoc[] specifiedPackages = rootDoc.specifiedPackages();
+ for (int i=0, ilim=specifiedPackages.length; i<ilim; ++i) {
+ PackageDoc sp = specifiedPackages[i];
+ printAtomTag(1, "specifiedpackage name=\""+sp.name()+"\"");
+ }
+ specifiedPackages = null;
+
+ // Output package group information specified on the
+ // command line
+
+ println();
+ println(1, "<!-- Package groups specified by user on command line -->");
+ {
+ Iterator packageGroupIt = packageGroups.iterator();
+ while (packageGroupIt.hasNext()) {
+ PackageGroup packageGroup = (PackageGroup)packageGroupIt.next();
+ SortedSet groupedPackages = packageGroup.getPackages();
+ if (groupedPackages.isEmpty()) {
+ printWarning("Package group named '"
+ + packageGroup.getName() + "' didn't match any packages.");
+ }
+ else {
+ printOpenTag(1, "packagegroup name=\"" + packageGroup.getName() + "\"");
+ Iterator groupedPackageIt = groupedPackages.iterator();
+ while (groupedPackageIt.hasNext()) {
+ PackageDoc groupedPackageDoc = (PackageDoc)groupedPackageIt.next();
+ printAtomTag(2, "package name=\"" + groupedPackageDoc.name() + "\"");
+ }
+ printCloseTag(1, "packagegroup");
+ }
+ }
+ packageGroups = null;
+ }
+
+ // Output information on all packages for which documentation
+ // has been made available via the Doclet API
+
+ println();
+ println(1, "<!-- Documentation for all packages -->");
+ PackageDoc[] packages = rootDoc.specifiedPackages();
+ for (int i=0, ilim=packages.length; i<ilim; ++i) {
+ PackageDoc c = packages[i];
+ outputPackageDoc(c);
+ }
+ packages = null;
+
+ // Output brief summary on all classes for which documentation
+ // has been made available via the Doclet API.
+ //
+ // While this is redundant, it can speed up XSLT
+ // processing by orders of magnitude
+
+ println();
+ println(1, "<!-- Brief summary for all classes -->");
+ ClassDoc[] sumclasses = rootDoc.classes();
+ for (int i=0, ilim=sumclasses.length; i<ilim; ++i) {
+ ClassDoc c = sumclasses[i];
+ outputClassDocSummary(c);
+ }
+ sumclasses = null;
+
+ // Output closing tag, finish output stream
+
+ println();
+ printCloseTag(0, "rootdoc");
+
+ closeTargetFile();
+
+ createIndexByName();
+
+
+
+ // Output information on all classes for which documentation
+ // has been made available via the Doclet API
+
+ println();
+ println(1, "<!-- Documentation for all classes -->");
+ ClassDoc[] classes = rootDoc.classes();
+ String prevPackageName = null;
+ for (int i = 0, ilim = classes.length; i < ilim; ++ i) {
+ ClassDoc c = classes[i];
+
+ if (isVerbose()) {
+ printNotice("Writing XML information for "+c.qualifiedName()+"...");
+ }
+ else {
+ String packageName = c.containingPackage().name();
+ if (null == prevPackageName || !packageName.equals(prevPackageName)) {
+ printNotice("Writing XML information for "+packageName+"...");
+ prevPackageName = packageName;
+ }
+ }
+
+ setTargetFile(c.qualifiedName().replace('/','.')+".xml");
+
+ println("<?xml version=\"1.0\"?>");
+ println("<!DOCTYPE gjdoc SYSTEM \"dtd/gjdoc.dtd\">");
+
+ outputClassDoc(c);
+
+ closeTargetFile();
+ }
+ classes = null;
+ }
+
+ // Copy DTD files to temporary directory
+
+ // FIXME: try to solve this via jar: URLs. but this will
+ // probably break libxmlj compatibility (?)
+
+ String[] resources = new String[] {
+ "gjdoc.dtd",
+ "gjdoc-alphaindex.dtd",
+ "dbcentx.mod",
+ "ent/iso-amsa.ent",
+ "ent/iso-amsb.ent",
+ "ent/iso-amsc.ent",
+ "ent/iso-amsn.ent",
+ "ent/iso-amso.ent",
+ "ent/iso-amsr.ent",
+ "ent/iso-box.ent",
+ "ent/iso-cyr1.ent",
+ "ent/iso-cyr2.ent",
+ "ent/iso-dia.ent",
+ "ent/iso-grk1.ent",
+ "ent/iso-grk2.ent",
+ "ent/iso-grk3.ent",
+ "ent/iso-grk4.ent",
+ "ent/iso-lat1.ent",
+ "ent/iso-lat2.ent",
+ "ent/iso-num.ent",
+ "ent/iso-pub.ent",
+ "ent/iso-tech.ent",
+ };
+
+ File tempDtdDirectory = new File(xmlTargetDirectory, "dtd");
+ File tempDtdEntDirectory = new File(tempDtdDirectory, "ent");
+
+ if ((tempDtdDirectory.exists() || tempDtdDirectory.mkdir())
+ && (tempDtdEntDirectory.exists() || tempDtdEntDirectory.mkdir())) {
+ for (int i = 0; i < resources.length; ++ i) {
+ copyResourceToFile("/dtd/" + resources[i],
+ new File(tempDtdDirectory, resources[i]));
+ }
+ }
+ else {
+ printError("Cannot create temporary directories for DTD data at " + tempDtdDirectory);
+ return false;
+ }
+
+ // Copy package data-dir directory
+
+ {
+ PackageDoc[] packages = rootDoc.specifiedPackages();
+ for (int i=0, ilim=packages.length; i<ilim; ++i) {
+ PackageDoc c = packages[i];
+ if (c instanceof GjdocPackageDoc) {
+ copyPackageDataDir((GjdocPackageDoc)c);
+ }
+ }
+ }
+
+ // All information has been output. Apply stylesheet if given.
+
+ gnu.classpath.tools.gjdoc.Main.releaseRootDoc();
+
+ this.currentClass = null;
+ this.currentMember = null;
+ this.currentExecMember = null;
+
+ System.gc();
+
+ // From this point we are only operating on files, so we don't
+ // need this anymore and can free up some memory
+
+ for (Iterator it = targets.iterator(); it.hasNext(); ) {
+
+ TargetContext target = (TargetContext)it.next();
+
+ // We have XSLT postprocessing, run DocTranslet.
+
+ //DocTranslet docTranslet = DocTranslet.fromClasspath("/doctranslets/html/gjdoc.xsl");
+
+ //docTranslet.setOptions(docTransletOptions);
+
+ target.getDocTranslet().setOptions(docTransletOptions);
+
+ target.getDocTranslet().apply(xmlTargetDirectory,
+ target.getTargetDirectory(),
+ rootDoc);
+ }
+
+ // Done
+
+ targets = null;
+
+ System.gc();
+ Runtime.getRuntime().runFinalization();
+
+ return true;
+ }
+ catch (Exception e) {
+
+ // Something went wrong. Report to stderr and pass error to
+ // Javadoc Reporter
+
+ e.printStackTrace();
+ printError(e.toString());
+
+ Throwable rootCause = e.getCause();
+ if (null != rootCause) {
+ while (null != rootCause.getCause()) {
+ rootCause = rootCause.getCause();
+ }
+ System.err.println("Root cause:");
+ rootCause.printStackTrace();
+ }
+
+ return false;
+ }
+ finally {
+
+ // In any case, delete the working directory if we created one
+
+ if (null != workingDirectory) {
+
+ if (!deleteRecursive(workingDirectory)) {
+ printWarning("Could not delete temporary directory at "+workingDirectory);
+ }
+ }
+
+ printNotice("Done.");
+ }
+ }
+
+ /**
+ * Recursively delete the specified directory and its contents,
+ * like <code>rm -Rf directory</code>
+ *
+ * @return <code>true</code> on success
+ */
+ private static boolean deleteRecursive(File directory) {
+
+ boolean success = true;
+
+ File[] files = directory.listFiles();
+
+ for (int i=0, ilim=files.length; i<ilim; ++i) {
+
+ File file = files[i];
+
+ if (file.isDirectory()) {
+
+ success = deleteRecursive(file) && success;
+ }
+ else {
+
+ success = file.delete() && success;
+ }
+ }
+
+ return directory.delete() && success;
+ }
+
+ /**
+ * Prints a string to stdout and appends a newline. Convenience
+ * method.
+ */
+ protected void println(String str) {
+ out.println(str);
+ }
+
+ /**
+ * Prints a string to stdout without appending a newline.
+ * Convenience method.
+ */
+ protected void print(String str) {
+ out.print(str);
+ }
+
+ /**
+ * In standard mode, prints an empty line to stdout.
+ * In thight mode, nothing happens.
+ * Convenience method.
+ */
+ protected void println() {
+ if (!compress) {
+ out.println();
+ }
+ }
+
+ /**
+ * In standard mode, prints the given text indented to stdout and appends newline.
+ * In tight mode, doesn't print indentation or newlines.
+ */
+ protected void print(int indentLevel, String msg) {
+ if (compress) {
+ out.print(msg);
+ }
+ else {
+ StringBuffer indentation = new StringBuffer();
+ for (int i=0; i<indentLevel*indentStep; ++i) {
+ indentation.append(' ');
+ }
+ out.print(indentation+msg);
+ }
+ }
+
+ /**
+ * In tight mode, prints a message at a given indentation level.
+ * In standard mode, appends a newline in addition.
+ */
+ protected void println(int indentLevel, String msg) {
+ print(indentLevel, msg);
+ if (!compress) out.println();
+ }
+
+ /**
+ * Prints an atom tag at the given indentation level.
+ */
+ protected void printAtomTag(int level, String tag) {
+ println(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+"/>");
+ }
+
+ /**
+ * Prints an open tag at the given indentation level.
+ */
+ protected void printOpenTag(int level, String tag) {
+ printOpenTag(level, replaceCharsInTag(tag), true);
+ }
+
+ /**
+ * Prints an open tag at the given indentation level and
+ * conditionally appends a newline (if not in tight mode).
+ */
+ protected void printOpenTag(int level, String tag, boolean appendNewline) {
+ if (appendNewline && !compress) {
+ println(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+">");
+ }
+ else {
+ print(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+">");
+ }
+ }
+
+ /**
+ * Prints a close tag at the given indentation level.
+ */
+ protected void printCloseTag(int level, String tag) {
+ printCloseTag(level, tag, true);
+ }
+
+ /**
+ * Prints a close tag at the given indentation level and
+ * conditionally appends a newline (if not in tight mode).
+ */
+ protected void printCloseTag(int level, String tag, boolean appendNewline) {
+ if (appendNewline && !compress) {
+ println(level, "</"+tagPrefix+":"+replaceCharsInTag(tag)+">");
+ }
+ else {
+ print(level, "</"+tagPrefix+":"+replaceCharsInTag(tag)+">");
+ }
+ }
+
+ public static int optionLength(String option) {
+ if ("-d".equals(option)) return 2;
+ else if ("-fixhtml".equals(option)) return 1;
+ else if ("-compress".equals(option)) return 1;
+ else if ("-nohtmlwarn".equals(option)) return 1;
+ else if ("-noemailwarn".equals(option)) return 1;
+ else if ("-indentstep".equals(option)) return 2;
+ else if ("-xslsheet".equals(option)) return 2;
+ else if ("-xsltdriver".equals(option)) return 2;
+ else if ("-postprocess".equals(option)) return 2;
+ else if ("-genhtml".equals(option)) return 1;
+ else if ("-geninfo".equals(option)) return 1;
+ else if ("-gendocbook".equals(option)) return 1;
+ else if ("-xmlonly".equals(option)) return 1;
+ else if ("-bottomnote".equals(option)) return 2;
+ else if ("-workpath".equals(option)) return 2;
+ else if ("-title".equals(option)) return 2;
+ else if ("-tagletpath".equals(option)) return 2;
+ else if ("-taglet".equals(option)) return 2;
+ else if ("-authormail".equals(option)) return 2;
+ else if ("-mailmangledot".equals(option)) return 2;
+ else if ("-mailmangleat".equals(option)) return 2;
+ else if ("-noindex".equals(option)) return 1;
+ else if ("-nocomment".equals(option)) return 1;
+ else if ("-notree".equals(option)) return 1;
+ else if ("-nohelp".equals(option)) return 1;
+ else if ("-nonavbar".equals(option)) return 1;
+ else if ("-splitindex".equals(option)) return 1;
+ else if ("-author".equals(option)) return 1;
+ else if ("-version".equals(option)) return 1;
+ else if ("-nosince".equals(option)) return 1;
+ else if ("-nodeprecated".equals(option)) return 1;
+ else if ("-linksource".equals(option)) return 1;
+ else if ("-windowtitle".equals(option)) return 2;
+ else if ("-helpfile".equals(option)) return 2;
+ else if ("-stylesheetfile".equals(option)) return 2;
+ else if ("-tag".equals(option)) return 2;
+ else if ("-header".equals(option)) return 2;
+ else if ("-footer".equals(option)) return 2;
+ else if ("-bottom".equals(option)) return 2;
+ else if ("-doctitle".equals(option)) return 2;
+ else if ("-nodeprecatedlist".equals(option)) return 1;
+ else if ("-uses".equals(option)) return 1;
+ else if ("-group".equals(option)) return 3;
+
+ else return -1;
+ }
+
+ public static boolean validOptions(String[][] options) {
+ return true;
+ }
+
+
+ /**
+ * Workaround for non well-formed comments: fix tag contents
+ * by replacing <code><</code> with <code>&lt;</code>,
+ * <code>></code> with <code>&gt;</code> and
+ * <code>&</code> with <code>&amp;</code>.
+ *
+ * @param tagContent String to process
+ *
+ * @return given String with all special characters replaced by
+ * HTML entities.
+ */
+ private static String replaceCharsInTag(String tagContent) {
+ return
+ replaceString(
+ replaceString(
+ replaceString(
+ tagContent,
+ "<", "<"
+ ),
+ ">", ">"
+ ),
+ "&", "&"
+ );
+ }
+
+ /**
+ * Replaces all occurences of string <code>needle</code> within string
+ * <code>haystack</code> by string <code>replacement</code>.
+ *
+ * @param haystack The string to search and replace in.
+ * @param needle The string which is searched for.
+ * @param replacement The string by which every occurence of <code>needle</code> is replaced.
+ */
+ private static String replaceString(String haystack, String needle, String replacement) {
+ int ndx = haystack.indexOf(needle);
+ if (ndx<0)
+ return haystack;
+ else
+ return haystack.substring(0, ndx) + replacement
+ + replaceString(haystack.substring(ndx+needle.length()), needle, replacement);
+ }
+
+ protected void setTargetFile(String filename) throws IOException {
+
+ OutputStream fileOut = new FileOutputStream(new File(xmlTargetDirectory, filename));
+ out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fileOut, "UTF8")));;
+ }
+
+ protected void closeTargetFile() {
+
+ out.flush();
+ out.close();
+ }
+
+ private String cdata(String str) {
+
+ if (null==str) {
+ return str;
+ } // end of if ((null==str)
+
+ StringBuffer rc = new StringBuffer();
+ for (int i=0; i<str.length(); ++i) {
+ char c = str.charAt(i);
+ if (c==0x09 || c==0x0a || c==0x0d || (c>=0x20 && c<=0xd7ff) || (c>=0xe000 && c<=0xfffd) || (c>=0x10000 && c<=0x10ffff)) {
+ rc.append(c);
+ }
+ else {
+ printWarning("Invalid Unicode character 0x"+Integer.toString(c, 16)+" in javadoc markup has been stripped.");
+ } // end of else
+
+ }
+ return rc.toString();
+ }
+
+ static void copyResourceToFile(String resourceName, File target) throws IOException {
+
+ InputStream in = Driver.class.getResourceAsStream(resourceName);
+
+ if (null != in) {
+
+ FileOutputStream out = new FileOutputStream(target);
+ int size;
+ byte[] buffer = new byte[512];
+ while ((size = in.read(buffer)) >= 0) {
+ out.write(buffer, 0, size);
+ }
+ out.close();
+ }
+ else {
+
+ throw new IOException("Can't find resource named "+resourceName);
+ }
+ }
+
+ private void printError(String error) {
+ if (null != rootDoc) {
+ rootDoc.printError(error);
+ }
+ else {
+ System.err.println("ERROR: "+error);
+ }
+ }
+
+ private void printWarning(String warning) {
+ if (null != rootDoc) {
+ rootDoc.printWarning(warning);
+ }
+ else {
+ System.err.println("WARNING: "+warning);
+ }
+ }
+
+ private void printNotice(String notice) {
+ if (null != rootDoc) {
+ rootDoc.printNotice(notice);
+ }
+ else {
+ System.err.println(notice);
+ }
+ }
+
+ /**
+ * Copy the contents of the input directory to the output
+ * directory. The output directory must exist.
+ */
+ private void copyPackageDataDir(GjdocPackageDoc packageDoc) throws IOException {
+ File docFilesSourceDirectory
+ = new File(packageDoc.packageDirectory(), "doc-files");
+ File docFilesTargetDirectory
+ = new File(this.targetDirectory,
+ packageDoc.name().replace('.', File.separatorChar));
+ if (docFilesSourceDirectory.exists()) {
+ printNotice("Copying files from " + docFilesSourceDirectory);
+ copyDirectory(docFilesSourceDirectory, docFilesTargetDirectory,
+ docFilesSubdirsEnabled,
+ excludeDocFilesSubDirs);
+ }
+ }
+
+ /**
+ * Recursively copy the contents of the input directory to the
+ * output directory. The output directory must exist.
+ */
+ private static void copyDirectory(File sourceDir, File targetDir,
+ boolean recursive,
+ Set excludeDirs) throws IOException {
+ if (!targetDir.exists() && !targetDir.mkdirs()) {
+ throw new IOException("Cannot create directory " + targetDir);
+ }
+
+ File[] sourceFiles = sourceDir.listFiles();
+ for (int i=0; i<sourceFiles.length; ++i) {
+ if (sourceFiles[i].isDirectory()) {
+ if (recursive && (null == excludeDirs
+ || !excludeDirs.contains(sourceFiles[i].getName()))) {
+ File targetSubDir = new File(targetDir,
+ sourceFiles[i].getName());
+ if (targetSubDir.exists() || targetSubDir.mkdir()) {
+ copyDirectory(sourceFiles[i], targetSubDir, recursive, null);
+ }
+ else {
+ throw new IOException("Cannot create directory " + targetSubDir);
+ }
+ }
+ }
+ else {
+ copyFile(sourceFiles[i], new File(targetDir, sourceFiles[i].getName()));
+ }
+ }
+ }
+
+ /**
+ * Copy the contents of the input file to the output file. The
+ * output file's parent directory must exist.
+ */
+ private static void copyFile(File sourceFile, File targetFile) throws IOException {
+
+ InputStream in = new FileInputStream(sourceFile);
+ OutputStream out = new FileOutputStream(targetFile);
+ int nread;
+ byte[] buf = new byte[512];
+ while ((nread = in.read(buf)) >= 0) {
+ out.write(buf, 0, nread);
+ }
+ in.close();
+ out.close();
+ }
+
+ private void createIndexByName() throws IOException {
+ // Create index
+
+ // Collect index
+
+ Map indexMap = new TreeMap(new Comparator() {
+ public int compare(Object o1, Object o2) {
+ return o1.toString().toLowerCase().compareTo(o2.toString().toLowerCase());
+ }
+ });
+
+ // Add packages to index
+
+ PackageDoc[] packages = rootDoc.specifiedPackages();
+ for (int i=0, ilim=packages.length; i<ilim; ++i) {
+ PackageDoc c = packages[i];
+ indexMap.put(c.name(), c);
+ }
+
+ // Add classes, fields and methods to index
+
+ ClassDoc[] sumclasses = rootDoc.classes();
+ for (int i=0, ilim=sumclasses.length; i<ilim; ++i) {
+ ClassDoc c = sumclasses[i];
+ if (null == c.containingClass()) {
+ indexMap.put(c.name(), c);
+ }
+ else {
+ indexMap.put(c.name().substring(c.containingClass().name().length() + 1), c);
+ }
+ FieldDoc[] fields = c.fields();
+ for (int j=0, jlim=fields.length; j<jlim; ++j) {
+ indexMap.put(fields[j].name(), fields[j]);
+ }
+ MethodDoc[] methods = c.methods();
+ for (int j=0, jlim=methods.length; j<jlim; ++j) {
+ MethodDoc method = methods[j];
+ StringBuffer signature = new StringBuffer();
+ signature.append(method.name());
+ signature.append('(');
+ Parameter[] parameters = method.parameters();
+ for (int k=0, klim=parameters.length; k<klim; ++k) {
+ if (k > 0) {
+ signature.append(", ");
+ }
+ signature.append(parameters[k].typeName());
+ }
+ signature.append(')');
+ indexMap.put(signature.toString(), method);
+ }
+ }
+
+ // Assign output stream
+
+ setTargetFile("alphaindex.xml");
+
+ // Output XML document header
+
+ println(0, "<?xml version=\"1.0\"?>");
+ println("<!DOCTYPE gjdoc SYSTEM \"dtd/gjdoc-alphaindex.dtd\">");
+ println();
+ printOpenTag(0, "alphaindex xmlns=\"http://www.w3.org/TR/REC-html40\" xmlns:gjdoc=\"http://www.gnu.org/software/cp-tools/gjdocxml\"");
+
+ Iterator it = indexMap.keySet().iterator();
+
+ char previousCategoryLetter = '\0';
+ boolean categoryOpen = false;
+
+ while (it.hasNext()) {
+ String key = (String)it.next();
+ Doc entry = (Doc)indexMap.get(key);
+
+ char firstChar = Character.toUpperCase(key.charAt(0));
+ if (firstChar != previousCategoryLetter) {
+ if (categoryOpen) {
+ printCloseTag(1, "category");
+ }
+ printOpenTag(1, "category letter=\"" + firstChar + "\"");
+ categoryOpen = true;
+ previousCategoryLetter = firstChar;
+ }
+
+ printOpenTag(2, "entry name=\"" + key + "\"");
+ if (entry instanceof PackageDoc) {
+ printAtomTag(3, "isPackage");
+ }
+ else if (entry instanceof ClassDoc) {
+ printAtomTag(3, "isClass");
+ ClassDoc centry = (ClassDoc)entry;
+ currentClass = centry;
+ printAtomTag(3, "containingPackage name=\"" + centry.containingPackage().name() + "\"");
+ if (null != centry.containingClass()) {
+ printAtomTag(3, "containingClass name=\"" + centry.containingClass().name() + "\"");
+ }
+ if (centry.isInterface()) {
+ printAtomTag(3, "isInterface");
+ }
+ if (centry.isException()) {
+ printAtomTag(3, "isException");
+ }
+ if (centry.isError()) {
+ printAtomTag(3, "isError");
+ }
+ if (centry.isOrdinaryClass()) {
+ printAtomTag(3, "isOrdinaryClass");
+ }
+ }
+ else if (entry instanceof ProgramElementDoc) {
+ ProgramElementDoc pentry = (ProgramElementDoc)entry;
+ currentClass = pentry.containingClass();
+ printAtomTag(3, "containingPackage name=\"" + pentry.containingPackage().name() + "\"");
+ printAtomTag(3, "containingClass name=\"" + pentry.containingClass().name() + "\"");
+ if (pentry.isMethod()) {
+ printAtomTag(3, "isMethod");
+ ExecutableMemberDoc mentry = (ExecutableMemberDoc)pentry;
+ printAtomTag(3, "signature full=\""+mentry.signature()+"\" flat=\""+mentry.flatSignature()+"\"");
+ printAtomTag(3, "method name=\"" + mentry.name() + "\"");
+ }
+ if (pentry.isField()) {
+ printAtomTag(3, "isField");
+ }
+ }
+
+ Tag[] tags = entry.firstSentenceTags();
+ for (int i=0, ilim=tags.length; i<ilim; ++i) {
+ Tag tag = tags[i];
+ if (tag.firstSentenceTags().length>0) {
+ printOpenTag(3, "firstSentenceTags", false);
+ outputTags(4, tag.firstSentenceTags(), false, CONTEXT_TYPE);
+ printCloseTag(3, "firstSentenceTags");
+ }
+ }
+
+
+ printCloseTag(2, "entry");
+ }
+
+ if (categoryOpen) {
+ printCloseTag(1, "category");
+ }
+
+ printCloseTag(0, "alphaindex");
+
+ closeTargetFile();
+ }
+
+ private static class UsageType
+ {
+ public static final UsageType CLASS_DERIVED_FROM = new UsageType("class-derived-from");
+ public static final UsageType FIELD_OF_TYPE = new UsageType("field-of-type");
+ public static final UsageType METHOD_WITH_RETURN_TYPE = new UsageType("method-with-return-type");
+ public static final UsageType METHOD_WITH_PARAMETER_TYPE = new UsageType("method-with-parameter-type");
+ public static final UsageType METHOD_WITH_THROWN_TYPE = new UsageType("method-with-thrown-type");
+ public static final UsageType CONSTRUCTOR_WITH_PARAMETER_TYPE = new UsageType("constructor-with-parameter-type");
+ public static final UsageType CONSTRUCTOR_WITH_THROWN_TYPE = new UsageType("constructor-with-thrown-type");
+ private String id;
+
+ private UsageType(String id)
+ {
+ this.id = id;
+ }
+
+ public String toString() {
+ return "UsageType{id=" + id + "}";
+ }
+
+ public String getId() {
+ return id;
+ }
+ }
+
+ /**
+ * ClassDoc -> (PackageDoc -> (UsageType -> (Set of Doc)))
+ */
+ private Map usedClassToPackagesMap = new HashMap();
+
+ private void addUsedBy(ClassDoc usedClass, UsageType usageType, Doc user, PackageDoc userPackage)
+ {
+ Map packageToUsageTypeMap = (Map)usedClassToPackagesMap.get(usedClass);
+ if (null == packageToUsageTypeMap) {
+ packageToUsageTypeMap = new HashMap();
+ usedClassToPackagesMap.put(usedClass, packageToUsageTypeMap);
+ }
+
+ Map usageTypeToUsersMap = (Map)packageToUsageTypeMap.get(userPackage);
+ if (null == usageTypeToUsersMap) {
+ usageTypeToUsersMap = new HashMap();
+ packageToUsageTypeMap.put(userPackage, usageTypeToUsersMap);
+ }
+
+ Set userSet = (Set)usageTypeToUsersMap.get(usageType);
+ if (null == userSet) {
+ userSet = new TreeSet(); // FIXME: we need the collator from Main here
+ usageTypeToUsersMap.put(usageType, userSet);
+ }
+ userSet.add(user);
+ }
+
+ /**
+ * Create the cross reference database.
+ */
+ private void collectUsage() {
+
+ ClassDoc[] classes = rootDoc.classes();
+ for (int i = 0, ilim = classes.length; i < ilim; ++ i) {
+ ClassDoc clazz = classes[i];
+
+ // classes derived from
+ for (ClassDoc superclass = clazz.superclass(); superclass != null;
+ superclass = superclass.superclass()) {
+ addUsedBy(superclass, UsageType.CLASS_DERIVED_FROM, clazz, clazz.containingPackage());
+ }
+
+ FieldDoc[] fields = clazz.fields();
+ for (int j = 0, jlim = fields.length; j < jlim; ++ j) {
+ FieldDoc field = fields[j];
+
+ // fields of type
+ ClassDoc fieldType = field.type().asClassDoc();
+ if (null != fieldType) {
+ addUsedBy(fieldType, UsageType.FIELD_OF_TYPE,
+ field, clazz.containingPackage());
+ }
+ }
+
+ MethodDoc[] methods = clazz.methods();
+ for (int j = 0, jlim = methods.length; j < jlim; ++ j) {
+ MethodDoc method = methods[j];
+
+ // methods with return type
+
+ ClassDoc returnType = method.returnType().asClassDoc();
+ if (null != returnType) {
+ addUsedBy(returnType, UsageType.METHOD_WITH_RETURN_TYPE,
+ method, clazz.containingPackage());
+ }
+ Parameter[] parameters = method.parameters();
+ for (int k=0; k<parameters.length; ++k) {
+
+ // methods with parameter type
+
+ Parameter parameter = parameters[k];
+ ClassDoc parameterType = parameter.type().asClassDoc();
+ if (null != parameterType) {
+ addUsedBy(parameterType, UsageType.METHOD_WITH_PARAMETER_TYPE,
+ method, clazz.containingPackage());
+ }
+ }
+
+ // methods which throw
+
+ ClassDoc[] thrownExceptions = method.thrownExceptions();
+ for (int k = 0, klim = thrownExceptions.length; k < klim; ++ k) {
+ ClassDoc thrownException = thrownExceptions[k];
+ addUsedBy(thrownException, UsageType.METHOD_WITH_THROWN_TYPE,
+ method, clazz.containingPackage());
+ }
+ }
+
+ ConstructorDoc[] constructors = clazz.constructors();
+ for (int j = 0, jlim = constructors.length; j < jlim; ++ j) {
+
+ ConstructorDoc constructor = constructors[j];
+
+ Parameter[] parameters = constructor.parameters();
+ for (int k = 0, klim = parameters.length; k < klim; ++ k) {
+
+ // constructors with parameter type
+
+ Parameter parameter = parameters[k];
+ ClassDoc parameterType = parameter.type().asClassDoc();
+ if (null != parameterType) {
+ addUsedBy(parameterType, UsageType.CONSTRUCTOR_WITH_PARAMETER_TYPE,
+ constructor, clazz.containingPackage());
+ }
+ }
+
+ // constructors which throw
+
+ ClassDoc[] thrownExceptions = constructor.thrownExceptions();
+ for (int k = 0, klim = thrownExceptions.length; k < klim; ++ k) {
+ ClassDoc thrownException = thrownExceptions[k];
+ addUsedBy(thrownException, UsageType.CONSTRUCTOR_WITH_THROWN_TYPE,
+ constructor, clazz.containingPackage());
+ }
+ }
+ }
+ }
+
+ private void outputUsage(ClassDoc clazz, int level) {
+
+ Map packageToUsageTypeMap = (Map)usedClassToPackagesMap.get(clazz);
+ if (null != packageToUsageTypeMap) {
+ printOpenTag(level, "references");
+
+ Iterator packagesIterator = packageToUsageTypeMap.keySet().iterator();
+
+ while (packagesIterator.hasNext()) {
+ PackageDoc packageDoc = (PackageDoc)packagesIterator.next();
+ printOpenTag(level + 1, "referencing-package name=\"" + packageDoc.name() + "\"");
+ Map usageTypeToUsersMap = (Map)packageToUsageTypeMap.get(packageDoc);
+ Iterator usageTypeIterator = usageTypeToUsersMap.keySet().iterator();
+ while (usageTypeIterator.hasNext()) {
+ UsageType usageType = (UsageType)usageTypeIterator.next();
+ printOpenTag(level + 2, "usage-type id=\"" + usageType.getId() + "\"");
+ Set users = (Set)usageTypeToUsersMap.get(usageType);
+ Iterator userIterator = users.iterator();
+ while (userIterator.hasNext()) {
+ Doc user = (Doc)userIterator.next();
+ if (user instanceof ClassDoc) {
+ printAtomTag(level + 3, "user"
+ + " class=\"" + ((ClassDoc)user).name() + "\"");
+ }
+ else if (user instanceof FieldDoc) {
+ FieldDoc fieldDoc = (FieldDoc)user;
+ printAtomTag(level + 3, "user"
+ + " class=\"" + fieldDoc.containingClass().name() + "\""
+ + " field=\"" + fieldDoc.name() + "\"");
+ }
+ else if (user instanceof MethodDoc) {
+ MethodDoc methodDoc = (MethodDoc)user;
+ printAtomTag(level + 3, "user"
+ + " class=\"" + methodDoc.containingClass().name() + "\""
+ + " method=\"" + methodDoc.name() + "\""
+ + " signature=\"" + methodDoc.signature() + "\""
+ + " flatSignature=\"" + methodDoc.flatSignature() + "\"");
+ }
+ else if (user instanceof ConstructorDoc) {
+ ConstructorDoc constructorDoc = (ConstructorDoc)user;
+ printAtomTag(level + 3, "user"
+ + " class=\"" + constructorDoc.containingClass().name() + "\""
+ + " signature=\"" + constructorDoc.signature() + "\""
+ + " flatSignature=\"" + constructorDoc.flatSignature() + "\"");
+ }
+ }
+ printCloseTag(level +2, "usage-type");
+ }
+ printCloseTag(level + 1, "referencing-package");
+ }
+
+ printCloseTag(level, "references");
+ }
+ }
+
+ private boolean processGroupOption(String groupName, String colonSeparatedPackageList)
+ {
+ try {
+ PackageMatcher packageMatcher = new PackageMatcher();
+
+ StringTokenizer tokenizer = new StringTokenizer(colonSeparatedPackageList, ":");
+ while (tokenizer.hasMoreTokens()) {
+ String packageWildcard = tokenizer.nextToken();
+ packageMatcher.addWildcard(packageWildcard);
+ }
+
+ SortedSet groupPackages = packageMatcher.filter(rootDoc.specifiedPackages());
+
+ packageGroups.add(new PackageGroup(groupName, groupPackages));
+
+ return true;
+ }
+ catch (InvalidPackageWildcardException e) {
+ return false;
+ }
+ }
+
+ private void registerTaglet(Taglet taglet)
+ {
+ tagletMap.put(taglet.getName(), taglet);
+ }
+
+ private boolean isVerbose()
+ {
+ return false;
+ }
+}
-/* gnu.classpath.tools.doclets.xmldoclet.Driver1_4\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.doclets.xmldoclet;\r
-\r
-import com.sun.javadoc.*;\r
-import java.io.IOException;\r
-\r
-/**\r
- * A Doclet which retrieves all information presented by the Doclet\r
- * API, dumping it to stdout in XML format.\r
- *\r
- * Supports Doclet API Version 1.4.\r
- *\r
- * @author Julian Scheid\r
- */\r
-public class Driver1_4 extends Driver {\r
-\r
- /**\r
- * Official Doclet entry point.\r
- */\r
- public static boolean start(RootDoc root) {\r
-\r
- // Create a new XmlDoclet instance and delegate control.\r
- return new Driver1_4().instanceStart(root);\r
- }\r
-\r
- /* since 1.4\r
- private void outputSourcePosition(int level, SourcePosition sourcePosition) {\r
- println(level, "<sourceposition"\r
- + " file=\""+sourcePosition.file().toString()+"\""\r
- + " line=\""+sourcePosition.line()+"\""\r
- + " column=\""+sourceposition.column()+"\""\r
- + "/>");\r
- }\r
- */\r
-\r
- protected void outputClassDoc(ClassDoc classDoc) \r
- throws IOException \r
- {\r
- super.outputClassDoc(classDoc);\r
- //outputSourcePosition(level, doc.position());\r
- }\r
-\r
- protected void outputFieldDocBody(int level, FieldDoc fieldDoc) {\r
- super.outputFieldDocBody(level, fieldDoc);\r
- //println(level, "<constantValueExpression>"+fieldDoc.constantValueExpression()+"</constantValueExpression>");\r
- }\r
-\r
-}\r
+/* gnu.classpath.tools.doclets.xmldoclet.Driver1_4
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.doclets.xmldoclet;
+
+import com.sun.javadoc.*;
+import java.io.IOException;
+
+/**
+ * A Doclet which retrieves all information presented by the Doclet
+ * API, dumping it to stdout in XML format.
+ *
+ * Supports Doclet API Version 1.4.
+ *
+ * @author Julian Scheid
+ */
+public class Driver1_4 extends Driver {
+
+ /**
+ * Official Doclet entry point.
+ */
+ public static boolean start(RootDoc root) {
+
+ // Create a new XmlDoclet instance and delegate control.
+ return new Driver1_4().instanceStart(root);
+ }
+
+ /* since 1.4
+ private void outputSourcePosition(int level, SourcePosition sourcePosition) {
+ println(level, "<sourceposition"
+ + " file=\""+sourcePosition.file().toString()+"\""
+ + " line=\""+sourcePosition.line()+"\""
+ + " column=\""+sourceposition.column()+"\""
+ + "/>");
+ }
+ */
+
+ protected void outputClassDoc(ClassDoc classDoc)
+ throws IOException
+ {
+ super.outputClassDoc(classDoc);
+ //outputSourcePosition(level, doc.position());
+ }
+
+ protected void outputFieldDocBody(int level, FieldDoc fieldDoc) {
+ super.outputFieldDocBody(level, fieldDoc);
+ //println(level, "<constantValueExpression>"+fieldDoc.constantValueExpression()+"</constantValueExpression>");
+ }
+
+}
-/* gnu.classpath.tools.doclets.xmldoclet.HtmlRepairer.java\r
- Copyright (C) 2003 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.doclets.xmldoclet;\r
-\r
-import java.io.*;\r
-import java.util.*;\r
-import com.sun.javadoc.DocErrorReporter;\r
-import com.sun.javadoc.ClassDoc;\r
-import com.sun.javadoc.MemberDoc;\r
-\r
-/**\r
- * Provides methods for tidying up HTML source.\r
- *\r
- * @author Julian Scheid\r
- */\r
-public final class HtmlRepairer {\r
-\r
- private static class TagInfo {\r
-\r
- private Set parentTags = new HashSet();\r
-\r
- public TagInfo(String parentTag) {\r
- this.parentTags.add(parentTag);\r
- }\r
-\r
- public TagInfo(String[] parentTagArr) {\r
- for (int i=0; i<parentTagArr.length; ++i) {\r
- this.parentTags.add(parentTagArr[i]);\r
- }\r
- }\r
-\r
- public boolean isLegalParentTag(String tag) {\r
- return this.parentTags.contains(tag);\r
- }\r
- }\r
-\r
- private DocErrorReporter warningReporter;\r
- private boolean noWarn;\r
- private boolean noEmailWarn;\r
- private ClassDoc contextClass;\r
- private MemberDoc contextMember;\r
- private StringBuffer output = new StringBuffer();\r
- private Stack tagStack = new Stack();\r
- private boolean isLeadingTag = true;\r
- private boolean throwAwayLeadingPara = false;\r
-\r
- private static Map tagInfoMap;\r
-\r
- private static Set noTextParentTags;\r
-\r
- static {\r
- tagInfoMap = new HashMap();\r
- tagInfoMap.put("li", new TagInfo(new String[] { "ul", "ol", "nl", "menu", "dir" }));\r
- tagInfoMap.put("td", new TagInfo(new String[] { "tr" }));\r
- tagInfoMap.put("th", new TagInfo(new String[] { "tr" }));\r
- tagInfoMap.put("tr", new TagInfo(new String[] { "table" }));\r
- tagInfoMap.put("dt", new TagInfo(new String[] { "dl" }));\r
- tagInfoMap.put("dd", new TagInfo(new String[] { "dl" }));\r
- tagInfoMap.put("param", new TagInfo(new String[] { "applet" }));\r
-\r
- String[] noTextParentTagArr = {\r
- "area", "base", "body", "br", "dd", "dt", "head", "hr", "html", \r
- "img", "input", "link", "map", "meta", "ol", "optgroup", "param",\r
- "select", "table", "tbody", "tfoot", "thead", "tr", "ul",\r
- };\r
-\r
- noTextParentTags = new HashSet();\r
- for (int i=0; i<noTextParentTagArr.length; ++i) {\r
- noTextParentTags.add(noTextParentTagArr[i]);\r
- }\r
- }\r
-\r
- public HtmlRepairer(DocErrorReporter warningReporter, \r
- boolean noWarn, boolean noEmailWarn,\r
- ClassDoc contextClass, MemberDoc contextMember,\r
- boolean throwAwayLeadingPara) {\r
- this.warningReporter = warningReporter;\r
- this.noWarn = noWarn;\r
- this.noEmailWarn = noEmailWarn;\r
- this.contextClass = contextClass;\r
- this.contextMember = contextMember;\r
- this.throwAwayLeadingPara = throwAwayLeadingPara;\r
- }\r
- \r
- private static String replaceStr(String haystack, String needle, String replacement) {\r
- int ndx=haystack.indexOf(needle);\r
- if (ndx<0) \r
- return haystack;\r
- else \r
- return haystack.substring(0, ndx)+replacement\r
- + replaceStr(haystack.substring(ndx+needle.length()), needle, replacement);\r
- }\r
- \r
- private void haveText(String text) {\r
-\r
- if (isLeadingTag && throwAwayLeadingPara) {\r
- if (0 != text.trim().length()) {\r
- isLeadingTag = false;\r
- }\r
- }\r
-\r
- if (tagStack.isEmpty() || !noTextParentTags.contains(tagStack.peek())) {\r
-\r
- text = replaceStr(text, "<1", "<1");\r
- text = replaceStr(text, "&&", "&&");\r
- text = replaceStr(text, "& ", "& ");\r
- text = replaceStr(text, "&\t", "&\t");\r
- text = replaceStr(text, "&\r", "&\r");\r
- text = replaceStr(text, "&\n", "&\n");\r
- for (char c='0'; c<='9'; ++c)\r
- text = replaceStr(text, "&"+c, "&"+c);\r
- text = replaceStr(text, "\u00a7", "§");\r
- output.append(text);\r
- }\r
- else {\r
- printWarning("Discarded text in <" + tagStack.peek() + "> element");\r
- }\r
- }\r
-\r
- private void haveStartOrEndTag(String tag) {\r
-\r
- boolean _isLeadingTag = isLeadingTag;\r
- isLeadingTag = false;\r
-\r
- tag = tag.trim();\r
-\r
- boolean isEndTag = tag.startsWith("/");\r
- boolean isAtomTag = tag.endsWith("/");\r
-\r
- if (isEndTag && isAtomTag) {\r
- // got something like '</a/>' which is invalid.\r
- // suppose a close tag was intended.\r
- tag = tag.substring(0, tag.length()-1);\r
- }\r
-\r
- if (tag.length() < 1) {\r
- printWarning("Deleting broken tag");\r
- return;\r
- }\r
-\r
- String tagName = tag.substring(isEndTag?1:0, isAtomTag?tag.length()-1:tag.length());\r
- String tagAttributes = "";\r
-\r
- for (int i=0; i<tagName.length(); ++i) {\r
- if (" \t\r\n".indexOf(tagName.charAt(i))>=0) {\r
- tagAttributes = tagName.substring(i).trim();\r
- tagName = tagName.substring(0, i);\r
- break;\r
- }\r
- }\r
-\r
- if (!isEndTag && tagName.indexOf('@')>0) {\r
- if (!noEmailWarn) {\r
- printWarning("Tag looks like email address: <"+tagName+">");\r
- }\r
- output.append("<"+tag+">");\r
- return;\r
- }\r
-\r
- tagName = tagName.toLowerCase();\r
-\r
- if (_isLeadingTag && "p".equals(tagName) && !isEndTag && throwAwayLeadingPara) {\r
- return;\r
- }\r
-\r
- if ("p".equals(tagName) || "br".equals(tagName) || "hr".equals(tagName)) {\r
- // throw away </p> and </br>\r
- if (isEndTag) {\r
- return;\r
- }\r
- // make sure every <p> is a <p/> and every <br> is a <br/>\r
- else if (!isAtomTag) {\r
- tag += "/";\r
- isAtomTag = true;\r
- }\r
- }\r
-\r
- if (isEndTag) {\r
-\r
- // check whether this close tag is on the stack\r
- // if yes, close all tags up to this tag\r
- if (tagStack.contains(tagName)) {\r
- String popped;\r
- do {\r
- popped = (String)tagStack.pop();\r
- if (!popped.equals(tagName)) \r
- printWarning("Inserting '</"+popped+">");\r
- output.append("</"+popped+">");\r
- }\r
- while (!popped.equals(tagName));\r
- }\r
- // if not, just throw it away\r
- else {\r
- printWarning("Deleting <"+tag+">");\r
- }\r
- }\r
- else {\r
-\r
- final int STATE_INITIAL = 1;\r
- final int STATE_EXPECT_ATTRIBUTENAME = 2;\r
- final int STATE_UNQUOTED_ATTRIBUTEVALUE = 3;\r
- final int STATE_SINGLEQUOTE_ATTRIBUTEVALUE = 4;\r
- final int STATE_DOUBLEQUOTE_ATTRIBUTEVALUE = 5;\r
- final int STATE_EXPECT_ATTRIBUTEVALUE = 6;\r
- final int STATE_EXPECT_EQUALSIGN = 7;\r
-\r
- int state = STATE_INITIAL;\r
- \r
- String newAttributes = "";\r
- String attributeName = null;\r
- StringBuffer buf = new StringBuffer();\r
-\r
- char[] attrsAsChars = tagAttributes.toCharArray();\r
- for (int i=0, ilim=attrsAsChars.length+1; i<ilim; ++i) {\r
- int c;\r
- if (i<attrsAsChars.length)\r
- c = (int)attrsAsChars[i];\r
- else\r
- c = -1;\r
-\r
- switch (state) {\r
-\r
- case STATE_INITIAL:\r
- if (" \t\r\n".indexOf(c)>=0){\r
- continue;\r
- }\r
- else if (-1==c) {\r
- continue;\r
- }\r
- else {\r
- state = STATE_EXPECT_ATTRIBUTENAME;\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_EXPECT_ATTRIBUTENAME:\r
- if ('='==c) {\r
- attributeName = buf.toString();\r
- buf.setLength(0);\r
- state = STATE_EXPECT_ATTRIBUTEVALUE;\r
- }\r
- else if (-1==c) {\r
- attributeName = buf.toString();\r
- buf.setLength(0);\r
- printWarning("In Tag '"+tag+"':\nAttribute name without a value, inserting value =\""+attributeName+"\"");\r
- }\r
- else if (" \t\r\n".indexOf(c)>=0) {\r
- state = STATE_EXPECT_EQUALSIGN;\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_EXPECT_EQUALSIGN:\r
- if (" \t\r\n".indexOf(c)>=0){\r
- continue;\r
- }\r
- else if ('='==c) {\r
- state = STATE_EXPECT_ATTRIBUTEVALUE;\r
- attributeName = buf.toString();\r
- buf.setLength(0);\r
- }\r
- else {\r
- attributeName = buf.toString();\r
- buf.setLength(0);\r
- printWarning("In Tag '"+tag+"':\nAttribute name without a value, inserting value =\""+attributeName+"\"");\r
- newAttributes += " "+attributeName+"=\""+attributeName+"\"";\r
- buf.append((char)c);\r
- state = STATE_EXPECT_ATTRIBUTENAME;\r
- }\r
- break;\r
-\r
- case STATE_EXPECT_ATTRIBUTEVALUE:\r
- if (" \t\r\n".indexOf(c)>=0){\r
- continue;\r
- }\r
- else if ('\"'==c) {\r
- state = STATE_DOUBLEQUOTE_ATTRIBUTEVALUE;\r
- }\r
- else if ('\''==c) {\r
- state = STATE_SINGLEQUOTE_ATTRIBUTEVALUE;\r
- }\r
- else {\r
- state = STATE_UNQUOTED_ATTRIBUTEVALUE;\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_UNQUOTED_ATTRIBUTEVALUE:\r
- if (-1==c || " \t\r\n".indexOf(c)>=0){\r
- state = STATE_INITIAL;\r
- newAttributes += " "+attributeName + "=\"" + buf.toString() + "\"";\r
- buf.setLength(0);\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_SINGLEQUOTE_ATTRIBUTEVALUE:\r
- if ('\''==c) {\r
- state = STATE_INITIAL;\r
- newAttributes += " "+attributeName + "=\"" + buf.toString() + "\"";\r
- buf.setLength(0);\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_DOUBLEQUOTE_ATTRIBUTEVALUE:\r
- if ('\"'==c) {\r
- state = STATE_INITIAL;\r
- newAttributes += " "+attributeName + "=\"" + buf.toString() + "\"";\r
- buf.setLength(0);\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
- }\r
- }\r
-\r
-\r
- if (!isAtomTag) {\r
-\r
- // check whether this open tag is equal to the topmost\r
- // entry on the stack; if yes, emit a close tag first\r
- \r
- // corrects stuff like '<tr><td>...<td>...');\r
- if (!tagStack.isEmpty() && tagStack.peek().equals(tagName)) {\r
- printWarning("Inserting </"+tagName+">");\r
- output.append("</"+tagName+">");\r
- tagStack.pop();\r
- }\r
- else {\r
- processKnownChildTags(tagName, tagStack, output);\r
- }\r
-\r
- // otherwise, we assume there are no close tags required \r
- // before this open tag.\r
- tagStack.push(tagName);\r
-\r
- output.append("<"+tagName+newAttributes+">");\r
- }\r
- else {\r
- output.append("<"+tagName+newAttributes+"/>");\r
- }\r
- }\r
- }\r
-\r
- private boolean processKnownChildTags(String tagName, Stack tagStack, StringBuffer output) {\r
-\r
- TagInfo tagInfo = (TagInfo)tagInfoMap.get(tagName);\r
- if (null != tagInfo) {\r
-\r
- String parentTag = null;\r
- for (Enumeration en = tagStack.elements(); en.hasMoreElements(); ) {\r
- String tag = (String)en.nextElement();\r
- if (tagInfo.isLegalParentTag(tag)) {\r
- parentTag = tag;\r
- break;\r
- }\r
- }\r
- if (parentTag != null) {\r
- while (((String)tagStack.peek()) != parentTag) {\r
- String poppedTagName = (String)tagStack.pop();\r
- output.append("</"+poppedTagName+">");\r
- printWarning("Inserting </"+poppedTagName+">");\r
- }\r
- return true;\r
- }\r
- }\r
- return false;\r
- }\r
-\r
- private void flush() {\r
- \r
- // close all pending tags\r
- while (!tagStack.isEmpty()) {\r
- String tagName = (String)tagStack.pop();\r
- printWarning("Inserting </"+tagName+">");\r
- output.append("</"+tagName+">");\r
- }\r
- }\r
-\r
- /**\r
- * Takes HTML fragment and returns a well-formed XHTML\r
- * equivalent.\r
- *\r
- * In the returned String, all tags are properly closed and\r
- * nested.\r
- *\r
- * Currently, the returned String is not guaranteed to be\r
- * well-formed. In particular there are no checks on the tag\r
- * names, attribute names and entity names. \r
- */\r
- public String getWellformedHTML(String text) {\r
-\r
- final int STATE_INITIAL = 1;\r
- final int STATE_TAG_START = 2;\r
- final int STATE_TAG = 3;\r
- final int STATE_TAG_DOUBLEQUOTE = 4;\r
- final int STATE_TAG_SINGLEQUOTE = 5;\r
- final int STATE_AMP = 6;\r
-\r
- int state = STATE_INITIAL;\r
- output.setLength(0);\r
-\r
-\r
- StringBuffer buf = new StringBuffer();\r
- char[] textAsChars = text.toCharArray();\r
- \r
- outer_loop:\r
- for (int i=0, ilim=textAsChars.length+1; i<ilim; ++i) {\r
- int c;\r
-\r
- if (i<textAsChars.length) {\r
- c = textAsChars[i];\r
- }\r
- else {\r
- c = -1;\r
- }\r
-\r
- switch (state) {\r
-\r
- case STATE_INITIAL:\r
- if ('<'==c) {\r
- state = STATE_TAG_START;\r
- if (buf.length()>0) {\r
- haveText(buf.toString());\r
- buf.setLength(0);\r
- }\r
- }\r
- else if ('>'==c) {\r
- // assume this is a greater-than sign\r
- buf.append(">");\r
- }\r
- else if ('&'==c) {\r
- state = STATE_AMP;\r
- }\r
- else if (-1==c) {\r
- if (buf.length()>0) {\r
- haveText(buf.toString());\r
- buf.setLength(0);\r
- }\r
- continue;\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_AMP:\r
- if ('<'==c) {\r
- buf.append("&");\r
- state = STATE_TAG_START;\r
- if (buf.length()>0) {\r
- haveText(buf.toString());\r
- buf.setLength(0);\r
- }\r
- }\r
- else if ('>'==c) {\r
- // assume this is a greater-than sign\r
- buf.append("&");\r
- buf.append(">");\r
- state = STATE_INITIAL;\r
- }\r
- else if ('&'==c) {\r
- buf.append("&");\r
- buf.append("&");\r
- state = STATE_INITIAL;\r
- }\r
- else if (-1==c) {\r
- buf.append("&");\r
- haveText(buf.toString());\r
- buf.setLength(0);\r
- state = STATE_INITIAL;\r
- continue;\r
- }\r
- else {\r
- // peek forward and see whether this is a valid entity.\r
- if ('#'==c) {\r
- buf.append("&");\r
- buf.append((char)c);\r
- state = STATE_INITIAL;\r
- continue outer_loop;\r
- }\r
- else if (Character.isLetter((char)c)) {\r
- for (int i2=i+1; i2<ilim-1; i2++) {\r
- if (';' == textAsChars[i2]) {\r
- buf.append("&");\r
- buf.append((char)c);\r
- state = STATE_INITIAL;\r
- continue outer_loop;\r
- }\r
- else if (!Character.isLetter((char)c)\r
- && !Character.isDigit((char)c)\r
- && ".-_:".indexOf((char)c) < 0\r
- //&& !isCombiningChar(c) // FIXME\r
- //&& !isExtender(c) // FIXME\r
- ) {\r
- break;\r
- }\r
- }\r
- // not a valid entity declaration; assume &\r
- }\r
- buf.append("&");\r
- buf.append((char)c);\r
- state = STATE_INITIAL; \r
- }\r
-\r
- /*\r
- else if ('#'==c || Character.isLetter((char)c)) {\r
- buf.append("&");\r
- buf.append((char)c);\r
- state = STATE_INITIAL;\r
- }\r
- else {\r
- buf.append("&");\r
- buf.append((char)c);\r
- state = STATE_INITIAL; \r
- }\r
- */\r
- break;\r
- \r
- case STATE_TAG_START:\r
- if (" \t\r\n".indexOf(c)>=0) {\r
- //continue;\r
-\r
- // new: assume this is a less-sign\r
- haveText("<"+c);\r
- state = STATE_INITIAL;\r
- }\r
- else if ('/'==c) {\r
- buf.append((char)c);\r
- state = STATE_TAG;\r
- }\r
- else if ('<'==c) {\r
- // assume this is a less-sign\r
- haveText("<<");\r
- state = STATE_INITIAL; \r
- }\r
- else if ('>'==c) {\r
- // assume this is a less-sign\r
- haveText("<>");\r
- state = STATE_INITIAL; \r
- }\r
- //else if ('-'==c || '+'==c || '='==c || '\''==c || "0123456789".indexOf(c)>=0) {\r
- else if (!Character.isLetter((char)c)) {\r
- // assume this is a less-sign\r
- haveText("<"+(char)c);\r
- state = STATE_INITIAL;\r
- }\r
- else {\r
- buf.append((char)c);\r
- state = STATE_TAG;\r
- }\r
- break;\r
- \r
- case STATE_TAG:\r
- if ('\"'==c) {\r
- buf.append((char)c);\r
- state = STATE_TAG_DOUBLEQUOTE;\r
- }\r
- else if ('\''==c) {\r
- buf.append((char)c);\r
- state = STATE_TAG_SINGLEQUOTE;\r
- }\r
- else if ('>'==c) {\r
- state = STATE_INITIAL;\r
- haveStartOrEndTag(buf.toString());\r
- buf.setLength(0);\r
- }\r
- else if ('<'==c) {\r
- // notify user, missing greater-than sign\r
- haveStartOrEndTag(buf.toString());\r
- buf.setLength(0);\r
- }\r
- else if (-1==c) {\r
- printWarning("Unclosed tag at end-of-comment: <"+buf);\r
- haveStartOrEndTag(buf.toString());\r
- buf.setLength(0);\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_TAG_DOUBLEQUOTE:\r
- if ('\"'==c) {\r
- buf.append((char)c);\r
- state = STATE_TAG;\r
- }\r
- else if (-1==c) {\r
- printWarning("Unclosed attribute value at end-of-comment.");\r
- haveStartOrEndTag(buf.toString()+"\"");\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
-\r
- case STATE_TAG_SINGLEQUOTE:\r
- if ('\''==c) {\r
- buf.append((char)c);\r
- state = STATE_TAG;\r
- }\r
- else if (-1==c) {\r
- printWarning("Unclosed attribute value at end-of-comment.");\r
- haveStartOrEndTag(buf.toString()+"'");\r
- }\r
- else {\r
- buf.append((char)c);\r
- }\r
- break;\r
- }\r
- }\r
-\r
- return output.toString();\r
- }\r
-\r
- private String getContext() {\r
- if (null != contextClass) {\r
- StringBuffer rc = new StringBuffer();\r
- rc.append(contextClass.qualifiedTypeName());\r
- if (null != contextMember) {\r
- rc.append("."+contextMember.toString());\r
- }\r
- return rc.toString();\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
-\r
- private void printWarning(String msg) {\r
- if (null != warningReporter && !noWarn) {\r
- String context = getContext();\r
- if (null != context) {\r
- warningReporter.printWarning("In "+getContext()+": "+msg);\r
- }\r
- else {\r
- warningReporter.printWarning("In overview page: "+msg);\r
- }\r
- }\r
- }\r
-\r
- public String terminateText() {\r
- output.setLength(0);\r
- flush();\r
- return output.toString();\r
- }\r
-}\r
-\r
+/* gnu.classpath.tools.doclets.xmldoclet.HtmlRepairer.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.doclets.xmldoclet;
+
+import java.io.*;
+import java.util.*;
+import com.sun.javadoc.DocErrorReporter;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.MemberDoc;
+
+/**
+ * Provides methods for tidying up HTML source.
+ *
+ * @author Julian Scheid
+ */
+public final class HtmlRepairer {
+
+ private static class TagInfo {
+
+ private Set parentTags = new HashSet();
+
+ public TagInfo(String parentTag) {
+ this.parentTags.add(parentTag);
+ }
+
+ public TagInfo(String[] parentTagArr) {
+ for (int i=0; i<parentTagArr.length; ++i) {
+ this.parentTags.add(parentTagArr[i]);
+ }
+ }
+
+ public boolean isLegalParentTag(String tag) {
+ return this.parentTags.contains(tag);
+ }
+ }
+
+ private DocErrorReporter warningReporter;
+ private boolean noWarn;
+ private boolean noEmailWarn;
+ private ClassDoc contextClass;
+ private MemberDoc contextMember;
+ private StringBuffer output = new StringBuffer();
+ private Stack tagStack = new Stack();
+ private boolean isLeadingTag = true;
+ private boolean throwAwayLeadingPara = false;
+
+ private static Map tagInfoMap;
+
+ private static Set noTextParentTags;
+
+ static {
+ tagInfoMap = new HashMap();
+ tagInfoMap.put("li", new TagInfo(new String[] { "ul", "ol", "nl", "menu", "dir" }));
+ tagInfoMap.put("td", new TagInfo(new String[] { "tr" }));
+ tagInfoMap.put("th", new TagInfo(new String[] { "tr" }));
+ tagInfoMap.put("tr", new TagInfo(new String[] { "table" }));
+ tagInfoMap.put("dt", new TagInfo(new String[] { "dl" }));
+ tagInfoMap.put("dd", new TagInfo(new String[] { "dl" }));
+ tagInfoMap.put("param", new TagInfo(new String[] { "applet" }));
+
+ String[] noTextParentTagArr = {
+ "area", "base", "body", "br", "dd", "dt", "head", "hr", "html",
+ "img", "input", "link", "map", "meta", "ol", "optgroup", "param",
+ "select", "table", "tbody", "tfoot", "thead", "tr", "ul",
+ };
+
+ noTextParentTags = new HashSet();
+ for (int i=0; i<noTextParentTagArr.length; ++i) {
+ noTextParentTags.add(noTextParentTagArr[i]);
+ }
+ }
+
+ public HtmlRepairer(DocErrorReporter warningReporter,
+ boolean noWarn, boolean noEmailWarn,
+ ClassDoc contextClass, MemberDoc contextMember,
+ boolean throwAwayLeadingPara) {
+ this.warningReporter = warningReporter;
+ this.noWarn = noWarn;
+ this.noEmailWarn = noEmailWarn;
+ this.contextClass = contextClass;
+ this.contextMember = contextMember;
+ this.throwAwayLeadingPara = throwAwayLeadingPara;
+ }
+
+ private static String replaceStr(String haystack, String needle, String replacement) {
+ int ndx=haystack.indexOf(needle);
+ if (ndx<0)
+ return haystack;
+ else
+ return haystack.substring(0, ndx)+replacement
+ + replaceStr(haystack.substring(ndx+needle.length()), needle, replacement);
+ }
+
+ private void haveText(String text) {
+
+ if (isLeadingTag && throwAwayLeadingPara) {
+ if (0 != text.trim().length()) {
+ isLeadingTag = false;
+ }
+ }
+
+ if (tagStack.isEmpty() || !noTextParentTags.contains(tagStack.peek())) {
+
+ text = replaceStr(text, "<1", "<1");
+ text = replaceStr(text, "&&", "&&");
+ text = replaceStr(text, "& ", "& ");
+ text = replaceStr(text, "&\t", "&\t");
+ text = replaceStr(text, "&\r", "&\r");
+ text = replaceStr(text, "&\n", "&\n");
+ for (char c='0'; c<='9'; ++c)
+ text = replaceStr(text, "&"+c, "&"+c);
+ text = replaceStr(text, "\u00a7", "§");
+ output.append(text);
+ }
+ else {
+ printWarning("Discarded text in <" + tagStack.peek() + "> element");
+ }
+ }
+
+ private void haveStartOrEndTag(String tag) {
+
+ boolean _isLeadingTag = isLeadingTag;
+ isLeadingTag = false;
+
+ tag = tag.trim();
+
+ boolean isEndTag = tag.startsWith("/");
+ boolean isAtomTag = tag.endsWith("/");
+
+ if (isEndTag && isAtomTag) {
+ // got something like '</a/>' which is invalid.
+ // suppose a close tag was intended.
+ tag = tag.substring(0, tag.length()-1);
+ }
+
+ if (tag.length() < 1) {
+ printWarning("Deleting broken tag");
+ return;
+ }
+
+ String tagName = tag.substring(isEndTag?1:0, isAtomTag?tag.length()-1:tag.length());
+ String tagAttributes = "";
+
+ for (int i=0; i<tagName.length(); ++i) {
+ if (" \t\r\n".indexOf(tagName.charAt(i))>=0) {
+ tagAttributes = tagName.substring(i).trim();
+ tagName = tagName.substring(0, i);
+ break;
+ }
+ }
+
+ if (!isEndTag && tagName.indexOf('@')>0) {
+ if (!noEmailWarn) {
+ printWarning("Tag looks like email address: <"+tagName+">");
+ }
+ output.append("<"+tag+">");
+ return;
+ }
+
+ tagName = tagName.toLowerCase();
+
+ if (_isLeadingTag && "p".equals(tagName) && !isEndTag && throwAwayLeadingPara) {
+ return;
+ }
+
+ if ("p".equals(tagName) || "br".equals(tagName) || "hr".equals(tagName)) {
+ // throw away </p> and </br>
+ if (isEndTag) {
+ return;
+ }
+ // make sure every <p> is a <p/> and every <br> is a <br/>
+ else if (!isAtomTag) {
+ tag += "/";
+ isAtomTag = true;
+ }
+ }
+
+ if (isEndTag) {
+
+ // check whether this close tag is on the stack
+ // if yes, close all tags up to this tag
+ if (tagStack.contains(tagName)) {
+ String popped;
+ do {
+ popped = (String)tagStack.pop();
+ if (!popped.equals(tagName))
+ printWarning("Inserting '</"+popped+">");
+ output.append("</"+popped+">");
+ }
+ while (!popped.equals(tagName));
+ }
+ // if not, just throw it away
+ else {
+ printWarning("Deleting <"+tag+">");
+ }
+ }
+ else {
+
+ final int STATE_INITIAL = 1;
+ final int STATE_EXPECT_ATTRIBUTENAME = 2;
+ final int STATE_UNQUOTED_ATTRIBUTEVALUE = 3;
+ final int STATE_SINGLEQUOTE_ATTRIBUTEVALUE = 4;
+ final int STATE_DOUBLEQUOTE_ATTRIBUTEVALUE = 5;
+ final int STATE_EXPECT_ATTRIBUTEVALUE = 6;
+ final int STATE_EXPECT_EQUALSIGN = 7;
+
+ int state = STATE_INITIAL;
+
+ String newAttributes = "";
+ String attributeName = null;
+ StringBuffer buf = new StringBuffer();
+
+ char[] attrsAsChars = tagAttributes.toCharArray();
+ for (int i=0, ilim=attrsAsChars.length+1; i<ilim; ++i) {
+ int c;
+ if (i<attrsAsChars.length)
+ c = (int)attrsAsChars[i];
+ else
+ c = -1;
+
+ switch (state) {
+
+ case STATE_INITIAL:
+ if (" \t\r\n".indexOf(c)>=0){
+ continue;
+ }
+ else if (-1==c) {
+ continue;
+ }
+ else {
+ state = STATE_EXPECT_ATTRIBUTENAME;
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_EXPECT_ATTRIBUTENAME:
+ if ('='==c) {
+ attributeName = buf.toString();
+ buf.setLength(0);
+ state = STATE_EXPECT_ATTRIBUTEVALUE;
+ }
+ else if (-1==c) {
+ attributeName = buf.toString();
+ buf.setLength(0);
+ printWarning("In Tag '"+tag+"':\nAttribute name without a value, inserting value =\""+attributeName+"\"");
+ }
+ else if (" \t\r\n".indexOf(c)>=0) {
+ state = STATE_EXPECT_EQUALSIGN;
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_EXPECT_EQUALSIGN:
+ if (" \t\r\n".indexOf(c)>=0){
+ continue;
+ }
+ else if ('='==c) {
+ state = STATE_EXPECT_ATTRIBUTEVALUE;
+ attributeName = buf.toString();
+ buf.setLength(0);
+ }
+ else {
+ attributeName = buf.toString();
+ buf.setLength(0);
+ printWarning("In Tag '"+tag+"':\nAttribute name without a value, inserting value =\""+attributeName+"\"");
+ newAttributes += " "+attributeName+"=\""+attributeName+"\"";
+ buf.append((char)c);
+ state = STATE_EXPECT_ATTRIBUTENAME;
+ }
+ break;
+
+ case STATE_EXPECT_ATTRIBUTEVALUE:
+ if (" \t\r\n".indexOf(c)>=0){
+ continue;
+ }
+ else if ('\"'==c) {
+ state = STATE_DOUBLEQUOTE_ATTRIBUTEVALUE;
+ }
+ else if ('\''==c) {
+ state = STATE_SINGLEQUOTE_ATTRIBUTEVALUE;
+ }
+ else {
+ state = STATE_UNQUOTED_ATTRIBUTEVALUE;
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_UNQUOTED_ATTRIBUTEVALUE:
+ if (-1==c || " \t\r\n".indexOf(c)>=0){
+ state = STATE_INITIAL;
+ newAttributes += " "+attributeName + "=\"" + buf.toString() + "\"";
+ buf.setLength(0);
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_SINGLEQUOTE_ATTRIBUTEVALUE:
+ if ('\''==c) {
+ state = STATE_INITIAL;
+ newAttributes += " "+attributeName + "=\"" + buf.toString() + "\"";
+ buf.setLength(0);
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_DOUBLEQUOTE_ATTRIBUTEVALUE:
+ if ('\"'==c) {
+ state = STATE_INITIAL;
+ newAttributes += " "+attributeName + "=\"" + buf.toString() + "\"";
+ buf.setLength(0);
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+ }
+ }
+
+
+ if (!isAtomTag) {
+
+ // check whether this open tag is equal to the topmost
+ // entry on the stack; if yes, emit a close tag first
+
+ // corrects stuff like '<tr><td>...<td>...');
+ if (!tagStack.isEmpty() && tagStack.peek().equals(tagName)) {
+ printWarning("Inserting </"+tagName+">");
+ output.append("</"+tagName+">");
+ tagStack.pop();
+ }
+ else {
+ processKnownChildTags(tagName, tagStack, output);
+ }
+
+ // otherwise, we assume there are no close tags required
+ // before this open tag.
+ tagStack.push(tagName);
+
+ output.append("<"+tagName+newAttributes+">");
+ }
+ else {
+ output.append("<"+tagName+newAttributes+"/>");
+ }
+ }
+ }
+
+ private boolean processKnownChildTags(String tagName, Stack tagStack, StringBuffer output) {
+
+ TagInfo tagInfo = (TagInfo)tagInfoMap.get(tagName);
+ if (null != tagInfo) {
+
+ String parentTag = null;
+ for (Enumeration en = tagStack.elements(); en.hasMoreElements(); ) {
+ String tag = (String)en.nextElement();
+ if (tagInfo.isLegalParentTag(tag)) {
+ parentTag = tag;
+ break;
+ }
+ }
+ if (parentTag != null) {
+ while (((String)tagStack.peek()) != parentTag) {
+ String poppedTagName = (String)tagStack.pop();
+ output.append("</"+poppedTagName+">");
+ printWarning("Inserting </"+poppedTagName+">");
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void flush() {
+
+ // close all pending tags
+ while (!tagStack.isEmpty()) {
+ String tagName = (String)tagStack.pop();
+ printWarning("Inserting </"+tagName+">");
+ output.append("</"+tagName+">");
+ }
+ }
+
+ /**
+ * Takes HTML fragment and returns a well-formed XHTML
+ * equivalent.
+ *
+ * In the returned String, all tags are properly closed and
+ * nested.
+ *
+ * Currently, the returned String is not guaranteed to be
+ * well-formed. In particular there are no checks on the tag
+ * names, attribute names and entity names.
+ */
+ public String getWellformedHTML(String text) {
+
+ final int STATE_INITIAL = 1;
+ final int STATE_TAG_START = 2;
+ final int STATE_TAG = 3;
+ final int STATE_TAG_DOUBLEQUOTE = 4;
+ final int STATE_TAG_SINGLEQUOTE = 5;
+ final int STATE_AMP = 6;
+
+ int state = STATE_INITIAL;
+ output.setLength(0);
+
+
+ StringBuffer buf = new StringBuffer();
+ char[] textAsChars = text.toCharArray();
+
+ outer_loop:
+ for (int i=0, ilim=textAsChars.length+1; i<ilim; ++i) {
+ int c;
+
+ if (i<textAsChars.length) {
+ c = textAsChars[i];
+ }
+ else {
+ c = -1;
+ }
+
+ switch (state) {
+
+ case STATE_INITIAL:
+ if ('<'==c) {
+ state = STATE_TAG_START;
+ if (buf.length()>0) {
+ haveText(buf.toString());
+ buf.setLength(0);
+ }
+ }
+ else if ('>'==c) {
+ // assume this is a greater-than sign
+ buf.append(">");
+ }
+ else if ('&'==c) {
+ state = STATE_AMP;
+ }
+ else if (-1==c) {
+ if (buf.length()>0) {
+ haveText(buf.toString());
+ buf.setLength(0);
+ }
+ continue;
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_AMP:
+ if ('<'==c) {
+ buf.append("&");
+ state = STATE_TAG_START;
+ if (buf.length()>0) {
+ haveText(buf.toString());
+ buf.setLength(0);
+ }
+ }
+ else if ('>'==c) {
+ // assume this is a greater-than sign
+ buf.append("&");
+ buf.append(">");
+ state = STATE_INITIAL;
+ }
+ else if ('&'==c) {
+ buf.append("&");
+ buf.append("&");
+ state = STATE_INITIAL;
+ }
+ else if (-1==c) {
+ buf.append("&");
+ haveText(buf.toString());
+ buf.setLength(0);
+ state = STATE_INITIAL;
+ continue;
+ }
+ else {
+ // peek forward and see whether this is a valid entity.
+ if ('#'==c) {
+ buf.append("&");
+ buf.append((char)c);
+ state = STATE_INITIAL;
+ continue outer_loop;
+ }
+ else if (Character.isLetter((char)c)) {
+ for (int i2=i+1; i2<ilim-1; i2++) {
+ if (';' == textAsChars[i2]) {
+ buf.append("&");
+ buf.append((char)c);
+ state = STATE_INITIAL;
+ continue outer_loop;
+ }
+ else if (!Character.isLetter((char)c)
+ && !Character.isDigit((char)c)
+ && ".-_:".indexOf((char)c) < 0
+ //&& !isCombiningChar(c) // FIXME
+ //&& !isExtender(c) // FIXME
+ ) {
+ break;
+ }
+ }
+ // not a valid entity declaration; assume &
+ }
+ buf.append("&");
+ buf.append((char)c);
+ state = STATE_INITIAL;
+ }
+
+ /*
+ else if ('#'==c || Character.isLetter((char)c)) {
+ buf.append("&");
+ buf.append((char)c);
+ state = STATE_INITIAL;
+ }
+ else {
+ buf.append("&");
+ buf.append((char)c);
+ state = STATE_INITIAL;
+ }
+ */
+ break;
+
+ case STATE_TAG_START:
+ if (" \t\r\n".indexOf(c)>=0) {
+ //continue;
+
+ // new: assume this is a less-sign
+ haveText("<"+c);
+ state = STATE_INITIAL;
+ }
+ else if ('/'==c) {
+ buf.append((char)c);
+ state = STATE_TAG;
+ }
+ else if ('<'==c) {
+ // assume this is a less-sign
+ haveText("<<");
+ state = STATE_INITIAL;
+ }
+ else if ('>'==c) {
+ // assume this is a less-sign
+ haveText("<>");
+ state = STATE_INITIAL;
+ }
+ //else if ('-'==c || '+'==c || '='==c || '\''==c || "0123456789".indexOf(c)>=0) {
+ else if (!Character.isLetter((char)c)) {
+ // assume this is a less-sign
+ haveText("<"+(char)c);
+ state = STATE_INITIAL;
+ }
+ else {
+ buf.append((char)c);
+ state = STATE_TAG;
+ }
+ break;
+
+ case STATE_TAG:
+ if ('\"'==c) {
+ buf.append((char)c);
+ state = STATE_TAG_DOUBLEQUOTE;
+ }
+ else if ('\''==c) {
+ buf.append((char)c);
+ state = STATE_TAG_SINGLEQUOTE;
+ }
+ else if ('>'==c) {
+ state = STATE_INITIAL;
+ haveStartOrEndTag(buf.toString());
+ buf.setLength(0);
+ }
+ else if ('<'==c) {
+ // notify user, missing greater-than sign
+ haveStartOrEndTag(buf.toString());
+ buf.setLength(0);
+ }
+ else if (-1==c) {
+ printWarning("Unclosed tag at end-of-comment: <"+buf);
+ haveStartOrEndTag(buf.toString());
+ buf.setLength(0);
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_TAG_DOUBLEQUOTE:
+ if ('\"'==c) {
+ buf.append((char)c);
+ state = STATE_TAG;
+ }
+ else if (-1==c) {
+ printWarning("Unclosed attribute value at end-of-comment.");
+ haveStartOrEndTag(buf.toString()+"\"");
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+
+ case STATE_TAG_SINGLEQUOTE:
+ if ('\''==c) {
+ buf.append((char)c);
+ state = STATE_TAG;
+ }
+ else if (-1==c) {
+ printWarning("Unclosed attribute value at end-of-comment.");
+ haveStartOrEndTag(buf.toString()+"'");
+ }
+ else {
+ buf.append((char)c);
+ }
+ break;
+ }
+ }
+
+ return output.toString();
+ }
+
+ private String getContext() {
+ if (null != contextClass) {
+ StringBuffer rc = new StringBuffer();
+ rc.append(contextClass.qualifiedTypeName());
+ if (null != contextMember) {
+ rc.append("."+contextMember.toString());
+ }
+ return rc.toString();
+ }
+ else {
+ return null;
+ }
+ }
+
+ private void printWarning(String msg) {
+ if (null != warningReporter && !noWarn) {
+ String context = getContext();
+ if (null != context) {
+ warningReporter.printWarning("In "+getContext()+": "+msg);
+ }
+ else {
+ warningReporter.printWarning("In overview page: "+msg);
+ }
+ }
+ }
+
+ public String terminateText() {
+ output.setLength(0);
+ flush();
+ return output.toString();
+ }
+}
+
-/* gnu.classpath.tools.doclets.xmldoclet.TargetContext\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.doclets.xmldoclet;\r
-\r
-import java.io.File;\r
-import java.io.InputStream;\r
-import java.io.OutputStream;\r
-import java.io.FileInputStream;\r
-import java.io.FileOutputStream;\r
-import java.io.IOException;\r
-\r
-import java.net.URL;\r
-\r
-import java.util.List;\r
-import java.util.Iterator;\r
-import java.util.Map;\r
-import java.util.HashMap;\r
-\r
-import gnu.classpath.tools.doclets.xmldoclet.doctranslet.DocTranslet;\r
-\r
-/**\r
- * Stores any XSL transformation and postprocessing-specific\r
- * information given by the user on the doclet command line.\r
- *\r
- * @author Julian Scheid\r
- */\r
-public class TargetContext {\r
-\r
- /**\r
- * The DocTranslet to use for processing doclet output.\r
- */\r
- private DocTranslet docTranslet;\r
-\r
- /**\r
- * Directory to write final output to.\r
- */\r
- private File targetDirectory;\r
-\r
- /**\r
- * Directory where XSLT output will be written to. If an XSLT\r
- * sheet was specified, but no postprocessing driver was given,\r
- * this is the target directory specified by the user. Otherwise,\r
- * this is a temporary directory.\r
- */\r
- private File xsltTargetDirectory;\r
-\r
-\r
- public TargetContext(DocTranslet docTranslet, File targetDirectory) {\r
- this.docTranslet = docTranslet;\r
- this.targetDirectory = targetDirectory;\r
- }\r
-\r
- public File getTargetDirectory() {\r
- return targetDirectory;\r
- }\r
-\r
- public void setTargetDirectory(File targetDirectory) {\r
- this.targetDirectory = targetDirectory;\r
- }\r
-\r
- public DocTranslet getDocTranslet() {\r
- return docTranslet;\r
- }\r
-\r
- public void setDocTranslet(DocTranslet docTranslet) {\r
- this.docTranslet = docTranslet;\r
- }\r
-}\r
+/* gnu.classpath.tools.doclets.xmldoclet.TargetContext
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.doclets.xmldoclet;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import java.net.URL;
+
+import java.util.List;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
+
+import gnu.classpath.tools.doclets.xmldoclet.doctranslet.DocTranslet;
+
+/**
+ * Stores any XSL transformation and postprocessing-specific
+ * information given by the user on the doclet command line.
+ *
+ * @author Julian Scheid
+ */
+public class TargetContext {
+
+ /**
+ * The DocTranslet to use for processing doclet output.
+ */
+ private DocTranslet docTranslet;
+
+ /**
+ * Directory to write final output to.
+ */
+ private File targetDirectory;
+
+ /**
+ * Directory where XSLT output will be written to. If an XSLT
+ * sheet was specified, but no postprocessing driver was given,
+ * this is the target directory specified by the user. Otherwise,
+ * this is a temporary directory.
+ */
+ private File xsltTargetDirectory;
+
+
+ public TargetContext(DocTranslet docTranslet, File targetDirectory) {
+ this.docTranslet = docTranslet;
+ this.targetDirectory = targetDirectory;
+ }
+
+ public File getTargetDirectory() {
+ return targetDirectory;
+ }
+
+ public void setTargetDirectory(File targetDirectory) {
+ this.targetDirectory = targetDirectory;
+ }
+
+ public DocTranslet getDocTranslet() {
+ return docTranslet;
+ }
+
+ public void setDocTranslet(DocTranslet docTranslet) {
+ this.docTranslet = docTranslet;
+ }
+}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.xmldoclet.doctranslet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.xmldoclet.doctranslet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.xmldoclet.doctranslet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.xmldoclet.doctranslet;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.doclets.xmldoclet.doctranslet;
-/* gnu.classpath.tools.doclets.xmldoclet.doctranslet.OutputFileInfo\r
- Copyright (C) 2003 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.doclets.xmldoclet.doctranslet;\r
-\r
-/**\r
- * Holds information about a file to be generated by the DocTranslet.\r
- */\r
-public class OutputFileInfo {\r
-\r
- private String name;\r
- private String source;\r
- private String sheet;\r
- private String comment;\r
- private String info;\r
-\r
- public OutputFileInfo(String name, String source, String sheet, String comment, String info) {\r
- this.name = name;\r
- this.source = source;\r
- this.sheet = sheet;\r
- this.comment = comment;\r
- this.info = info;\r
- }\r
-\r
- public String getName() { return name; }\r
- public String getSource() { return source; }\r
- public String getSheet() { return sheet; }\r
- public String getComment() { return comment; }\r
- public String getInfo() { return info; }\r
-\r
- public String toString() { return "OutputFileInfo{name="+name+",source="+source+",sheet="+sheet+",comment="+comment+",info="+info+"}"; }\r
-}\r
+/* gnu.classpath.tools.doclets.xmldoclet.doctranslet.OutputFileInfo
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.doclets.xmldoclet.doctranslet;
+
+/**
+ * Holds information about a file to be generated by the DocTranslet.
+ */
+public class OutputFileInfo {
+
+ private String name;
+ private String source;
+ private String sheet;
+ private String comment;
+ private String info;
+
+ public OutputFileInfo(String name, String source, String sheet, String comment, String info) {
+ this.name = name;
+ this.source = source;
+ this.sheet = sheet;
+ this.comment = comment;
+ this.info = info;
+ }
+
+ public String getName() { return name; }
+ public String getSource() { return source; }
+ public String getSheet() { return sheet; }
+ public String getComment() { return comment; }
+ public String getInfo() { return info; }
+
+ public String toString() { return "OutputFileInfo{name="+name+",source="+source+",sheet="+sheet+",comment="+comment+",info="+info+"}"; }
+}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 02111-1307 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from
+ or based on this library. If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
-/* gnu.classpath.tools.gjdoc.ErrorReporter\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.gjdoc;\r
-\r
-import com.sun.javadoc.*;\r
-import java.io.*;\r
-import java.util.*;\r
-import java.lang.reflect.*;\r
-\r
-/**\r
- * Simple implementation of a <code>DocErrorReporter</code>: writes\r
- * to <code>System.err</code>.\r
- */\r
-public class ErrorReporter implements DocErrorReporter {\r
-\r
- private PrintStream out;\r
-\r
- /**\r
- * Keeps track of the number of errors occured\r
- * during generation.\r
- */\r
- private int errorCount=0;\r
-\r
- /**\r
- * Keeps track of the number of warnings occured\r
- * during generation.\r
- */\r
- private int warningCount=0;\r
-\r
- /*\r
- * When <code>true</code>, no notices will be emitted.\r
- */\r
- private boolean quiet = false;\r
- \r
- /*\r
- * When <code>true</code>, no warnings will be emitted.\r
- */\r
- private boolean noWarn = false;\r
-\r
- public ErrorReporter()\r
- {\r
- this.out = System.err;\r
- }\r
-\r
- // Print error message, increment error count. \r
- public void printError(java.lang.String msg) {\r
- out.println("ERROR: "+msg);\r
- ++errorCount;\r
- }\r
-\r
- // Print error message, increment error count. \r
- public void printFatal(java.lang.String msg) {\r
- out.println("FATAL: "+msg);\r
- System.exit(10);\r
- }\r
-\r
- // Print a message. \r
- public void printNotice(java.lang.String msg) {\r
- if (!quiet) {\r
- out.println(msg);\r
- }\r
- }\r
- \r
- // Print warning message, increment warning count. \r
- public void printWarning(java.lang.String msg) {\r
- if (!noWarn) {\r
- out.println("WARNING: "+msg);\r
- ++warningCount;;\r
- }\r
- }\r
-\r
- public int getErrorCount() {\r
- return errorCount;\r
- }\r
-\r
- public int getWarningCount() {\r
- return warningCount;\r
- }\r
-\r
- /**\r
- * Specify whether notices should be printed.\r
- */\r
- public void setQuiet(boolean quiet) {\r
- this.quiet = quiet;\r
- }\r
-}\r
+/* gnu.classpath.tools.gjdoc.ErrorReporter
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.gjdoc;
+
+import com.sun.javadoc.*;
+import java.io.*;
+import java.util.*;
+import java.lang.reflect.*;
+
+/**
+ * Simple implementation of a <code>DocErrorReporter</code>: writes
+ * to <code>System.err</code>.
+ */
+public class ErrorReporter implements DocErrorReporter {
+
+ private PrintStream out;
+
+ /**
+ * Keeps track of the number of errors occured
+ * during generation.
+ */
+ private int errorCount=0;
+
+ /**
+ * Keeps track of the number of warnings occured
+ * during generation.
+ */
+ private int warningCount=0;
+
+ /*
+ * When <code>true</code>, no notices will be emitted.
+ */
+ private boolean quiet = false;
+
+ /*
+ * When <code>true</code>, no warnings will be emitted.
+ */
+ private boolean noWarn = false;
+
+ public ErrorReporter()
+ {
+ this.out = System.err;
+ }
+
+ // Print error message, increment error count.
+ public void printError(java.lang.String msg) {
+ out.println("ERROR: "+msg);
+ ++errorCount;
+ }
+
+ // Print error message, increment error count.
+ public void printFatal(java.lang.String msg) {
+ out.println("FATAL: "+msg);
+ System.exit(10);
+ }
+
+ // Print a message.
+ public void printNotice(java.lang.String msg) {
+ if (!quiet) {
+ out.println(msg);
+ }
+ }
+
+ // Print warning message, increment warning count.
+ public void printWarning(java.lang.String msg) {
+ if (!noWarn) {
+ out.println("WARNING: "+msg);
+ ++warningCount;;
+ }
+ }
+
+ public int getErrorCount() {
+ return errorCount;
+ }
+
+ public int getWarningCount() {
+ return warningCount;
+ }
+
+ /**
+ * Specify whether notices should be printed.
+ */
+ public void setQuiet(boolean quiet) {
+ this.quiet = quiet;
+ }
+}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 02111-1307 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from
+ or based on this library. If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 02111-1307 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from
+ or based on this library. If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
-/* gnu.classpath.tools.gjdoc.TemporaryStore\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.gjdoc;\r
-\r
-/**\r
- * Useful for passing big objects that are no longer needed by the\r
- * calling method, reducing memory usage. <p/>\r
- *\r
- * Consider the following problem:\r
- * <pre>\r
- * public class A {\r
- * public static void foo() {\r
- * long[] hugeArray = new long[1000000]; // takes around 8 MB\r
- * // ... fill hugeArray with some information ...\r
- * bar(hugeArray);\r
- * // ... hugeArray is no more required at this point\r
- * }\r
- * public static void bar(long[] arr) {\r
- * // ... process contents of arr ...\r
- * arr = null;\r
- * System.gc(); // NOTE: will not collect arr!\r
- * // ... do something memory-intensive where arr is not needed\r
- * }\r
- * }\r
- * </pre>\r
- *\r
- * In method <code>bar()</code>, the array cannot be garbage\r
- * collected because the local variable <code>hugeArray</code> in\r
- * method <code>foo()</code> still holds a reference to the array.\r
- * <p/>\r
- *\r
- * When calling <code>bar(new long[1000000]);</code> in\r
- * <code>arr</code> the array <i>can</i> be collected in\r
- * <code>bar()</code>, but that way it can't be initialized in\r
- * <code>foo()</code>. A local variable is needed for\r
- * initialization, but the variable can't be cleared before it is\r
- * passed to <code>bar()</code>! <p/>\r
- *\r
- * <code>TemporaryStore</code> is the solution for this\r
- * dilemma. The modified method <code>foo()</code> which uses a\r
- * <code>TemporaryStore</code> object would look like this:\r
- *\r
- * <pre>\r
- * public static void foo() {\r
- * long[] hugeArray = new long[1000000]; // takes around 7 MB\r
- * // ... fill hugeArray with some very important information ...\r
- * TemporaryStore tstore = new TemporaryStore(hugeArray);\r
- * hugeArray = null;\r
- * bar((long[])tstore.getAndClear());\r
- * }\r
- * </pre>\r
- *\r
- * When control flow is transferred to <code>bar()</code>,\r
- * <code>foo()</code> will hold no more references to the array\r
- * and so it can be garbage collected in <code>bar()</code>.\r
- * \r
- */\r
-public class TemporaryStore {\r
-\r
- private Object storedObject;\r
-\r
- /**\r
- * Temporarily store the given object for passing it to a\r
- * different method. <p/>\r
- *\r
- * The method constructing a new TemporaryStore object should\r
- * clear all other references to the stored object, so that\r
- * this TemporaryStore is the only object referencing it.\r
- *\r
- * @param storedObject the object to store temporarily\r
- *\r
- */\r
- public TemporaryStore(Object storedObject) {\r
- this.storedObject = storedObject;\r
- }\r
-\r
- /**\r
- * Return the stored object after clearing the reference to it.\r
- * <p/>\r
- *\r
- * When the user of this class followed the recommendations in\r
- * the documentation of @link{TemporaryStore(Object)}, the\r
- * returned reference will be the only reference to the stored\r
- * object after this method returns. If the returned reference\r
- * is passed in a method call, the called method will hold the\r
- * only reference to the stored object and can release it by\r
- * nulling the corresponding parameter.\r
- *\r
- * @return the object which was passed to the constructor.\r
- *\r
- */\r
- public Object getAndClear() {\r
- Object rc = this.storedObject;\r
- this.storedObject = null;\r
- return rc;\r
- }\r
-}\r
+/* gnu.classpath.tools.gjdoc.TemporaryStore
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.gjdoc;
+
+/**
+ * Useful for passing big objects that are no longer needed by the
+ * calling method, reducing memory usage. <p/>
+ *
+ * Consider the following problem:
+ * <pre>
+ * public class A {
+ * public static void foo() {
+ * long[] hugeArray = new long[1000000]; // takes around 8 MB
+ * // ... fill hugeArray with some information ...
+ * bar(hugeArray);
+ * // ... hugeArray is no more required at this point
+ * }
+ * public static void bar(long[] arr) {
+ * // ... process contents of arr ...
+ * arr = null;
+ * System.gc(); // NOTE: will not collect arr!
+ * // ... do something memory-intensive where arr is not needed
+ * }
+ * }
+ * </pre>
+ *
+ * In method <code>bar()</code>, the array cannot be garbage
+ * collected because the local variable <code>hugeArray</code> in
+ * method <code>foo()</code> still holds a reference to the array.
+ * <p/>
+ *
+ * When calling <code>bar(new long[1000000]);</code> in
+ * <code>arr</code> the array <i>can</i> be collected in
+ * <code>bar()</code>, but that way it can't be initialized in
+ * <code>foo()</code>. A local variable is needed for
+ * initialization, but the variable can't be cleared before it is
+ * passed to <code>bar()</code>! <p/>
+ *
+ * <code>TemporaryStore</code> is the solution for this
+ * dilemma. The modified method <code>foo()</code> which uses a
+ * <code>TemporaryStore</code> object would look like this:
+ *
+ * <pre>
+ * public static void foo() {
+ * long[] hugeArray = new long[1000000]; // takes around 7 MB
+ * // ... fill hugeArray with some very important information ...
+ * TemporaryStore tstore = new TemporaryStore(hugeArray);
+ * hugeArray = null;
+ * bar((long[])tstore.getAndClear());
+ * }
+ * </pre>
+ *
+ * When control flow is transferred to <code>bar()</code>,
+ * <code>foo()</code> will hold no more references to the array
+ * and so it can be garbage collected in <code>bar()</code>.
+ *
+ */
+public class TemporaryStore {
+
+ private Object storedObject;
+
+ /**
+ * Temporarily store the given object for passing it to a
+ * different method. <p/>
+ *
+ * The method constructing a new TemporaryStore object should
+ * clear all other references to the stored object, so that
+ * this TemporaryStore is the only object referencing it.
+ *
+ * @param storedObject the object to store temporarily
+ *
+ */
+ public TemporaryStore(Object storedObject) {
+ this.storedObject = storedObject;
+ }
+
+ /**
+ * Return the stored object after clearing the reference to it.
+ * <p/>
+ *
+ * When the user of this class followed the recommendations in
+ * the documentation of @link{TemporaryStore(Object)}, the
+ * returned reference will be the only reference to the stored
+ * object after this method returns. If the returned reference
+ * is passed in a method call, the called method will hold the
+ * only reference to the stored object and can release it by
+ * nulling the corresponding parameter.
+ *
+ * @return the object which was passed to the constructor.
+ *
+ */
+ public Object getAndClear() {
+ Object rc = this.storedObject;
+ this.storedObject = null;
+ return rc;
+ }
+}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc;
-/* gnu.classpath.tools.gjdoc.WritableType\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.gjdoc;\r
-\r
-public interface WritableType extends Cloneable {\r
-\r
- public void setDimension(String dimension);\r
- public Object clone() throws CloneNotSupportedException;\r
-}\r
+/* gnu.classpath.tools.gjdoc.WritableType
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.gjdoc;
+
+public interface WritableType extends Cloneable {
+
+ public void setDimension(String dimension);
+ public Object clone() throws CloneNotSupportedException;
+}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.gjdoc.expr;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
/** Java2xhtml.java Version 0.9
* Produces an XHTML file from Java source code with syntax highlighting,
ClassWrapper superClass;
- ArrayList interfaceClasses;
+ ArrayList<ClassWrapper> interfaceClasses;
// The virtual table for this class.
- ArrayList vtable;
+ ArrayList<MethodNode> vtable;
// A set of all the bridge method targets we've found.
- HashSet bridgeTargets;
+ HashSet<String> bridgeTargets;
// A set of all the method names in this class.
- HashSet methodNames = new HashSet();
+ HashSet<String> methodNames = new HashSet<String>();
// This maps a method name + descriptor, e.g. "method()V", to the
// name chosen for the method. This is used when computing the
// names of bridge method targets.
- HashMap methodNameMap = new HashMap();
+ HashMap<String,String> methodNameMap = new HashMap<String,String>();
public ClassWrapper(Main classpath)
{
public boolean hasNativeMethod()
{
- Iterator i = methods.iterator();
+ Iterator<?> i = methods.iterator();
while (i.hasNext())
{
MethodNode method = (MethodNode) i.next();
return false;
}
- private void linkSupers() throws IOException
+ void linkSupers() throws IOException
{
if (superName == null)
{
{
superClass = classpath.getClass(superName);
assert interfaceClasses == null;
- interfaceClasses = new ArrayList();
+ interfaceClasses = new ArrayList<ClassWrapper>();
for (int i = 0; i < interfaces.size(); ++i)
{
String ifname = (String) interfaces.get(i);
{
for (int i = vtable.size() - 1; i >= 0; --i)
{
- MethodNode base = (MethodNode) vtable.get(i);
+ MethodNode base = vtable.get(i);
if (MethodHelper.overrides(method, base))
return i;
}
private void addInterfaceMethods(ClassWrapper iface)
{
- Iterator i = iface.methods.iterator();
+ Iterator<?> i = iface.methods.iterator();
while (i.hasNext())
{
MethodNode im = (MethodNode) i.next();
{
if (base.interfaceClasses == null)
return;
- Iterator i = base.interfaceClasses.iterator();
+ Iterator<?> i = base.interfaceClasses.iterator();
while (i.hasNext())
{
ClassWrapper iface = (ClassWrapper) i.next();
private void addLocalMethods()
{
- Iterator i = methods.iterator();
+ Iterator<?> i = methods.iterator();
while (i.hasNext())
{
MethodNode meth = (MethodNode) i.next();
if (superClass != null)
{
superClass.makeVtable();
- vtable = new ArrayList(superClass.vtable);
- bridgeTargets = new HashSet(superClass.bridgeTargets);
- methodNameMap = new HashMap(superClass.methodNameMap);
+ vtable = new ArrayList<MethodNode>(superClass.vtable);
+ bridgeTargets = new HashSet<String>(superClass.bridgeTargets);
+ methodNameMap = new HashMap<String,String>(superClass.methodNameMap);
}
else
{
// Object.
- vtable = new ArrayList();
- bridgeTargets = new HashSet();
- methodNameMap = new HashMap();
+ vtable = new ArrayList<MethodNode>();
+ bridgeTargets = new HashSet<String>();
+ methodNameMap = new HashMap<String,String>();
}
addLocalMethods();
addInterfaces(this);
// methods by definition override a method from the superclass --
// and we have to consider the superclass' header as an
// unchangeable entity.
- Iterator i = methods.iterator();
+ Iterator<?> i = methods.iterator();
while (i.hasNext())
{
MethodNode m = (MethodNode) i.next();
private void printFields(CniPrintStream out)
{
- Iterator i = fields.iterator();
+ Iterator<?> i = fields.iterator();
ClassWrapper self = superClass;
while (i.hasNext())
{
// A given method is either static, overrides a super method, or
// is already in vtable order.
- Iterator i = methods.iterator();
+ Iterator<?> i = methods.iterator();
while (i.hasNext())
{
MethodNode m = (MethodNode) i.next();
}
}
- private void printTextList(PrintStream out, int what, ArrayList textList)
+ private void printTextList(PrintStream out, int what, ArrayList<Text> textList)
{
if (textList == null)
return;
- Iterator i = textList.iterator();
+ Iterator<Text> i = textList.iterator();
boolean first = true;
while (i.hasNext())
{
- Text item = (Text) i.next();
+ Text item = i.next();
if (item.type == what)
{
if (first)
}
// This prints the body of a class to a CxxPrintStream.
- private void printContents(CniPrintStream out, ArrayList textList)
+ private void printContents(CniPrintStream out, ArrayList<Text> textList)
throws IOException
{
printTextList(out, Text.PREPEND, textList);
{
linkSupers();
- ArrayList textList = classpath.getClassTextList(name);
+ ArrayList<Text> textList = classpath.getClassTextList(name);
out.println("// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-");
out.println();
boolean sawArray;
// All the classes referenced by this header.
- HashSet allClasses = new HashSet();
+ HashSet<String> allClasses = new HashSet<String>();
String[] previousPackage = new String[0];
out.println();
}
- String[] classes = (String[]) allClasses.toArray(new String[0]);
+ String[] classes = allClasses.toArray(new String[0]);
Arrays.sort(classes);
boolean first = true;
out.println("#include <" + klass.name + ".h>");
out.println();
- Iterator i = klass.methods.iterator();
+ Iterator<?> i = klass.methods.iterator();
boolean first = true;
while (i.hasNext())
{
public class GcjhMain extends Main
{
- ArrayList commands = new ArrayList();
+ ArrayList<Text> commands = new ArrayList<Text>();
public GcjhMain()
{
}
private void writeFields(ClassWrapper klass, JniPrintStream out)
+ throws IOException
{
+ klass.linkSupers();
boolean wroteAny = false;
for (; klass != null; klass = klass.superClass)
{
- Iterator i = klass.fields.iterator();
+ Iterator<?> i = klass.fields.iterator();
while (i.hasNext())
{
FieldNode field = (FieldNode) i.next();
out.println("#endif");
out.println();
- Iterator i = klass.methods.iterator();
+ Iterator<?> i = klass.methods.iterator();
while (i.hasNext())
{
MethodNode method = (MethodNode) i.next();
Main classpath;
// This is used to determine whether a method has an overload.
- HashMap methodNameMap = new HashMap();
+ HashMap<String,Integer> methodNameMap = new HashMap<String,Integer>();
public JniPrintStream(Main classpath, OutputStream out, ClassWrapper klass)
{
private void computeOverloads(ClassWrapper klass)
{
- Iterator i = klass.methods.iterator();
+ Iterator<?> i = klass.methods.iterator();
while (i.hasNext())
{
MethodNode method = (MethodNode) i.next();
continue;
if (methodNameMap.containsKey(method.name))
{
- Integer val = (Integer) methodNameMap.get(method.name);
- methodNameMap.put(method.name, new Integer(val.intValue() + 1));
+ Integer val = methodNameMap.get(method.name);
+ methodNameMap.put(method.name, Integer.valueOf(val.intValue() + 1));
}
else
- methodNameMap.put(method.name, new Integer(1));
+ methodNameMap.put(method.name, Integer.valueOf(1));
}
}
out.print(klass.name.replace('/', '_'));
out.println(".h>");
- Iterator i = klass.methods.iterator();
+ Iterator<?> i = klass.methods.iterator();
while (i.hasNext())
{
MethodNode method = (MethodNode) i.next();
"xor_eq"
};
- private static final HashSet keywords;
+ private static final HashSet<String> keywords;
static
{
- keywords = new HashSet();
+ keywords = new HashSet<String>();
for (int i = 0; i < words.length; ++i)
keywords.add(words[i]);
}
boolean force;
// Map class names to class wrappers.
- HashMap classMap = new HashMap();
+ HashMap<String,ClassWrapper> classMap = new HashMap<String,ClassWrapper>();
// Map class names to lists of Text objects.
- HashMap textMap = new HashMap();
+ HashMap<String,ArrayList<Text>> textMap = new HashMap<String,ArrayList<Text>>();
void readCommandFile(String textFileName) throws OptionException
{
}
BufferedReader reader = new BufferedReader(new InputStreamReader(fis));
String currentClass = null;
- ArrayList currentValues = null;
+ ArrayList<Text> currentValues = null;
while (true)
{
String line;
textMap.put(currentClass, currentValues);
}
currentClass = value;
- currentValues = new ArrayList();
+ currentValues = new ArrayList<Text>();
continue;
}
if (currentClass == null)
}
}
- void scanDirectory(File dir, final HashSet results)
+ void scanDirectory(File dir, final HashSet<Object> results)
{
File[] files = dir.listFiles(new FileFilter()
{
return result;
}
- private void writeHeaders(HashMap klasses, Printer printer)
+ private void writeHeaders(HashMap<File,ClassWrapper> klasses, Printer printer)
throws IOException
{
- Iterator i = klasses.entrySet().iterator();
+ Iterator<Map.Entry<File,ClassWrapper>> i = klasses.entrySet().iterator();
while (i.hasNext())
{
- Map.Entry e = (Map.Entry) i.next();
- File file = (File) e.getKey();
- ClassWrapper klass = (ClassWrapper) e.getValue();
+ Map.Entry<File,ClassWrapper> e = i.next();
+ File file = e.getKey();
+ ClassWrapper klass = e.getValue();
if (verbose)
System.err.println("[writing " + klass + " as " + file + "]");
printer.printClass(file, klass);
// First we load all of the files. That way if
// there are references between the files we will
// be loading the set that the user asked for.
- HashSet klasses = new HashSet();
+ HashSet<Object> klasses = new HashSet<Object>();
if (allDirectory != null)
scanDirectory(new File(allDirectory), klasses);
// Add the command-line arguments. We use the type of
}
}
- Iterator i = klasses.iterator();
- HashMap results = new HashMap();
+ Iterator<Object> i = klasses.iterator();
+ HashMap<File,ClassWrapper> results = new HashMap<File,ClassWrapper>();
while (i.hasNext())
{
// Let user specify either kind of class name or a
writeHeaders(results, printer);
}
- public ArrayList getClassTextList(String name)
+ public ArrayList<Text> getClassTextList(String name)
{
- return (ArrayList) textMap.get(name);
+ return textMap.get(name);
}
private ClassWrapper readClass(InputStream is) throws IOException
{
if ((meth.access & Opcodes.ACC_BRIDGE) == 0)
return null;
- Iterator i = meth.instructions.iterator();
+ Iterator<?> i = meth.instructions.iterator();
while (i.hasNext())
{
AbstractInsnNode insn = (AbstractInsnNode) i.next();
public class PathOptionGroup
extends OptionGroup
{
- ArrayList classpath = new ArrayList();
+ ArrayList<String> classpath = new ArrayList<String>();
- ArrayList bootclasspath = new ArrayList();
+ ArrayList<String> bootclasspath = new ArrayList<String>();
- void setPath(ArrayList list, String path)
+ void setPath(ArrayList<String> list, String path)
{
list.clear();
StringTokenizer st = new StringTokenizer(path, File.pathSeparator);
}
}
- void addExtDirs(ArrayList list, String path)
+ void addExtDirs(ArrayList<String> list, String path)
{
StringTokenizer tok = new StringTokenizer(path, File.pathSeparator);
while (tok.hasMoreTokens())
public URLClassLoader getLoader() throws MalformedURLException
{
- ArrayList urls = new ArrayList();
+ ArrayList<URL> urls = new ArrayList<URL>();
classpath.addAll(bootclasspath);
- Iterator i = classpath.iterator();
+ Iterator<String> i = classpath.iterator();
while (i.hasNext())
{
- String f = (String) i.next();
+ String f = i.next();
urls.add(new File(f).toURL());
}
- URL[] urlArray = (URL[]) urls.toArray(new URL[0]);
+ URL[] urlArray = urls.toArray(new URL[0]);
return new URLClassLoader(urlArray);
}
}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.rmic;
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
-*/
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package gnu.classpath.tools.rmic;
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
-*/
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package gnu.classpath.tools.rmic;
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
-*/
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package gnu.classpath.tools.rmic;
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
-*/
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.rmic;
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
-*/
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package gnu.classpath.tools.rmic;
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
-*/
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package gnu.classpath.tools.rmic;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.rmic;
* Thrown by the underlying compiler used by RMIC when it fails to compile a
* file.
*
- * @author Dalibor Topic <robilad@kaffe.org>
+ * @author Dalibor Topic (robilad@kaffe.org)
*/
public class RMICException
extends Exception
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
-*/
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from
+ or based on this library. If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
package gnu.classpath.tools.rmic;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.rmic;
public interface RmicBackend
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
-*/
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.rmic;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.rmic;
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
-*/
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.rmic;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
+ 02111-1307 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from
+ or based on this library. If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
package gnu.classpath.tools.serialver;
-/* gnu.classpath.tools.taglets.AuthorTaglet\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.taglets;\r
-\r
-import java.util.Map;\r
-\r
-import java.util.regex.Pattern;\r
-import java.util.regex.Matcher;\r
-\r
-import com.sun.tools.doclets.Taglet;\r
-\r
-import com.sun.javadoc.Tag;\r
-\r
-/**\r
- * The default Taglet which handles Author information.\r
- *\r
- * @author Julian Scheid (julian@sektor37.de)\r
- */\r
-public class AuthorTaglet implements Taglet {\r
- \r
- /**\r
- * Enum class which denotes whether and how to replace email\r
- * addresses in author tags.\r
- */\r
- public static class EmailReplacement {\r
- private EmailReplacement() {}\r
-\r
- /**\r
- * Specifies that email addresses should not be replaced.\r
- */\r
- public static final EmailReplacement NO_REPLACEMENT = new EmailReplacement();\r
-\r
- /**\r
- * Specifies that author tag text matching "Real Name\r
- * (user@domain.tld)" is converted to "<a\r
- * href="mailto:user@domain.tld">Real Name</a>.\r
- */\r
- public static final EmailReplacement MAILTO_NAME = new EmailReplacement();\r
-\r
- /**\r
- * Specifies that author tag text matching "Real Name\r
- * (user@domain.tld)" is converted to "Real Name (<a\r
- * href="mailto:user@domain.tld">user@domain.tld</a>).\r
- */\r
- public static final EmailReplacement NAME_MAILTO_ADDRESS = new EmailReplacement();\r
-\r
- /**\r
- * Specifies that author tag text matching "Real Name\r
- * (user@domain.tld)" is converted to "Real Name (user AT\r
- * domain DOT tld)", where the "AT" and "DOT" replacement are\r
- * specified by AuthorTaglet.emailAtReplacement and\r
- * AuthorTaglet.emailDotReplacement.\r
- */\r
- public static final EmailReplacement NAME_MANGLED_ADDRESS = new EmailReplacement(); \r
- }\r
-\r
- private static EmailReplacement emailReplacementType = EmailReplacement.NO_REPLACEMENT;\r
- private static String atReplacement = " <b>at</b> ";\r
- private static String dotReplacement = " <b>dot</b> ";\r
-\r
- private static final String NAME = "author";\r
- private static final String SINGLE_HEADER = "Author:";\r
- private static final String MULTI_HEADER = "Authors:";\r
-\r
- private static boolean enabled = true;\r
- \r
- /**\r
- * Matches <code>.</code> (dot).\r
- */\r
- private static final Pattern dotPattern = Pattern.compile("[.]");\r
-\r
- /**\r
- * Matches <code>@</code> (at sign).\r
- */\r
- private static final Pattern atPattern = Pattern.compile("[@]");\r
-\r
- /**\r
- * Matches <code>Real Name (user@domain.tld)</code>.\r
- */\r
- private static final Pattern authorEmailPattern\r
- = Pattern.compile("^"\r
- + "\\s*" // optional whitespace\r
- + "(" // group #1 start (real name)\r
- + "(?:[^\t\r\n ]|\\()+" // first name\r
- + "(?:\\s+(?:[^\t\r\n ]|\\()+)*" // additional names\r
- + ")" // group #1 end\r
- + "\\s*" // optional whitespace \r
- + "[(<]" // opening paren\r
- + "\\s*" // optional whitespace \r
- + "(" // group #2 start (email address)\r
- + "(" // group #3 start (email user)\r
- + "[A-z0-9_\\-\\.]+" // username\r
- + ")" // group #3 end\r
- + "[@]" // at sign\r
- + "[A-z0-9_\\-]+(?:[.][A-z0-9_\\-]+)+[A-z]" // domain\r
- + ")" // group #2 end\r
- + "\\s*" // optional whitespace\r
- + "(?:\\)|>)" // closing paren\r
- + "$");\r
- \r
- public String getName() {\r
- return NAME;\r
- }\r
- \r
- public boolean inField() {\r
- return true;\r
- }\r
-\r
- public boolean inConstructor() {\r
- return true;\r
- }\r
- \r
- public boolean inMethod() {\r
- return true;\r
- }\r
- \r
- public boolean inOverview() {\r
- return true;\r
- }\r
-\r
- public boolean inPackage() {\r
- return true;\r
- }\r
-\r
- public boolean inType() {\r
- return true;\r
- }\r
- \r
- public boolean isInlineTag() {\r
- return false;\r
- } \r
-\r
- public static void register(Map tagletMap) {\r
- AuthorTaglet authorTaglet = new AuthorTaglet();\r
- tagletMap.put(authorTaglet.getName(), authorTaglet);\r
- }\r
-\r
- public String toString(Tag tag) {\r
- if (enabled) {\r
- return toString(new Tag[] { tag });\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
-\r
- public String toString(Tag[] tags) {\r
- if (!enabled || tags.length == 0) {\r
- return null;\r
- }\r
- else {\r
- boolean haveValidTag = false;\r
- for (int i = 0; i < tags.length && !haveValidTag; ++i) {\r
- if (tags[i].text().length() > 0) {\r
- haveValidTag = true;\r
- }\r
- }\r
- \r
- if (haveValidTag) {\r
- StringBuffer result = new StringBuffer();\r
- result.append("<dl class=\"tag list\">");\r
- result.append("<dt class=\"tag section header\"><b>");\r
- if (tags.length == 1) {\r
- result.append(SINGLE_HEADER);\r
- }\r
- else {\r
- result.append(MULTI_HEADER);\r
- }\r
- result.append("</b></dt>");\r
- for (int i = 0; i < tags.length; i++) {\r
- result.append("<dd class=\"tag item\">");\r
- result.append(replaceEmail(tags[i].text()));\r
- result.append("</dd>");\r
- }\r
- result.append("</dl>");\r
- return result.toString();\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
- } \r
-\r
- /**\r
- * Reformat the tag text according to {@link #emailReplacementType}.\r
- */\r
- private String replaceEmail(String text) {\r
-\r
- if (EmailReplacement.NO_REPLACEMENT == emailReplacementType) {\r
- return text;\r
- }\r
- else {\r
- Matcher matcher = authorEmailPattern.matcher(text);\r
- if (matcher.matches()) {\r
- String realName = matcher.group(1);\r
- String emailAddress = matcher.group(2);\r
- if (EmailReplacement.MAILTO_NAME == emailReplacementType) { \r
- return "<a href=\"mailto:" + emailAddress + "\">" + realName + "</a>";\r
- }\r
- else if (EmailReplacement.NAME_MAILTO_ADDRESS == emailReplacementType) {\r
- return realName + " (<a href=\"mailto:" + emailAddress + "\">" + emailAddress + "</a>)";\r
- }\r
- else if (EmailReplacement.NAME_MANGLED_ADDRESS == emailReplacementType) {\r
- Matcher dotMatcher = dotPattern.matcher(emailAddress);\r
- Matcher atMatcher = atPattern.matcher(dotMatcher.replaceAll(dotReplacement));\r
- String mangledAddress = atMatcher.replaceAll(atReplacement);\r
- return realName + " (" + mangledAddress + ")";\r
- }\r
- else {\r
- // this shouldn't happen\r
- return text;\r
- }\r
- }\r
- else {\r
- return text;\r
- }\r
- }\r
- }\r
-\r
- /**\r
- * Set the email replacement type.\r
- */\r
- public static void setEmailReplacementType(EmailReplacement emailReplacementType)\r
- {\r
- if (null == emailReplacementType) {\r
- throw new NullPointerException();\r
- }\r
- AuthorTaglet.emailReplacementType = emailReplacementType;\r
- }\r
-\r
- /**\r
- * Set the HTML text by which the <code>@</code> (at sign) in email\r
- * addresses should be replaced if the email replacement type is\r
- * <code>NAME_MANGLED_ADDRESS</code>.\r
- */\r
- public static void setAtReplacement(String atReplacement)\r
- {\r
- AuthorTaglet.atReplacement = atReplacement;\r
- }\r
-\r
- /**\r
- * Set the HTML text by which the <code>.</code> (dot) in email\r
- * addresses should be replaced if the email replacement type is\r
- * <code>NAME_MANGLED_ADDRESS</code>.\r
- */\r
- public static void setDotReplacement(String dotReplacement)\r
- {\r
- AuthorTaglet.dotReplacement = dotReplacement;\r
- }\r
-\r
- /**\r
- * Enables/disables this taglet.\r
- */\r
- public static void setTagletEnabled(boolean enabled)\r
- {\r
- AuthorTaglet.enabled = enabled;\r
- }\r
-}\r
+/* gnu.classpath.tools.taglets.AuthorTaglet
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.taglets;
+
+import java.util.Map;
+
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+import com.sun.tools.doclets.Taglet;
+
+import com.sun.javadoc.Tag;
+
+/**
+ * The default Taglet which handles Author information.
+ *
+ * @author Julian Scheid (julian@sektor37.de)
+ */
+public class AuthorTaglet implements Taglet {
+
+ /**
+ * Enum class which denotes whether and how to replace email
+ * addresses in author tags.
+ */
+ public static class EmailReplacement {
+ private EmailReplacement() {}
+
+ /**
+ * Specifies that email addresses should not be replaced.
+ */
+ public static final EmailReplacement NO_REPLACEMENT = new EmailReplacement();
+
+ /**
+ * Specifies that author tag text matching "Real Name
+ * (user@domain.tld)" is converted to "<a
+ * href="mailto:user@domain.tld">Real Name</a>.
+ */
+ public static final EmailReplacement MAILTO_NAME = new EmailReplacement();
+
+ /**
+ * Specifies that author tag text matching "Real Name
+ * (user@domain.tld)" is converted to "Real Name (<a
+ * href="mailto:user@domain.tld">user@domain.tld</a>).
+ */
+ public static final EmailReplacement NAME_MAILTO_ADDRESS = new EmailReplacement();
+
+ /**
+ * Specifies that author tag text matching "Real Name
+ * (user@domain.tld)" is converted to "Real Name (user AT
+ * domain DOT tld)", where the "AT" and "DOT" replacement are
+ * specified by AuthorTaglet.emailAtReplacement and
+ * AuthorTaglet.emailDotReplacement.
+ */
+ public static final EmailReplacement NAME_MANGLED_ADDRESS = new EmailReplacement();
+ }
+
+ private static EmailReplacement emailReplacementType = EmailReplacement.NO_REPLACEMENT;
+ private static String atReplacement = " <b>at</b> ";
+ private static String dotReplacement = " <b>dot</b> ";
+
+ private static final String NAME = "author";
+ private static final String SINGLE_HEADER = "Author:";
+ private static final String MULTI_HEADER = "Authors:";
+
+ private static boolean enabled = true;
+
+ /**
+ * Matches <code>.</code> (dot).
+ */
+ private static final Pattern dotPattern = Pattern.compile("[.]");
+
+ /**
+ * Matches <code>@</code> (at sign).
+ */
+ private static final Pattern atPattern = Pattern.compile("[@]");
+
+ /**
+ * Matches <code>Real Name (user@domain.tld)</code>.
+ */
+ private static final Pattern authorEmailPattern
+ = Pattern.compile("^"
+ + "\\s*" // optional whitespace
+ + "(" // group #1 start (real name)
+ + "(?:[^\t\r\n ]|\\()+" // first name
+ + "(?:\\s+(?:[^\t\r\n ]|\\()+)*" // additional names
+ + ")" // group #1 end
+ + "\\s*" // optional whitespace
+ + "[(<]" // opening paren
+ + "\\s*" // optional whitespace
+ + "(" // group #2 start (email address)
+ + "(" // group #3 start (email user)
+ + "[A-z0-9_\\-\\.]+" // username
+ + ")" // group #3 end
+ + "[@]" // at sign
+ + "[A-z0-9_\\-]+(?:[.][A-z0-9_\\-]+)+[A-z]" // domain
+ + ")" // group #2 end
+ + "\\s*" // optional whitespace
+ + "(?:\\)|>)" // closing paren
+ + "$");
+
+ public String getName() {
+ return NAME;
+ }
+
+ public boolean inField() {
+ return true;
+ }
+
+ public boolean inConstructor() {
+ return true;
+ }
+
+ public boolean inMethod() {
+ return true;
+ }
+
+ public boolean inOverview() {
+ return true;
+ }
+
+ public boolean inPackage() {
+ return true;
+ }
+
+ public boolean inType() {
+ return true;
+ }
+
+ public boolean isInlineTag() {
+ return false;
+ }
+
+ public static void register(Map tagletMap) {
+ AuthorTaglet authorTaglet = new AuthorTaglet();
+ tagletMap.put(authorTaglet.getName(), authorTaglet);
+ }
+
+ public String toString(Tag tag) {
+ if (enabled) {
+ return toString(new Tag[] { tag });
+ }
+ else {
+ return null;
+ }
+ }
+
+ public String toString(Tag[] tags) {
+ if (!enabled || tags.length == 0) {
+ return null;
+ }
+ else {
+ boolean haveValidTag = false;
+ for (int i = 0; i < tags.length && !haveValidTag; ++i) {
+ if (tags[i].text().length() > 0) {
+ haveValidTag = true;
+ }
+ }
+
+ if (haveValidTag) {
+ StringBuffer result = new StringBuffer();
+ result.append("<dl class=\"tag list\">");
+ result.append("<dt class=\"tag section header\"><b>");
+ if (tags.length == 1) {
+ result.append(SINGLE_HEADER);
+ }
+ else {
+ result.append(MULTI_HEADER);
+ }
+ result.append("</b></dt>");
+ for (int i = 0; i < tags.length; i++) {
+ result.append("<dd class=\"tag item\">");
+ result.append(replaceEmail(tags[i].text()));
+ result.append("</dd>");
+ }
+ result.append("</dl>");
+ return result.toString();
+ }
+ else {
+ return null;
+ }
+ }
+ }
+
+ /**
+ * Reformat the tag text according to {@link #emailReplacementType}.
+ */
+ private String replaceEmail(String text) {
+
+ if (EmailReplacement.NO_REPLACEMENT == emailReplacementType) {
+ return text;
+ }
+ else {
+ Matcher matcher = authorEmailPattern.matcher(text);
+ if (matcher.matches()) {
+ String realName = matcher.group(1);
+ String emailAddress = matcher.group(2);
+ if (EmailReplacement.MAILTO_NAME == emailReplacementType) {
+ return "<a href=\"mailto:" + emailAddress + "\">" + realName + "</a>";
+ }
+ else if (EmailReplacement.NAME_MAILTO_ADDRESS == emailReplacementType) {
+ return realName + " (<a href=\"mailto:" + emailAddress + "\">" + emailAddress + "</a>)";
+ }
+ else if (EmailReplacement.NAME_MANGLED_ADDRESS == emailReplacementType) {
+ Matcher dotMatcher = dotPattern.matcher(emailAddress);
+ Matcher atMatcher = atPattern.matcher(dotMatcher.replaceAll(dotReplacement));
+ String mangledAddress = atMatcher.replaceAll(atReplacement);
+ return realName + " (" + mangledAddress + ")";
+ }
+ else {
+ // this shouldn't happen
+ return text;
+ }
+ }
+ else {
+ return text;
+ }
+ }
+ }
+
+ /**
+ * Set the email replacement type.
+ */
+ public static void setEmailReplacementType(EmailReplacement emailReplacementType)
+ {
+ if (null == emailReplacementType) {
+ throw new NullPointerException();
+ }
+ AuthorTaglet.emailReplacementType = emailReplacementType;
+ }
+
+ /**
+ * Set the HTML text by which the <code>@</code> (at sign) in email
+ * addresses should be replaced if the email replacement type is
+ * <code>NAME_MANGLED_ADDRESS</code>.
+ */
+ public static void setAtReplacement(String atReplacement)
+ {
+ AuthorTaglet.atReplacement = atReplacement;
+ }
+
+ /**
+ * Set the HTML text by which the <code>.</code> (dot) in email
+ * addresses should be replaced if the email replacement type is
+ * <code>NAME_MANGLED_ADDRESS</code>.
+ */
+ public static void setDotReplacement(String dotReplacement)
+ {
+ AuthorTaglet.dotReplacement = dotReplacement;
+ }
+
+ /**
+ * Enables/disables this taglet.
+ */
+ public static void setTagletEnabled(boolean enabled)
+ {
+ AuthorTaglet.enabled = enabled;
+ }
+}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.taglets;
-/* gnu.classpath.tools.taglets.CopyrightTaglet\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.taglets;\r
-\r
-import java.util.Map;\r
-\r
-import com.sun.tools.doclets.Taglet;\r
-\r
-import com.sun.javadoc.Tag;\r
-\r
-/**\r
- * A simple Taglet which handles Copyright information.\r
- */\r
-public class CopyrightTaglet implements Taglet {\r
-\r
- private static final String NAME = "copyright";\r
- private static final String HEADER = "Copyright:";\r
- \r
- public String getName() {\r
- return NAME;\r
- }\r
- \r
- public boolean inField() {\r
- return true;\r
- }\r
-\r
- public boolean inConstructor() {\r
- return true;\r
- }\r
- \r
- public boolean inMethod() {\r
- return true;\r
- }\r
- \r
- public boolean inOverview() {\r
- return true;\r
- }\r
-\r
- public boolean inPackage() {\r
- return true;\r
- }\r
-\r
- public boolean inType() {\r
- return true;\r
- }\r
- \r
- public boolean isInlineTag() {\r
- return false;\r
- } \r
-\r
- public static void register(Map tagletMap) {\r
- CopyrightTaglet copyrightTaglet = new CopyrightTaglet();\r
- tagletMap.put(copyrightTaglet.getName(), copyrightTaglet);\r
- }\r
-\r
- public String toString(Tag tag) {\r
- return toString(new Tag[] { tag });\r
- }\r
-\r
- public String toString(Tag[] tags) {\r
- if (tags.length == 0) {\r
- return null;\r
- }\r
- else {\r
- boolean haveValidTag = false;\r
- for (int i = 0; i < tags.length && !haveValidTag; ++i) {\r
- if (tags[i].text().length() > 0) {\r
- haveValidTag = true;\r
- }\r
- }\r
- \r
- if (haveValidTag) {\r
- StringBuffer result = new StringBuffer();\r
- result.append("<dl>");\r
- for (int i = 0; i < tags.length; i++) {\r
- if (tags[i].text().length() > 0) {\r
- result.append("<dt><i>Copyright © " + tags[i].text() + "</i></dt>");\r
- }\r
- }\r
- result.append("</dl>");\r
- return result.toString();\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
- }\r
-}\r
+/* gnu.classpath.tools.taglets.CopyrightTaglet
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.taglets;
+
+import java.util.Map;
+
+import com.sun.tools.doclets.Taglet;
+
+import com.sun.javadoc.Tag;
+
+/**
+ * A simple Taglet which handles Copyright information.
+ */
+public class CopyrightTaglet implements Taglet {
+
+ private static final String NAME = "copyright";
+ private static final String HEADER = "Copyright:";
+
+ public String getName() {
+ return NAME;
+ }
+
+ public boolean inField() {
+ return true;
+ }
+
+ public boolean inConstructor() {
+ return true;
+ }
+
+ public boolean inMethod() {
+ return true;
+ }
+
+ public boolean inOverview() {
+ return true;
+ }
+
+ public boolean inPackage() {
+ return true;
+ }
+
+ public boolean inType() {
+ return true;
+ }
+
+ public boolean isInlineTag() {
+ return false;
+ }
+
+ public static void register(Map tagletMap) {
+ CopyrightTaglet copyrightTaglet = new CopyrightTaglet();
+ tagletMap.put(copyrightTaglet.getName(), copyrightTaglet);
+ }
+
+ public String toString(Tag tag) {
+ return toString(new Tag[] { tag });
+ }
+
+ public String toString(Tag[] tags) {
+ if (tags.length == 0) {
+ return null;
+ }
+ else {
+ boolean haveValidTag = false;
+ for (int i = 0; i < tags.length && !haveValidTag; ++i) {
+ if (tags[i].text().length() > 0) {
+ haveValidTag = true;
+ }
+ }
+
+ if (haveValidTag) {
+ StringBuffer result = new StringBuffer();
+ result.append("<dl>");
+ for (int i = 0; i < tags.length; i++) {
+ if (tags[i].text().length() > 0) {
+ result.append("<dt><i>Copyright © " + tags[i].text() + "</i></dt>");
+ }
+ }
+ result.append("</dl>");
+ return result.toString();
+ }
+ else {
+ return null;
+ }
+ }
+ }
+}
-/* gnu.classpath.tools.taglets.DeprecatedTaglet\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.taglets;\r
-\r
-import java.util.Map;\r
-\r
-import com.sun.tools.doclets.Taglet;\r
-\r
-import com.sun.javadoc.Tag;\r
-\r
-/**\r
- * The default Taglet which handles deprecated information.\r
- *\r
- * @author Julian Scheid (julian@sektor37.de)\r
- */\r
-public class DeprecatedTaglet implements Taglet {\r
- \r
- private static final String NAME = "deprecated";\r
- private static final String HEADER = "Deprecated:";\r
-\r
- private static boolean enabled = true;\r
- \r
- public String getName() {\r
- return NAME;\r
- }\r
- \r
- public boolean inField() {\r
- return true;\r
- }\r
-\r
- public boolean inConstructor() {\r
- return true;\r
- }\r
- \r
- public boolean inMethod() {\r
- return true;\r
- }\r
- \r
- public boolean inOverview() {\r
- return true;\r
- }\r
-\r
- public boolean inPackage() {\r
- return true;\r
- }\r
-\r
- public boolean inType() {\r
- return true;\r
- }\r
- \r
- public boolean isInlineTag() {\r
- return false;\r
- } \r
-\r
- public static void register(Map tagletMap) {\r
- DeprecatedTaglet deprecatedTaglet = new DeprecatedTaglet();\r
- tagletMap.put(deprecatedTaglet.getName(), deprecatedTaglet);\r
- }\r
-\r
- public String toString(Tag tag) {\r
- if (enabled) {\r
- return toString(new Tag[] { tag });\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
-\r
- public String toString(Tag[] tags) {\r
- if (!enabled || tags.length == 0) {\r
- return null;\r
- }\r
- else {\r
- \r
- StringBuffer result = new StringBuffer();\r
- result.append("<div class=\"classdoc-tag-section-header\">");\r
- result.append(HEADER);\r
- result.append("</div>");\r
- result.append("<dl class=\"classdoc-list\">");\r
- for (int i = 0; i < tags.length; i++) {\r
- result.append("<dt>");\r
- result.append(tags[i].text());\r
- result.append("</dt>");\r
- }\r
- result.append("</dl>");\r
- return result.toString();\r
- }\r
- }\r
-\r
- /**\r
- * Enables/disables this taglet.\r
- */\r
- public static void setTagletEnabled(boolean enabled)\r
- {\r
- DeprecatedTaglet.enabled = enabled;\r
- }\r
-}\r
+/* gnu.classpath.tools.taglets.DeprecatedTaglet
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.taglets;
+
+import java.util.Map;
+
+import com.sun.tools.doclets.Taglet;
+
+import com.sun.javadoc.Tag;
+
+/**
+ * The default Taglet which handles deprecated information.
+ *
+ * @author Julian Scheid (julian@sektor37.de)
+ */
+public class DeprecatedTaglet implements Taglet {
+
+ private static final String NAME = "deprecated";
+ private static final String HEADER = "Deprecated:";
+
+ private static boolean enabled = true;
+
+ public String getName() {
+ return NAME;
+ }
+
+ public boolean inField() {
+ return true;
+ }
+
+ public boolean inConstructor() {
+ return true;
+ }
+
+ public boolean inMethod() {
+ return true;
+ }
+
+ public boolean inOverview() {
+ return true;
+ }
+
+ public boolean inPackage() {
+ return true;
+ }
+
+ public boolean inType() {
+ return true;
+ }
+
+ public boolean isInlineTag() {
+ return false;
+ }
+
+ public static void register(Map tagletMap) {
+ DeprecatedTaglet deprecatedTaglet = new DeprecatedTaglet();
+ tagletMap.put(deprecatedTaglet.getName(), deprecatedTaglet);
+ }
+
+ public String toString(Tag tag) {
+ if (enabled) {
+ return toString(new Tag[] { tag });
+ }
+ else {
+ return null;
+ }
+ }
+
+ public String toString(Tag[] tags) {
+ if (!enabled || tags.length == 0) {
+ return null;
+ }
+ else {
+
+ StringBuffer result = new StringBuffer();
+ result.append("<div class=\"classdoc-tag-section-header\">");
+ result.append(HEADER);
+ result.append("</div>");
+ result.append("<dl class=\"classdoc-list\">");
+ for (int i = 0; i < tags.length; i++) {
+ result.append("<dt>");
+ result.append(tags[i].text());
+ result.append("</dt>");
+ }
+ result.append("</dl>");
+ return result.toString();
+ }
+ }
+
+ /**
+ * Enables/disables this taglet.
+ */
+ public static void setTagletEnabled(boolean enabled)
+ {
+ DeprecatedTaglet.enabled = enabled;
+ }
+}
-/* gnu.classpath.tools.taglets.GenericTaglet\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.taglets;\r
-\r
-import java.util.Map;\r
-\r
-import com.sun.tools.doclets.Taglet;\r
-\r
-import com.sun.javadoc.Tag;\r
-\r
-/**\r
- * A taglet which can be configured at runtime.\r
- *\r
- * @author Julian Scheid (julian@sektor37.de)\r
- */\r
-public class GenericTaglet implements Taglet {\r
- \r
- private String name = "since";\r
- private String header = "Since:";\r
-\r
- private boolean scopeOverview;\r
- private boolean scopePackage;\r
- private boolean scopeType;\r
- private boolean scopeConstructor;\r
- private boolean scopeMethod;\r
- private boolean scopeField;\r
-\r
- private boolean enabled = true;\r
-\r
- public GenericTaglet(String name,\r
- String header,\r
- boolean scopeOverview,\r
- boolean scopePackage,\r
- boolean scopeType,\r
- boolean scopeConstructor,\r
- boolean scopeMethod,\r
- boolean scopeField)\r
- {\r
- this.name = name;\r
- this.header = header;\r
- this.scopeOverview = scopeOverview;\r
- this.scopePackage = scopePackage;\r
- this.scopeType = scopeType;\r
- this.scopeConstructor = scopeConstructor;\r
- this.scopeMethod = scopeMethod;\r
- this.scopeField = scopeField;\r
- }\r
- \r
- public String getName() {\r
- return name;\r
- }\r
- \r
- public boolean inField() {\r
- return scopeField;\r
- }\r
-\r
- public boolean inConstructor() {\r
- return scopeConstructor;\r
- }\r
- \r
- public boolean inMethod() {\r
- return scopeMethod;\r
- }\r
- \r
- public boolean inOverview() {\r
- return scopeOverview;\r
- }\r
-\r
- public boolean inPackage() {\r
- return scopePackage;\r
- }\r
-\r
- public boolean inType() {\r
- return scopeType;\r
- }\r
- \r
- public boolean isInlineTag() {\r
- return false;\r
- } \r
-\r
- public void register(Map tagletMap) {\r
- tagletMap.put(getName(), this);\r
- }\r
-\r
- public String toString(Tag tag) {\r
- if (enabled) {\r
- return toString(new Tag[] { tag });\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
-\r
- public String toString(Tag[] tags) {\r
- if (!enabled || tags.length == 0) {\r
- return null;\r
- }\r
- else {\r
- \r
- StringBuffer result = new StringBuffer();\r
- result.append("<div class=\"classdoc-tag-section-header\">");\r
- result.append(header);\r
- result.append("</div>");\r
- result.append("<dl class=\"classdoc-list\">");\r
- for (int i = 0; i < tags.length; i++) {\r
- result.append("<dt>");\r
- result.append(tags[i].text());\r
- result.append("</dt>");\r
- }\r
- result.append("</dl>");\r
- return result.toString();\r
- }\r
- }\r
-\r
- /**\r
- * Enables/disables this taglet.\r
- */\r
- public void setTagletEnabled(boolean enabled)\r
- {\r
- this.enabled = enabled;\r
- }\r
-}\r
+/* gnu.classpath.tools.taglets.GenericTaglet
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.taglets;
+
+import java.util.Map;
+
+import com.sun.tools.doclets.Taglet;
+
+import com.sun.javadoc.Tag;
+
+/**
+ * A taglet which can be configured at runtime.
+ *
+ * @author Julian Scheid (julian@sektor37.de)
+ */
+public class GenericTaglet implements Taglet {
+
+ private String name = "since";
+ private String header = "Since:";
+
+ private boolean scopeOverview;
+ private boolean scopePackage;
+ private boolean scopeType;
+ private boolean scopeConstructor;
+ private boolean scopeMethod;
+ private boolean scopeField;
+
+ private boolean enabled = true;
+
+ public GenericTaglet(String name,
+ String header,
+ boolean scopeOverview,
+ boolean scopePackage,
+ boolean scopeType,
+ boolean scopeConstructor,
+ boolean scopeMethod,
+ boolean scopeField)
+ {
+ this.name = name;
+ this.header = header;
+ this.scopeOverview = scopeOverview;
+ this.scopePackage = scopePackage;
+ this.scopeType = scopeType;
+ this.scopeConstructor = scopeConstructor;
+ this.scopeMethod = scopeMethod;
+ this.scopeField = scopeField;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean inField() {
+ return scopeField;
+ }
+
+ public boolean inConstructor() {
+ return scopeConstructor;
+ }
+
+ public boolean inMethod() {
+ return scopeMethod;
+ }
+
+ public boolean inOverview() {
+ return scopeOverview;
+ }
+
+ public boolean inPackage() {
+ return scopePackage;
+ }
+
+ public boolean inType() {
+ return scopeType;
+ }
+
+ public boolean isInlineTag() {
+ return false;
+ }
+
+ public void register(Map tagletMap) {
+ tagletMap.put(getName(), this);
+ }
+
+ public String toString(Tag tag) {
+ if (enabled) {
+ return toString(new Tag[] { tag });
+ }
+ else {
+ return null;
+ }
+ }
+
+ public String toString(Tag[] tags) {
+ if (!enabled || tags.length == 0) {
+ return null;
+ }
+ else {
+
+ StringBuffer result = new StringBuffer();
+ result.append("<div class=\"classdoc-tag-section-header\">");
+ result.append(header);
+ result.append("</div>");
+ result.append("<dl class=\"classdoc-list\">");
+ for (int i = 0; i < tags.length; i++) {
+ result.append("<dt>");
+ result.append(tags[i].text());
+ result.append("</dt>");
+ }
+ result.append("</dl>");
+ return result.toString();
+ }
+ }
+
+ /**
+ * Enables/disables this taglet.
+ */
+ public void setTagletEnabled(boolean enabled)
+ {
+ this.enabled = enabled;
+ }
+}
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.taglets;
-/* gnu.classpath.tools.taglets.SinceTaglet\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.taglets;\r
-\r
-import java.util.Map;\r
-\r
-import com.sun.tools.doclets.Taglet;\r
-\r
-import com.sun.javadoc.Tag;\r
-\r
-import gnu.classpath.tools.doclets.InlineTagRenderer;\r
-\r
-/**\r
- * The default Taglet which handles since information.\r
- *\r
- * @author Julian Scheid (julian@sektor37.de)\r
- */\r
-public class SinceTaglet implements GnuExtendedTaglet {\r
- \r
- private static final String NAME = "since";\r
- private static final String HEADER = "Since:";\r
-\r
- private static boolean enabled = true;\r
-\r
- private InlineTagRenderer inlineTagRenderer;\r
-\r
- public SinceTaglet(InlineTagRenderer inlineTagRenderer)\r
- {\r
- this.inlineTagRenderer = inlineTagRenderer;\r
- }\r
- \r
- public String getName() {\r
- return NAME;\r
- }\r
- \r
- public boolean inField() {\r
- return true;\r
- }\r
-\r
- public boolean inConstructor() {\r
- return true;\r
- }\r
- \r
- public boolean inMethod() {\r
- return true;\r
- }\r
- \r
- public boolean inOverview() {\r
- return true;\r
- }\r
-\r
- public boolean inPackage() {\r
- return true;\r
- }\r
-\r
- public boolean inType() {\r
- return true;\r
- }\r
- \r
- public boolean isInlineTag() {\r
- return false;\r
- } \r
-\r
- public String toString(Tag tag) {\r
- // should raise assertion\r
- if (enabled) {\r
- return toString(new Tag[] { tag });\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
-\r
- public String toString(Tag[] tags) {\r
- // should raise assertion\r
- return toString(tags, null);\r
- }\r
-\r
- public String toString(Tag tag, TagletContext context) \r
- {\r
- return null;\r
- }\r
-\r
- public String toString(Tag[] tags, TagletContext context) \r
- {\r
- if (!enabled || tags.length == 0) {\r
- return null;\r
- }\r
- else {\r
- boolean haveValidTag = false;\r
- for (int i = 0; i < tags.length && !haveValidTag; ++i) {\r
- if (tags[i].text().length() > 0) {\r
- haveValidTag = true;\r
- }\r
- }\r
- \r
- if (haveValidTag) {\r
- StringBuffer result = new StringBuffer();\r
- result.append("<dl class=\"tag list\">");\r
- result.append("<dt class=\"tag section header\"><b>");\r
- result.append(HEADER);\r
- result.append("</b></dt>");\r
- for (int i = 0; i < tags.length; ++i) {\r
- if (tags[i].text().length() > 0) {\r
- result.append("<dd>");\r
- result.append(inlineTagRenderer.renderInlineTags(tags[i].inlineTags(), context));\r
- result.append("</dd>");\r
- }\r
- }\r
- result.append("</dl>");\r
- return result.toString();\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
- }\r
-\r
- /**\r
- * Enables/disables this taglet.\r
- */\r
- public static void setTagletEnabled(boolean enabled)\r
- {\r
- SinceTaglet.enabled = enabled;\r
- }\r
-}\r
+/* gnu.classpath.tools.taglets.SinceTaglet
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.taglets;
+
+import java.util.Map;
+
+import com.sun.tools.doclets.Taglet;
+
+import com.sun.javadoc.Tag;
+
+import gnu.classpath.tools.doclets.InlineTagRenderer;
+
+/**
+ * The default Taglet which handles since information.
+ *
+ * @author Julian Scheid (julian@sektor37.de)
+ */
+public class SinceTaglet implements GnuExtendedTaglet {
+
+ private static final String NAME = "since";
+ private static final String HEADER = "Since:";
+
+ private static boolean enabled = true;
+
+ private InlineTagRenderer inlineTagRenderer;
+
+ public SinceTaglet(InlineTagRenderer inlineTagRenderer)
+ {
+ this.inlineTagRenderer = inlineTagRenderer;
+ }
+
+ public String getName() {
+ return NAME;
+ }
+
+ public boolean inField() {
+ return true;
+ }
+
+ public boolean inConstructor() {
+ return true;
+ }
+
+ public boolean inMethod() {
+ return true;
+ }
+
+ public boolean inOverview() {
+ return true;
+ }
+
+ public boolean inPackage() {
+ return true;
+ }
+
+ public boolean inType() {
+ return true;
+ }
+
+ public boolean isInlineTag() {
+ return false;
+ }
+
+ public String toString(Tag tag) {
+ // should raise assertion
+ if (enabled) {
+ return toString(new Tag[] { tag });
+ }
+ else {
+ return null;
+ }
+ }
+
+ public String toString(Tag[] tags) {
+ // should raise assertion
+ return toString(tags, null);
+ }
+
+ public String toString(Tag tag, TagletContext context)
+ {
+ return null;
+ }
+
+ public String toString(Tag[] tags, TagletContext context)
+ {
+ if (!enabled || tags.length == 0) {
+ return null;
+ }
+ else {
+ boolean haveValidTag = false;
+ for (int i = 0; i < tags.length && !haveValidTag; ++i) {
+ if (tags[i].text().length() > 0) {
+ haveValidTag = true;
+ }
+ }
+
+ if (haveValidTag) {
+ StringBuffer result = new StringBuffer();
+ result.append("<dl class=\"tag list\">");
+ result.append("<dt class=\"tag section header\"><b>");
+ result.append(HEADER);
+ result.append("</b></dt>");
+ for (int i = 0; i < tags.length; ++i) {
+ if (tags[i].text().length() > 0) {
+ result.append("<dd>");
+ result.append(inlineTagRenderer.renderInlineTags(tags[i].inlineTags(), context));
+ result.append("</dd>");
+ }
+ }
+ result.append("</dl>");
+ return result.toString();
+ }
+ else {
+ return null;
+ }
+ }
+ }
+
+ /**
+ * Enables/disables this taglet.
+ */
+ public static void setTagletEnabled(boolean enabled)
+ {
+ SinceTaglet.enabled = enabled;
+ }
+}
+/* TagletContext.java -
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
package gnu.classpath.tools.taglets;
import com.sun.javadoc.Doc;
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.classpath.tools.taglets;
-/* gnu.classpath.tools.taglets.VersionTaglet\r
- Copyright (C) 2001 Free Software Foundation, Inc.\r
-\r
-This file is part of GNU Classpath.\r
-\r
-GNU Classpath is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation; either version 2, or (at your option)\r
-any later version.\r
- \r
-GNU Classpath is distributed in the hope that it will be useful, but\r
-WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with GNU Classpath; see the file COPYING. If not, write to the\r
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\r
-02111-1307 USA. */\r
-\r
-package gnu.classpath.tools.taglets;\r
-\r
-import java.util.Map;\r
-\r
-import com.sun.tools.doclets.Taglet;\r
-\r
-import com.sun.javadoc.Tag;\r
-\r
-/**\r
- * The default Taglet which handles version information.\r
- *\r
- * @author Julian Scheid (julian@sektor37.de)\r
- */\r
-public class VersionTaglet implements Taglet {\r
- \r
- private static final String NAME = "version";\r
- private static final String HEADER = "Version:";\r
-\r
- private static boolean enabled = true;\r
- \r
- public String getName() {\r
- return NAME;\r
- }\r
- \r
- public boolean inField() {\r
- return true;\r
- }\r
-\r
- public boolean inConstructor() {\r
- return true;\r
- }\r
- \r
- public boolean inMethod() {\r
- return true;\r
- }\r
- \r
- public boolean inOverview() {\r
- return true;\r
- }\r
-\r
- public boolean inPackage() {\r
- return true;\r
- }\r
-\r
- public boolean inType() {\r
- return true;\r
- }\r
- \r
- public boolean isInlineTag() {\r
- return false;\r
- } \r
-\r
- public static void register(Map tagletMap) {\r
- VersionTaglet versionTaglet = new VersionTaglet();\r
- tagletMap.put(versionTaglet.getName(), versionTaglet);\r
- }\r
-\r
- public String toString(Tag tag) {\r
- if (enabled) {\r
- return toString(new Tag[] { tag });\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
-\r
- public String toString(Tag[] tags) {\r
- if (!enabled || tags.length == 0) {\r
- return null;\r
- }\r
- else {\r
- boolean haveValidTag = false;\r
- for (int i = 0; i < tags.length && !haveValidTag; ++i) {\r
- if (tags[i].text().length() > 0) {\r
- haveValidTag = true;\r
- }\r
- }\r
- \r
- if (haveValidTag) {\r
- \r
- StringBuffer result = new StringBuffer();\r
- result.append("<dl class=\"tag list\">");\r
- result.append("</dl>");\r
- result.append("<dt class=\"tag section header\"><b>");\r
- result.append(HEADER);\r
- result.append("</b></dt><dd>");\r
- boolean firstEntry = true;\r
- for (int i = 0; i < tags.length; i++) {\r
- if (tags[i].text().length() > 0) {\r
- if (!firstEntry) {\r
- result.append(", ");\r
- }\r
- else {\r
- firstEntry = false;\r
- }\r
- result.append(tags[i].text());\r
- }\r
- }\r
- result.append("</dd>");\r
- result.append("</dl>");\r
- return result.toString();\r
- }\r
- else {\r
- return null;\r
- }\r
- }\r
- }\r
-\r
- /**\r
- * Enables/disables this taglet.\r
- */\r
- public static void setTagletEnabled(boolean enabled)\r
- {\r
- VersionTaglet.enabled = enabled;\r
- }\r
-}\r
+/* gnu.classpath.tools.taglets.VersionTaglet
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.tools.taglets;
+
+import java.util.Map;
+
+import com.sun.tools.doclets.Taglet;
+
+import com.sun.javadoc.Tag;
+
+/**
+ * The default Taglet which handles version information.
+ *
+ * @author Julian Scheid (julian@sektor37.de)
+ */
+public class VersionTaglet implements Taglet {
+
+ private static final String NAME = "version";
+ private static final String HEADER = "Version:";
+
+ private static boolean enabled = true;
+
+ public String getName() {
+ return NAME;
+ }
+
+ public boolean inField() {
+ return true;
+ }
+
+ public boolean inConstructor() {
+ return true;
+ }
+
+ public boolean inMethod() {
+ return true;
+ }
+
+ public boolean inOverview() {
+ return true;
+ }
+
+ public boolean inPackage() {
+ return true;
+ }
+
+ public boolean inType() {
+ return true;
+ }
+
+ public boolean isInlineTag() {
+ return false;
+ }
+
+ public static void register(Map tagletMap) {
+ VersionTaglet versionTaglet = new VersionTaglet();
+ tagletMap.put(versionTaglet.getName(), versionTaglet);
+ }
+
+ public String toString(Tag tag) {
+ if (enabled) {
+ return toString(new Tag[] { tag });
+ }
+ else {
+ return null;
+ }
+ }
+
+ public String toString(Tag[] tags) {
+ if (!enabled || tags.length == 0) {
+ return null;
+ }
+ else {
+ boolean haveValidTag = false;
+ for (int i = 0; i < tags.length && !haveValidTag; ++i) {
+ if (tags[i].text().length() > 0) {
+ haveValidTag = true;
+ }
+ }
+
+ if (haveValidTag) {
+
+ StringBuffer result = new StringBuffer();
+ result.append("<dl class=\"tag list\">");
+ result.append("</dl>");
+ result.append("<dt class=\"tag section header\"><b>");
+ result.append(HEADER);
+ result.append("</b></dt><dd>");
+ boolean firstEntry = true;
+ for (int i = 0; i < tags.length; i++) {
+ if (tags[i].text().length() > 0) {
+ if (!firstEntry) {
+ result.append(", ");
+ }
+ else {
+ firstEntry = false;
+ }
+ result.append(tags[i].text());
+ }
+ }
+ result.append("</dd>");
+ result.append("</dl>");
+ return result.toString();
+ }
+ else {
+ return null;
+ }
+ }
+ }
+
+ /**
+ * Enables/disables this taglet.
+ */
+ public static void setTagletEnabled(boolean enabled)
+ {
+ VersionTaglet.enabled = enabled;
+ }
+}
#pragma interface
#include <java/lang/Object.h>
+#include <gcj/array.h>
+
extern "Java"
{
namespace gnu
public:
RequestedAttributes(::java::lang::String *);
void addValue(::java::lang::String *);
- ::java::util::List * getValues();
+ JArray< ::java::lang::String * > * getValues();
::java::lang::Class * getCategory();
::java::lang::String * getName();
::java::lang::String * toString();
public:
Selector(::java::lang::String *);
- virtual jboolean matches(JArray< ::java::lang::String * > *, JArray< ::java::util::Map * > *);
+ virtual jboolean matches(JArray< ::java::lang::String * > *, ::java::util::List *);
virtual jint getSpecificity();
virtual ::java::lang::String * toString();
private:
#pragma interface
-#include <javax/xml/stream/util/ReaderDelegate.h>
+#include <javax/xml/stream/util/StreamReaderDelegate.h>
extern "Java"
{
namespace gnu
}
}
-class gnu::xml::stream::FilteredStreamReader : public ::javax::xml::stream::util::ReaderDelegate
+class gnu::xml::stream::FilteredStreamReader : public ::javax::xml::stream::util::StreamReaderDelegate
{
public: // actually package-private
virtual jint next();
virtual jint nextTag();
public: // actually package-private
- ::javax::xml::stream::XMLStreamReader * __attribute__((aligned(__alignof__( ::javax::xml::stream::util::ReaderDelegate)))) reader;
+ ::javax::xml::stream::XMLStreamReader * __attribute__((aligned(__alignof__( ::javax::xml::stream::util::StreamReaderDelegate)))) reader;
::javax::xml::stream::StreamFilter * filter;
public:
static ::java::lang::Class class$;
{
namespace xml
{
+ namespace namespace$
+ {
+ class QName;
+ }
namespace stream
{
class Location;
{
public: // actually protected
- NamespaceImpl(::javax::xml::stream::Location *, ::java::lang::String *, ::java::lang::String *);
+ NamespaceImpl(::javax::xml::stream::Location *, ::java::lang::String *, ::java::lang::String *, jboolean);
public:
virtual jint getEventType();
virtual ::java::lang::String * getPrefix();
virtual ::java::lang::String * getNamespaceURI();
+ virtual jboolean isSpecified();
+ virtual ::javax::xml::namespace$::QName * getName();
+ virtual ::java::lang::String * getDTDType();
+ virtual ::java::lang::String * getValue();
virtual jboolean isDefaultNamespaceDeclaration();
virtual void writeAsEncodedUnicode(::java::io::Writer *);
public: // actually protected
::java::lang::String * __attribute__((aligned(__alignof__( ::gnu::xml::stream::XMLEventImpl)))) prefix;
::java::lang::String * uri;
+ jboolean specified;
public:
static ::java::lang::Class class$;
};
#pragma interface
-#include <javax/xml/stream/util/ReaderDelegate.h>
+#include <javax/xml/stream/util/StreamReaderDelegate.h>
#include <gcj/array.h>
extern "Java"
}
}
-class gnu::xml::stream::XIncludeFilter : public ::javax::xml::stream::util::ReaderDelegate
+class gnu::xml::stream::XIncludeFilter : public ::javax::xml::stream::util::StreamReaderDelegate
{
public: // actually package-private
static ::java::lang::String * getParameter(::java::lang::String *, ::java::lang::String *);
static ::java::lang::String * XINCLUDE_NS_URI;
static const jint SHOW_FLAGS = 221;
- ::java::lang::String * __attribute__((aligned(__alignof__( ::javax::xml::stream::util::ReaderDelegate)))) systemId;
+ ::java::lang::String * __attribute__((aligned(__alignof__( ::javax::xml::stream::util::StreamReaderDelegate)))) systemId;
jboolean namespaceAware;
jboolean validating;
jboolean expandERefs;
void writeEncoded(::java::lang::String *, jboolean);
void writeEncodedWithRestrictedChars(::java::lang::String *, jboolean);
jboolean isName(::java::lang::String *);
+ jboolean isPrefix(::java::lang::String *);
jboolean isNCName(::java::lang::String *);
jboolean isChars(::java::lang::String *);
jboolean isURI(::java::lang::String *);
void checkDestroyed();
public:
virtual ::java::lang::String * toString();
+ virtual jint getSessionKeyType();
private:
static const jlong serialVersionUID = 7395334370157380539LL;
static const jint FORWARDABLE = 1;
::java::lang::String * getAlgorithm();
JArray< jbyte > * getEncoded();
::java::lang::String * getFormat();
+ ::java::lang::String * toString();
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) algorithm;
jint type;
JArray< jbyte > * key;
::java::lang::String * escapeCharHtmlEntity(jchar);
::java::io::Writer * __attribute__((aligned(__alignof__( ::javax::swing::text::AbstractWriter)))) outWriter;
::javax::swing::text::html::HTMLDocument * htmlDoc;
- ::java::util::HashSet * openEmbededTagHashSet;
+ ::java::util::HashSet * openEmbeddedTagHashSet;
::java::lang::String * new_line_str;
JArray< jchar > * html_entity_char_arr;
JArray< ::java::lang::String * > * html_entity_escape_str_arr;
void writeStyle(::javax::swing::text::Style *);
jboolean hasText(::javax::swing::text::Element *);
::javax::swing::text::StyledDocument * __attribute__((aligned(__alignof__( ::javax::swing::text::AbstractWriter)))) doc;
- ::java::util::Stack * tagStack;
+ ::java::util::Deque * tagStack;
jboolean inFontTag__;
public:
static ::java::lang::Class class$;
private:
::javax::swing::text::Style * getResolvedStyle(::java::lang::String *, ::java::util::List *, ::javax::swing::text::html::HTML$Tag *);
::javax::swing::text::Style * resolveStyle(::java::lang::String *, ::java::util::List *, ::javax::swing::text::html::HTML$Tag *);
- ::javax::swing::text::Style * resolveStyle(::java::lang::String *, JArray< ::java::lang::String * > *, JArray< ::java::util::Map * > *);
+ ::javax::swing::text::Style * resolveStyle(::java::lang::String *, JArray< ::java::lang::String * > *, ::java::util::List *);
public:
virtual ::javax::swing::text::Style * getRule(::java::lang::String *);
virtual void addRule(::java::lang::String *);
XMLEventFactory();
public:
static ::javax::xml::stream::XMLEventFactory * newInstance();
-public: // actually package-private
static ::javax::xml::stream::XMLEventFactory * newInstance(::java::lang::String *, ::java::lang::ClassLoader *);
private:
static ::java::lang::String * getFactoryClassName(::java::lang::ClassLoader *, jint);
namespace stream
{
class XMLEventWriter;
- class XMLInputFactory;
class XMLOutputFactory;
class XMLStreamWriter;
}
XMLOutputFactory();
public:
static ::javax::xml::stream::XMLOutputFactory * newInstance();
+ static ::javax::xml::stream::XMLOutputFactory * newInstance(::java::lang::String *, ::java::lang::ClassLoader *);
private:
static ::java::lang::String * getFactoryClassName(::java::lang::ClassLoader *, jint);
public:
- static ::javax::xml::stream::XMLInputFactory * newInstance(::java::lang::String *, ::java::lang::ClassLoader *);
virtual ::javax::xml::stream::XMLStreamWriter * createXMLStreamWriter(::java::io::Writer *) = 0;
virtual ::javax::xml::stream::XMLStreamWriter * createXMLStreamWriter(::java::io::OutputStream *) = 0;
virtual ::javax::xml::stream::XMLStreamWriter * createXMLStreamWriter(::java::io::OutputStream *, ::java::lang::String *) = 0;
virtual ::java::lang::String * getPrefix() = 0;
virtual ::java::lang::String * getNamespaceURI() = 0;
virtual jboolean isDefaultNamespaceDeclaration() = 0;
+ virtual ::javax::xml::namespace$::QName * getName() = 0;
+ virtual ::java::lang::String * getValue() = 0;
+ virtual ::java::lang::String * getDTDType() = 0;
+ virtual jboolean isSpecified() = 0;
virtual jint getEventType() = 0;
virtual ::javax::xml::stream::Location * getLocation() = 0;
virtual jboolean isStartElement() = 0;
--- /dev/null
+
+// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
+
+#ifndef __javax_xml_stream_util_StreamReaderDelegate__
+#define __javax_xml_stream_util_StreamReaderDelegate__
+
+#pragma interface
+
+#include <java/lang/Object.h>
+#include <gcj/array.h>
+
+extern "Java"
+{
+ namespace javax
+ {
+ namespace xml
+ {
+ namespace namespace$
+ {
+ class NamespaceContext;
+ class QName;
+ }
+ namespace stream
+ {
+ class Location;
+ class XMLStreamReader;
+ namespace util
+ {
+ class StreamReaderDelegate;
+ }
+ }
+ }
+ }
+}
+
+class javax::xml::stream::util::StreamReaderDelegate : public ::java::lang::Object
+{
+
+public:
+ StreamReaderDelegate();
+ StreamReaderDelegate(::javax::xml::stream::XMLStreamReader *);
+ virtual void setParent(::javax::xml::stream::XMLStreamReader *);
+ virtual ::javax::xml::stream::XMLStreamReader * getParent();
+ virtual jint next();
+ virtual jint nextTag();
+ virtual ::java::lang::String * getElementText();
+ virtual void require(jint, ::java::lang::String *, ::java::lang::String *);
+ virtual jboolean hasNext();
+ virtual void close();
+ virtual ::java::lang::String * getNamespaceURI(::java::lang::String *);
+ virtual ::javax::xml::namespace$::NamespaceContext * getNamespaceContext();
+ virtual jboolean isStartElement();
+ virtual jboolean isEndElement();
+ virtual jboolean isCharacters();
+ virtual jboolean isWhiteSpace();
+ virtual ::java::lang::String * getAttributeValue(::java::lang::String *, ::java::lang::String *);
+ virtual jint getAttributeCount();
+ virtual ::javax::xml::namespace$::QName * getAttributeName(jint);
+ virtual ::java::lang::String * getAttributePrefix(jint);
+ virtual ::java::lang::String * getAttributeNamespace(jint);
+ virtual ::java::lang::String * getAttributeLocalName(jint);
+ virtual ::java::lang::String * getAttributeType(jint);
+ virtual ::java::lang::String * getAttributeValue(jint);
+ virtual jboolean isAttributeSpecified(jint);
+ virtual jint getNamespaceCount();
+ virtual ::java::lang::String * getNamespacePrefix(jint);
+ virtual ::java::lang::String * getNamespaceURI(jint);
+ virtual jint getEventType();
+ virtual ::java::lang::String * getText();
+ virtual jint getTextCharacters(jint, JArray< jchar > *, jint, jint);
+ virtual JArray< jchar > * getTextCharacters();
+ virtual jint getTextStart();
+ virtual jint getTextLength();
+ virtual ::java::lang::String * getEncoding();
+ virtual jboolean hasText();
+ virtual ::javax::xml::stream::Location * getLocation();
+ virtual ::javax::xml::namespace$::QName * getName();
+ virtual ::java::lang::String * getLocalName();
+ virtual jboolean hasName();
+ virtual ::java::lang::String * getNamespaceURI();
+ virtual ::java::lang::String * getPrefix();
+ virtual ::java::lang::String * getVersion();
+ virtual jboolean isStandalone();
+ virtual jboolean standaloneSet();
+ virtual ::java::lang::String * getCharacterEncodingScheme();
+ virtual ::java::lang::String * getPITarget();
+ virtual ::java::lang::String * getPIData();
+ virtual ::java::lang::Object * getProperty(::java::lang::String *);
+private:
+ ::javax::xml::stream::XMLStreamReader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) parent;
+public:
+ static ::java::lang::Class class$;
+};
+
+#endif // __javax_xml_stream_util_StreamReaderDelegate__
classpath/javax/xml/stream/events/StartElement.java \
classpath/javax/xml/stream/events/XMLEvent.java \
classpath/javax/xml/stream/util/EventReaderDelegate.java \
-classpath/javax/xml/stream/util/ReaderDelegate.java \
+classpath/javax/xml/stream/util/StreamReaderDelegate.java \
classpath/javax/xml/stream/util/XMLEventAllocator.java \
classpath/javax/xml/stream/util/XMLEventConsumer.java \
classpath/javax/xml/transform/ErrorListener.java \