diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java index e8d4d798d..1347d1bdc 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/BeanGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -697,7 +697,12 @@ private void generateEnumBody(EnumOutline eo) { // [RESULT] // public value() { return value; } - type.method(JMod.PUBLIC, baseExposedType, "value").body()._return($value); + { + JMethod m = type.method(JMod.PUBLIC, baseExposedType, "value"); + m.javadoc().add(Messages.ENUM_VALUE_METHOD.toString()); + m.javadoc().addReturn().add(Messages.ENUM_VALUE_METHOD_RETURN.toString()); + m.body()._return($value); + } // [RESULT] // ( v) { @@ -739,6 +744,12 @@ private void generateEnumBody(EnumOutline eo) { } else { strForm = $v.invoke("toString"); } + + m.javadoc().add(Messages.ENUM_FROM_VALUE_METHOD.toString()); + m.javadoc().addParam($v).add(Messages.ENUM_FROM_VALUE_METHOD_PARAM.toString()); + m.javadoc().addReturn().add(Messages.ENUM_FROM_VALUE_METHOD_RETURN.toString()); + m.javadoc().addThrows(IllegalArgumentException.class).add(Messages.ENUM_FROM_VALUE_METHOD_THROW.toString()); + m.body()._throw(ex.arg(strForm)); } } else { diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/Messages.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/Messages.java index 7e4828d82..0cd9c089a 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/Messages.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/Messages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -25,6 +25,12 @@ enum Messages { ILLEGAL_CONSTRUCTOR_PARAM, // 1 arg OBJECT_FACTORY_CONFLICT, // 1 arg OBJECT_FACTORY_CONFLICT_RELATED, + ENUM_VALUE_METHOD, // 0 arg + ENUM_VALUE_METHOD_RETURN, // 0 arg + ENUM_FROM_VALUE_METHOD, // 0 arg + ENUM_FROM_VALUE_METHOD_PARAM, // 0 arg + ENUM_FROM_VALUE_METHOD_RETURN, // 0 arg + ENUM_FROM_VALUE_METHOD_THROW, // 0 arg ; private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getPackage().getName() + ".MessageBundle"); diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractFieldWithVar.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractFieldWithVar.java index 31f6a3fe4..95208ca85 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractFieldWithVar.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractFieldWithVar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -46,6 +46,10 @@ protected final void createField() { field = outline.implClass.field( JMod.PROTECTED, getFieldType(), prop.getName(false) ); + if (prop.javadoc != null && prop.javadoc.length() > 0) { + field.javadoc().add(prop.javadoc); + } + annotate(field); } diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractListField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractListField.java index ade117f78..1a53de12c 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractListField.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/AbstractListField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -24,7 +24,9 @@ import com.sun.codemodel.JPrimitiveType; import com.sun.codemodel.JType; import com.sun.tools.xjc.generator.bean.ClassOutlineImpl; +import com.sun.tools.xjc.generator.bean.MethodWriter; import com.sun.tools.xjc.model.CPropertyInfo; +import org.glassfish.jaxb.core.api.impl.NameConverter; /** * Common code for property renderer that generates a List as @@ -96,6 +98,10 @@ protected final void generate() { if(eagerInstanciation) field.init(newCoreList()); + if (prop.javadoc != null && prop.javadoc.length() > 0) { + field.javadoc().add(prop.javadoc); + } + annotate(field); // generate the rest of accessors @@ -141,7 +147,16 @@ private JExpression newCoreList() { /** Generates accessor methods. */ protected abstract void generateAccessors(); - + protected void appendJavadoc(MethodWriter writer) { + String pname = NameConverter.standard.toVariableName(prop.getName(true)); + List possibleTypes = listPossibleTypes(prop); + writer.javadoc().append(Messages.DEFAULT_GETTER_LIST_JAVADOC.format(pname, prop.getName(true))); + writer.javadoc().append(Messages.DEFAULT_GETTER_LIST_JAVADOC_TYPES.toString()) + .append(possibleTypes) + .append(Messages.DEFAULT_GETTER_LIST_JAVADOC_TYPES_END.toString()); + writer.javadoc().addReturn() + .append(Messages.DEFAULT_GETTER_LIST_RETURN.format(pname)); + } /** * diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.java index fbdebf403..401ee1874 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ArrayField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -101,7 +101,9 @@ public void generateAccessors() { // return (retVal); // } $getAll = writer.declareMethod( exposedType.array(),"get"+prop.getName(true)); - writer.javadoc().append(prop.javadoc); + if (prop.javadoc != null && prop.javadoc.length() > 0) { + writer.javadoc().append(prop.javadoc).append("\n\n"); + } body = $getAll.body(); body._if( acc.ref(true).eq(JExpr._null()) )._then() diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ContentListField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ContentListField.java index d2dd27b49..e426105f4 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ContentListField.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/ContentListField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -100,34 +100,14 @@ public void generateAccessors() { // return ; // } $get = writer.declareMethod(listT,"get"+prop.getName(true)); - writer.javadoc().append(prop.javadoc); + if (prop.javadoc != null && prop.javadoc.length() > 0) { + writer.javadoc().append(prop.javadoc).append("\n\n"); + } JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); - String pname = NameConverter.standard.toVariableName(prop.getName(true)); - writer.javadoc().append( - "Gets the value of the "+pname+" property.\n\n"+ - "

\n" + - "This accessor method returns a reference to the live list,\n" + - "not a snapshot. Therefore any modification you make to the\n" + - "returned list will be present inside the Jakarta XML Binding object.\n" + - "This is why there is not a {@code set} method for the " +pname+ " property.\n" + - "\n"+ - "

\n" + - "For example, to add a new item, do as follows:\n"+ - "

\n"+
-            "   get"+prop.getName(true)+"().add(newItem);\n"+
-            "
\n"+ - "\n\n" - ); - - writer.javadoc().append( - "

\n" + - "Objects of the following type(s) are allowed in the list\n") - .append(listPossibleTypes(prop)); - - writer.javadoc().addReturn().append("The value of the "+pname+" property."); + appendJavadoc(writer); } @Override diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/Messages.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/Messages.java index 62d5b35af..6f8e7e305 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/Messages.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/Messages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -18,8 +18,13 @@ * Message resources */ public enum Messages { - DEFAULT_GETTER_JAVADOC, // 1 arg - DEFAULT_SETTER_JAVADOC, // 1 arg + DEFAULT_GETTER_JAVADOC, // 1 arg + DEFAULT_GETTER_RETURN, // 0 arg + DEFAULT_GETTER_LIST_RETURN, // 1 arg + DEFAULT_SETTER_JAVADOC, // 1 arg + DEFAULT_GETTER_LIST_JAVADOC, // 2 args + DEFAULT_GETTER_LIST_JAVADOC_TYPES, // 0 arg + DEFAULT_GETTER_LIST_JAVADOC_TYPES_END, // 0 arg ; private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName().substring(0, Messages.class.getName().lastIndexOf('.'))+ ".MessageBundle"); diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/NoExtendedContentField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/NoExtendedContentField.java index 437d22e3c..78781bd02 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/NoExtendedContentField.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/NoExtendedContentField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -103,34 +103,14 @@ public void generateAccessors() { // return ; // } $get = writer.declareMethod(listT,"get"+prop.getName(true)); - writer.javadoc().append(prop.javadoc); + if (prop.javadoc != null && prop.javadoc.length() > 0) { + writer.javadoc().append(prop.javadoc).append("\n\n"); + } JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); - String pname = NameConverter.standard.toVariableName(prop.getName(true)); - writer.javadoc().append( - "Gets the value of the "+pname+" property.\n\n"+ - "

\n" + - "This accessor method returns a reference to the live list,\n" + - "not a snapshot. Therefore any modification you make to the\n" + - "returned list will be present inside the Jakarta XML Binding object.\n" + - "This is why there is not a {@code set} method for the " +pname+ " property.\n" + - "\n"+ - "

\n" + - "For example, to add a new item, do as follows:\n"+ - "

\n"+
-            "   get"+prop.getName(true)+"().add(newItem);\n"+
-            "
\n"+ - "\n\n" - ); - - writer.javadoc().append( - "

\n" + - "Objects of the following type(s) are allowed in the list\n") - .append(listPossibleTypes(prop)); - - writer.javadoc().addReturn().append("The value of the "+pname+" property."); + appendJavadoc(writer); } @Override diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/SingleField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/SingleField.java index 1eb785885..52576a074 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/SingleField.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/SingleField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -110,7 +110,7 @@ protected SingleField(ClassOutlineImpl context, CPropertyInfo prop, boolean forc List possibleTypes = listPossibleTypes(prop); writer.javadoc().addReturn() - .append("possible object is\n") + .append(Messages.DEFAULT_GETTER_RETURN.toString()) .append(possibleTypes); // [RESULT] @@ -133,6 +133,9 @@ protected SingleField(ClassOutlineImpl context, CPropertyInfo prop, boolean forc writer.javadoc().addParam($value) .append("allowed object is\n") .append(possibleTypes); + if (prop.javadoc != null && prop.javadoc.length() > 0) { + writer.javadoc().addXdoclet("see #" + $get.name() + "()"); + } } @Override diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/UntypedListField.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/UntypedListField.java index 726d86f8e..1f95c1583 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/UntypedListField.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/bean/field/UntypedListField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -98,34 +98,14 @@ public void generateAccessors() { // return ; // } $get = writer.declareMethod(listT,"get"+prop.getName(true)); - writer.javadoc().append(prop.javadoc); + if (prop.javadoc != null && prop.javadoc.length() > 0) { + writer.javadoc().append(prop.javadoc).append("\n\n"); + } JBlock block = $get.body(); fixNullRef(block); // avoid using an internal getter block._return(acc.ref(true)); - String pname = NameConverter.standard.toVariableName(prop.getName(true)); - writer.javadoc().append( - "Gets the value of the "+pname+" property.\n\n"+ - "

\n" + - "This accessor method returns a reference to the live list,\n" + - "not a snapshot. Therefore any modification you make to the\n" + - "returned list will be present inside the Jakarta XML Binding object.\n" + - "This is why there is not a {@code set} method for the " +pname+ " property.\n" + - "\n"+ - "

\n" + - "For example, to add a new item, do as follows:\n"+ - "

\n"+
-            "   get"+prop.getName(true)+"().add(newItem);\n"+
-            "
\n"+ - "\n\n" - ); - - writer.javadoc().append( - "

\n" + - "Objects of the following type(s) are allowed in the list\n") - .append(listPossibleTypes(prop)); - - writer.javadoc().addReturn().append("The value of the "+pname+" property."); + appendJavadoc(writer); } @Override diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.java index acda314ca..5e76db8d1 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/BGMBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -398,7 +398,7 @@ private BindInfo _getBindInfoReadOnly( XSComponent schemaComponent ) { BindInfo bi = externalBindInfos.get(schemaComponent); if(bi!=null) return bi; - XSAnnotation annon = schemaComponent.getAnnotation(); + XSAnnotation annon = _getXSAnnotation(schemaComponent); if(annon!=null) { bi = (BindInfo)annon.getAnnotation(); if(bi!=null) { @@ -411,6 +411,19 @@ private BindInfo _getBindInfoReadOnly( XSComponent schemaComponent ) { return null; } + private XSAnnotation _getXSAnnotation(XSComponent schemaComponent) { + XSAnnotation annon = schemaComponent.getAnnotation(); + if (annon != null) { + return annon; + } + if (schemaComponent instanceof XSParticle) { + annon = ((XSParticle) schemaComponent).getTerm().getAnnotation(); + } else if (schemaComponent instanceof XSAttributeUse) { + annon = ((XSAttributeUse) schemaComponent).getDecl().getAnnotation(); + } + return annon; + } + /** * A map that stores binding declarations augmented by XJC. */ diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java index a189c08bb..94b26d7af 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -391,13 +391,17 @@ private TypeUse find( XSSimpleType type ) { return CBuiltinLeafInfo.STRING.makeAdapted(SwaRefAdapterMarker.class,false); } + String documentation = ""; + if (info.getDocumentation() != null && info.getDocumentation().length() > 0) { + documentation = info.getDocumentation().trim(); + } // see if this type should be mapped to a type-safe enumeration by default. // if so, built a EnumXDucer from it and return it. if(type.isRestriction() && !noAutoEnum) { XSRestrictionSimpleType rst = type.asRestriction(); if(shouldBeMappedToTypeSafeEnumByDefault(rst)) { - r = bindToTypeSafeEnum(rst,null,null, Collections.emptyMap(), + r = bindToTypeSafeEnum(rst,null, documentation, Collections.emptyMap(), getEnumMemberMode(),null); if(r!=null) return r; @@ -644,7 +648,7 @@ private List buildCEnumConstants(XSRestrictionSimpleType type, bo for( XSFacet facet : type.getDeclaredFacets(XSFacet.FACET_ENUMERATION)) { String name=null; - String mdoc=builder.getBindInfo(facet).getDocumentation(); + String mdoc=builder.getBindInfo(facet).getDocumentation().trim(); if(!enums.add(facet.getValue().value)) continue; // ignore the 2nd occasion diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java index 40640b4a9..cd683cb1f 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java @@ -443,8 +443,11 @@ public CPropertyInfo createElementOrReferenceProperty( private T wrapUp(T prop, XSComponent source) { prop.javadoc = concat(javadoc, getBuilder().getBindInfo(source).getDocumentation()); - if(prop.javadoc==null) - prop.javadoc=""; + if (prop.javadoc == null) { + prop.javadoc = ""; + } else { + prop.javadoc = prop.javadoc.trim(); + } // decide the realization. FieldRenderer r; diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.properties index d4c276397..f6116a004 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,3 +32,21 @@ OBJECT_FACTORY_CONFLICT = \ OBJECT_FACTORY_CONFLICT_RELATED = \ (Related to above error) This is the other declaration. + +ENUM_VALUE_METHOD = \ + Gets the value associated to the enum constant. + +ENUM_VALUE_METHOD_RETURN = \ + The value linked to the enum. + +ENUM_FROM_VALUE_METHOD = \ + Gets the enum associated to the value passed as parameter. + +ENUM_FROM_VALUE_METHOD_PARAM = \ + The value to get the enum from. + +ENUM_FROM_VALUE_METHOD_RETURN = \ + The enum which corresponds to the value, if it exists. + +ENUM_FROM_VALUE_METHOD_THROW = \ + If no value matches in the enum declaration. diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/field/MessageBundle.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/field/MessageBundle.properties index a422ee508..030aabbf2 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/field/MessageBundle.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/generator/bean/field/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -14,3 +14,30 @@ DEFAULT_SETTER_JAVADOC = \ DEFAULT_GETTER_JAVADOC = \ Gets the value of the {0} property. + +DEFAULT_GETTER_RETURN = \ + possible object is\n + +DEFAULT_GETTER_LIST_RETURN = \ + The value of the {0} property. + +DEFAULT_GETTER_LIST_JAVADOC = \ + Gets the value of the {0} property.\n\n\ +

This accessor method returns a reference to the live list,\n\ + not a snapshot. Therefore any modification you make to the\n\ + returned list will be present inside the JAXB object.\n\ + This is why there is not a set method for the {0} property.

\n\n\ +

\n\ + For example, to add a new item, do as follows:\n\ +

\n\ +
\n\
+            get{1}().add(newItem);\n\
+        
\n\ + \n\n + +DEFAULT_GETTER_LIST_JAVADOC_TYPES = \ +

\n\ + Objects of the following type(s) are allowed in the list\n\ + +DEFAULT_GETTER_LIST_JAVADOC_TYPES_END = \ +

\n diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.properties index 1908a25fe..e85763e52 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -40,8 +40,8 @@ ClassSelector.IncorrectPackageName = \ # {0} - name-identifier-format-enum ClassSelector.JavadocHeading = \ -

Java class for {0}.\n\n

The following schema fragment specifies the expected \ - content contained within this class. +

Java class for {0}

.\n\n

The following schema fragment specifies the expected \ + content contained within this class.

ClassSelector.JavadocLineUnknown = \ unknown diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_de.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_de.properties index eb22276c7..40121bcb8 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_de.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = Der angegebene Name ''{0}'' ist keine g\u00fc ClassSelector.IncorrectPackageName = Der Packagename ''{1}'', der f\u00fcr dieses Schema verwendet wird, ist kein g\u00fcltiger Packagename. # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

Java-Klasse f\u00fcr {0}.\n\n

Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. +ClassSelector.JavadocHeading =

Java-Klasse f\u00fcr {0}.

\n\n

Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.

ClassSelector.JavadocLineUnknown = unbekannt diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_es.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_es.properties index d963d98af..cdac4ec72 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_es.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = El nombre especificado ''{0}'' no es un ident ClassSelector.IncorrectPackageName = El nombre del paquete ''{1}'' utilizado para este esquema no es v\u00e1lido. # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

Clase Java para {0}.\n\n

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. +ClassSelector.JavadocHeading =

Clase Java para {0}.

\n\n

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.

ClassSelector.JavadocLineUnknown = desconocido diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_fr.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_fr.properties index 1e1e8168e..c624be352 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_fr.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = Le nom ''{0}'' indiqu\u00e9 n''est pas un ide ClassSelector.IncorrectPackageName = Le nom de package ''{1}'' utilis\u00e9 pour ce sch\u00e9ma n''est pas un nom de package valide. # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

Classe Java pour {0}.\n\n

Le fragment de sch\u00e9ma suivant indique le contenu attendu figurant dans cette classe. +ClassSelector.JavadocHeading =

Classe Java pour {0}.

\n\n

Le fragment de sch\u00e9ma suivant indique le contenu attendu figurant dans cette classe.

ClassSelector.JavadocLineUnknown = inconnu diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_it.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_it.properties index abf91d4d9..2811d47b0 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_it.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = Il nome specificato "{0}" non \u00e8 un ident ClassSelector.IncorrectPackageName = Il nome del package ''{1}'' usato per questo schema non \u00e8 un nome di package valido. # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

Classe Java per {0}.\n\n

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. +ClassSelector.JavadocHeading =

Classe Java per {0}.

\n\n

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe.

ClassSelector.JavadocLineUnknown = sconosciuto diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ko.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ko.properties index 8b92ef16f..9e1dcfa03 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ko.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = \uc9c0\uc815\ub41c \uc774\ub984 ''{0}''\uc740 ClassSelector.IncorrectPackageName = \uc774 \uc2a4\ud0a4\ub9c8\uc5d0 \uc0ac\uc6a9\ub41c \ud328\ud0a4\uc9c0 \uc774\ub984 ''{1}''\uc740(\ub294) \uc801\ud569\ud55c \ud328\ud0a4\uc9c0 \uc774\ub984\uc774 \uc544\ub2d9\ub2c8\ub2e4. # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

{0}\uc5d0 \ub300\ud55c Java \ud074\ub798\uc2a4\uc785\ub2c8\ub2e4.\n\n

\ub2e4\uc74c \uc2a4\ud0a4\ub9c8 \ub2e8\ud3b8\uc774 \uc774 \ud074\ub798\uc2a4\uc5d0 \ud3ec\ud568\ub418\ub294 \ud544\uc694\ud55c \ucf58\ud150\uce20\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4. +ClassSelector.JavadocHeading =

{0}\uc5d0 \ub300\ud55c Java \ud074\ub798\uc2a4\uc785\ub2c8\ub2e4.

\n\n

\ub2e4\uc74c \uc2a4\ud0a4\ub9c8 \ub2e8\ud3b8\uc774 \uc774 \ud074\ub798\uc2a4\uc5d0 \ud3ec\ud568\ub418\ub294 \ud544\uc694\ud55c \ucf58\ud150\uce20\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.

ClassSelector.JavadocLineUnknown = \uc54c \uc218 \uc5c6\uc74c diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_pt_BR.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_pt_BR.properties index 69665f1c9..674f2f50f 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_pt_BR.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = O nome ''{0}'' especificado n\u00e3o \u00e9 u ClassSelector.IncorrectPackageName = O nome do pacote ''{1}'' usado para este esquema n\u00e3o \u00e9 v\u00e1lido. # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

Classe Java de {0}.\n\n

O seguinte fragmento do esquema especifica o conte\u00fado esperado contido dentro desta classe. +ClassSelector.JavadocHeading =

Classe Java de {0}.

\n\n

O seguinte fragmento do esquema especifica o conte\u00fado esperado contido dentro desta classe.

ClassSelector.JavadocLineUnknown = desconhecida diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_CN.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_CN.properties index b7051f9df..32f6d8559 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_CN.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = \u6307\u5b9a\u7684\u540d\u79f0 ''{0}'' \u4e0d ClassSelector.IncorrectPackageName = \u7528\u4e8e\u6b64\u6a21\u5f0f\u7684\u7a0b\u5e8f\u5305\u540d\u79f0 ''{1}'' \u4e0d\u662f\u6709\u6548\u7684\u7a0b\u5e8f\u5305\u540d\u79f0\u3002 # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

{0}\u7684 Java \u7c7b\u3002\n\n

\u4ee5\u4e0b\u6a21\u5f0f\u7247\u6bb5\u6307\u5b9a\u5305\u542b\u5728\u6b64\u7c7b\u4e2d\u7684\u9884\u671f\u5185\u5bb9\u3002 +ClassSelector.JavadocHeading =

{0}\u7684 Java \u7c7b\u3002

\n\n

\u4ee5\u4e0b\u6a21\u5f0f\u7247\u6bb5\u6307\u5b9a\u5305\u542b\u5728\u6b64\u7c7b\u4e2d\u7684\u9884\u671f\u5185\u5bb9\u3002

ClassSelector.JavadocLineUnknown = \u672a\u77e5 diff --git a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_TW.properties b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_TW.properties index 6e42c62de..dedc473ba 100644 --- a/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_TW.properties +++ b/jaxb-ri/xjc/src/main/resources/com/sun/tools/xjc/reader/xmlschema/MessageBundle_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -32,7 +32,7 @@ ClassSelector.IncorrectClassName = \u6307\u5b9a\u7684\u540d\u7a31 ''{0}'' \u4e0d ClassSelector.IncorrectPackageName = \u4f7f\u7528\u65bc\u6b64\u7db1\u8981\u7684\u5957\u88dd\u7a0b\u5f0f\u540d\u7a31 ''{1}'' \u4e0d\u662f\u6709\u6548\u7684\u5957\u88dd\u7a0b\u5f0f\u540d\u7a31. # {0} - name-identifier-format-enum -ClassSelector.JavadocHeading =

{0} \u7684 Java \u985e\u5225.\n\n

\u4e0b\u5217\u7db1\u8981\u7247\u6bb5\u6703\u6307\u5b9a\u6b64\u985e\u5225\u4e2d\u5305\u542b\u7684\u9810\u671f\u5167\u5bb9. +ClassSelector.JavadocHeading =

{0} \u7684 Java \u985e\u5225.

\n\n

\u4e0b\u5217\u7db1\u8981\u7247\u6bb5\u6703\u6307\u5b9a\u6b64\u985e\u5225\u4e2d\u5305\u542b\u7684\u9810\u671f\u5167\u5bb9.

ClassSelector.JavadocLineUnknown = \u4e0d\u660e