This commit is contained in:
Christian Tornqvist 2015-02-18 19:27:49 -08:00
commit b92cbf650b
348 changed files with 9428 additions and 3069 deletions

View File

@ -291,3 +291,5 @@ bfc24ae2b900187585079bb11e66e459d1e525fe jdk9-b45
722378bc599e38d9a1dd484de30f10dfd7b21438 jdk9-b46
8327024a99559982b848e9c2191da9c0bf8838fd jdk9-b47
b2f9702efbe95527ea3a991474fda23987ff1c5c jdk9-b48
5b8db585a33c3cc48e70e688ceee57dd9271dc5d jdk9-b49
1550b2f6b63d1411fa84dc7bbc6f04809aedb43f jdk9-b50

View File

@ -291,3 +291,5 @@ f7c11da0b0481d49cc7a65a453336c108191e821 jdk9-b42
12f1e276447bcc81516e85367d53e4f08897049d jdk9-b46
b6cca3e6175a69f39e5799b7349ddb0176630291 jdk9-b47
0064e246d83f6f9fc245c19b6d05041ecaf4b6d4 jdk9-b48
d91ed1951b948210590ce1394bea5515357246ba jdk9-b49
d1f37d39ff2421f956a6ddf316cf763807bc3363 jdk9-b50

View File

@ -1463,14 +1463,13 @@
<h4>Building with ccache</h4>
<p>A simple way to radically speed up compilation of native code
(typically hotspot and native libraries in JDK) is to install
ccache. This will cache and reuse prior compilation results, if the
source code is unchanged. However, ccache versions prior to 3.1.4
does not work correctly with the precompiled headers used in
OpenJDK. So if your platform supports ccache at 3.1.4 or later, we
highly recommend installing it. This is currently only supported on
linux.</p>
<p>The OpenJDK build supports building with ccache
when using gcc or clang. Using ccache can
radically speed up compilation of native code if
you often rebuild the same sources. Your milage
may vary however so we recommend evaluating it for
yourself. To enable it, make sure it's on the path
and configure with <code>--enable-ccache</code>.</p>
<h4>Building on local disk</h4>

View File

@ -242,6 +242,9 @@ AC_DEFUN_ONCE([BASIC_INIT],
[
# Save the original command line. This is passed to us by the wrapper configure script.
AC_SUBST(CONFIGURE_COMMAND_LINE)
# Save the path variable before it gets changed
ORIGINAL_PATH="$PATH"
AC_SUBST(ORIGINAL_PATH)
DATE_WHEN_CONFIGURED=`LANG=C date`
AC_SUBST(DATE_WHEN_CONFIGURED)
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])

View File

@ -164,19 +164,26 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
[enable using ccache to speed up recompilations @<:@disabled@:>@])])
CCACHE=
CCACHE_STATUS=
AC_MSG_CHECKING([is ccache enabled])
ENABLE_CCACHE=$enable_ccache
if test "x$enable_ccache" = xyes; then
AC_MSG_RESULT([yes])
OLD_PATH="$PATH"
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
AC_MSG_RESULT([yes])
OLD_PATH="$PATH"
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
fi
BASIC_REQUIRE_PROGS(CCACHE, ccache)
PATH="$OLD_PATH"
CCACHE_VERSION=[`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`]
CCACHE_STATUS="Active ($CCACHE_VERSION)"
else
AC_MSG_RESULT([no])
AC_MSG_WARN([ccache is not supported with toolchain type $TOOLCHAIN_TYPE])
fi
BASIC_REQUIRE_PROGS(CCACHE, ccache)
CCACHE_STATUS="enabled"
PATH="$OLD_PATH"
elif test "x$enable_ccache" = xno; then
AC_MSG_RESULT([no, explicitly disabled])
CCACHE_STATUS="Disabled"
elif test "x$enable_ccache" = x; then
AC_MSG_RESULT([no])
else
@ -206,35 +213,31 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
[
if test "x$CCACHE" != x; then
# Only use ccache if it is 3.1.4 or later, which supports
# precompiled headers.
AC_MSG_CHECKING([if ccache supports precompiled headers])
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
if test "x$HAS_GOOD_CCACHE" = x; then
AC_MSG_RESULT([no, disabling ccache])
CCACHE=
CCACHE_STATUS="disabled"
else
AC_MSG_RESULT([yes])
if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
HAS_BAD_CCACHE=[`$ECHO $CCACHE_VERSION | \
$GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]'`]
if test "x$HAS_BAD_CCACHE" != "x"; then
AC_MSG_ERROR([Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION])
fi
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
CCACHE_PRECOMP_FLAG="-fpch-preprocess"
PUSHED_FLAGS="$CXXFLAGS"
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
CXXFLAGS="$PUSHED_FLAGS"
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
AC_MSG_RESULT([yes])
CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
AC_SUBST(CFLAGS_CCACHE)
CCACHE_SLOPPINESS=pch_defines,time_macros
else
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
CCACHE=
CCACHE_STATUS="disabled"
AC_MSG_RESULT([no])
AC_MSG_ERROR([Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG])
fi
fi
fi
if test "x$CCACHE" != x; then
CCACHE_SLOPPINESS=time_macros
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
CCACHE_FLAGS=-fpch-preprocess
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
if test "x$SET_CCACHE_DIR" != x; then
mkdir -p $CCACHE_DIR > /dev/null 2>&1

View File

@ -40,8 +40,9 @@ if test "x$BASH" = x; then
echo "Error: This script must be run using bash." 1>&2
exit 1
fi
# Force autoconf to use bash
# Force autoconf to use bash. This also means we must disable autoconf re-exec.
export CONFIG_SHELL=$BASH
export _as_can_reexec=no
conf_script_dir="$TOPDIR/common/autoconf"

View File

@ -629,6 +629,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
CFLAGS_CCACHE
CCACHE
USE_PRECOMPILED_HEADER
SJAVAC_SERVER_DIR
@ -991,6 +992,7 @@ CAT
BASH
BASENAME
DATE_WHEN_CONFIGURED
ORIGINAL_PATH
CONFIGURE_COMMAND_LINE
target_alias
host_alias
@ -4333,7 +4335,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1421247827
DATE_WHEN_GENERATED=1423567509
###############################################################################
#
@ -4366,6 +4368,9 @@ DATE_WHEN_GENERATED=1421247827
# Save the original command line. This is passed to us by the wrapper configure script.
# Save the path variable before it gets changed
ORIGINAL_PATH="$PATH"
DATE_WHEN_CONFIGURED=`LANG=C date`
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
@ -27438,8 +27443,8 @@ $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
@ -27486,9 +27491,9 @@ $as_echo "present but broken" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
# Remove any trailing "\" and " " from the variables.
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
# Remove any trailing "\" ";" and " " from the variables.
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
@ -27499,6 +27504,268 @@ $as_echo "ok" >&6; }
# Convert VS_INCLUDE into SYSROOT_CFLAGS
OLDIFS="$IFS"
IFS=";"
for i in $VS_INCLUDE; do
ipath=$i
IFS="$OLDIFS"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# Input might be given as Windows format, start by converting to
# unix format.
path="$ipath"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-stile (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
if test "x$path" != "x$new_path"; then
ipath="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
path="$ipath"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
if test "x$path" != "x$new_path"; then
ipath="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
else
# We're on a unix platform. Hooray! :)
path="$ipath"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
fi
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
fi
ipath="`cd "$path"; $THEPWDCMD -L`"
fi
IFS=";"
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
done
# Convert VS_LIB into SYSROOT_LDFLAGS
for i in $VS_LIB; do
libpath=$i
IFS="$OLDIFS"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# Input might be given as Windows format, start by converting to
# unix format.
path="$libpath"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-stile (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
if test "x$path" != "x$new_path"; then
libpath="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
path="$libpath"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
if test "x$path" != "x$new_path"; then
libpath="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
else
# We're on a unix platform. Hooray! :)
path="$libpath"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
fi
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
fi
libpath="`cd "$path"; $THEPWDCMD -L`"
fi
IFS=";"
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
done
IFS="$OLDIFS"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
@ -50616,16 +50883,17 @@ fi
CCACHE=
CCACHE_STATUS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
$as_echo_n "checking is ccache enabled... " >&6; }
ENABLE_CCACHE=$enable_ccache
if test "x$enable_ccache" = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
OLD_PATH="$PATH"
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
fi
OLD_PATH="$PATH"
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
fi
@ -50819,11 +51087,19 @@ $as_echo "$tool_specified" >&6; }
fi
CCACHE_STATUS="enabled"
PATH="$OLD_PATH"
PATH="$OLD_PATH"
CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
CCACHE_STATUS="Active ($CCACHE_VERSION)"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
fi
elif test "x$enable_ccache" = xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
$as_echo "no, explicitly disabled" >&6; }
CCACHE_STATUS="Disabled"
elif test "x$enable_ccache" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@ -50854,23 +51130,17 @@ $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not e
if test "x$CCACHE" != x; then
if test "x$CCACHE" != x; then
# Only use ccache if it is 3.1.4 or later, which supports
# precompiled headers.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
if test "x$HAS_GOOD_CCACHE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
$as_echo "no, disabling ccache" >&6; }
CCACHE=
CCACHE_STATUS="disabled"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
$GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]'`
if test "x$HAS_BAD_CCACHE" != "x"; then
as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
CCACHE_PRECOMP_FLAG="-fpch-preprocess"
PUSHED_FLAGS="$CXXFLAGS"
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -50892,19 +51162,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
CCACHE_SLOPPINESS=pch_defines,time_macros
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
$as_echo "no, disabling ccaching of precompiled headers" >&6; }
CCACHE=
CCACHE_STATUS="disabled"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
fi
fi
fi
if test "x$CCACHE" != x; then
CCACHE_SLOPPINESS=time_macros
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
CCACHE_FLAGS=-fpch-preprocess
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
if test "x$SET_CCACHE_DIR" != x; then
mkdir -p $CCACHE_DIR > /dev/null 2>&1

View File

@ -109,8 +109,8 @@ LD:=@HOTSPOT_LD@
MT:=@HOTSPOT_MT@
RC:=@HOTSPOT_RC@
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE)
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ $(CFLAGS_CCACHE)
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
@ -132,6 +132,13 @@ else
ZIP_DEBUGINFO_FILES:=0
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
# On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
# environment variables (in Windows path style).
export INCLUDE:=@VS_INCLUDE@
export LIB:=@VS_LIB@
endif
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
# This is needed to get the LOG setting to work properly.
include $(SRC_ROOT)/make/common/MakeBase.gmk

View File

@ -129,14 +129,12 @@ LIBDL:=@LIBDL@
# colon or semicolon
PATH_SEP:=@PATH_SEP@
# Save the original path before replacing it with the Visual Studio tools
ORIGINAL_PATH:=@ORIGINAL_PATH@
ifeq ($(OPENJDK_TARGET_OS), windows)
# On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
# environment variables (in Windows path style), and the PATH needs to
# be adjusted to include Visual Studio tools (but this needs to be in
# cygwin/msys style).
# On Windows, the Visual Studio toolchain needs the PATH to be adjusted
# to include Visual Studio tools (this needs to be in cygwin/msys style).
export PATH:=@VS_PATH@
export INCLUDE:=@VS_INCLUDE@
export LIB:=@VS_LIB@
endif
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
@ -328,6 +326,8 @@ CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @CC@

View File

@ -213,9 +213,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
else
AC_MSG_RESULT([ok])
# Remove any trailing "\" and " " from the variables.
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
# Remove any trailing "\" ";" and " " from the variables.
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
@ -226,6 +226,26 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_SUBST(VS_PATH)
AC_SUBST(VS_INCLUDE)
AC_SUBST(VS_LIB)
# Convert VS_INCLUDE into SYSROOT_CFLAGS
OLDIFS="$IFS"
IFS=";"
for i in $VS_INCLUDE; do
ipath=$i
IFS="$OLDIFS"
BASIC_FIXUP_PATH([ipath])
IFS=";"
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
done
# Convert VS_LIB into SYSROOT_LDFLAGS
for i in $VS_LIB; do
libpath=$i
IFS="$OLDIFS"
BASIC_FIXUP_PATH([libpath])
IFS=";"
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
done
IFS="$OLDIFS"
fi
else
AC_MSG_RESULT([not found])

View File

@ -123,6 +123,7 @@ jdk/src/java.base/share/classes/java/lang/reflect : jdk/src/share/classes/java/l
jdk/src/java.base/share/classes/java/math : jdk/src/share/classes/java/math
jdk/src/java.base/share/classes/java/net : jdk/src/share/classes/java/net
jdk/src/java.base/share/classes/java/nio : jdk/src/share/classes/java/nio
jdk/src/java.base/share/classes/java/security/acl : jdk/src/share/classes/java/security/acl
jdk/src/java.base/share/classes/java/security/cert : jdk/src/share/classes/java/security/cert
jdk/src/java.base/share/classes/java/security/interfaces : jdk/src/share/classes/java/security/interfaces
jdk/src/java.base/share/classes/java/security : jdk/src/share/classes/java/security
@ -179,6 +180,7 @@ jdk/src/java.base/share/classes/sun/nio/ch : jdk/src/share/classes/sun/nio/ch
jdk/src/java.base/share/classes/sun/nio/cs : jdk/src/share/classes/sun/nio/cs
jdk/src/java.base/share/classes/sun/nio/fs : jdk/src/share/classes/sun/nio/fs
jdk/src/java.base/share/classes/sun/reflect : jdk/src/share/classes/sun/reflect
jdk/src/java.base/share/classes/sun/security/acl : jdk/src/share/classes/sun/security/acl
jdk/src/java.base/share/classes/sun/security/action : jdk/src/share/classes/sun/security/action
jdk/src/java.base/share/classes/sun/security/internal : jdk/src/share/classes/sun/security/internal
jdk/src/java.base/share/classes/sun/security/jca : jdk/src/share/classes/sun/security/jca
@ -1211,8 +1213,6 @@ jdk/src/java.rmi/share/doc/stub/java/rmi/activation : jdk/src/share/doc/stub/jav
jdk/src/java.rmi/unix/bin/java-rmi.cgi.sh : jdk/src/solaris/bin/java-rmi.cgi.sh
jdk/src/java.scripting/share/classes/javax/script : jdk/src/share/classes/javax/script
jdk/src/java.scripting/share/classes/com/sun/tools/script/shell : jdk/src/share/classes/com/sun/tools/script/shell
jdk/src/java.security.acl/share/classes/java/security/acl : jdk/src/share/classes/java/security/acl
jdk/src/java.security.acl/share/classes/sun/security/acl : jdk/src/share/classes/sun/security/acl
jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c : jdk/src/share/native/sun/security/krb5/nativeccache.c
jdk/src/java.security.jgss/macosx/native/libosxkrb5/SCDynamicStoreConfig.m : jdk/src/macosx/native/sun/security/krb5/SCDynamicStoreConfig.m
jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos : jdk/src/share/classes/javax/security/auth/kerberos

View File

@ -291,3 +291,5 @@ e27c725d6c9d155667b35255f442d4ceb8c3c084 jdk9-b40
326f2068b4a4c05e2fa27d6acf93eba7b54b090d jdk9-b46
ee8447ca632e1d39180b4767c749db101bff7314 jdk9-b47
a13c49c5f2899b702652a460ed7aa73123e671e6 jdk9-b48
9285d14eb7b6b0815679bae98dd936dbc136218d jdk9-b49
224f593393e5b01b3c8f1e591b7f4b1790a3737a jdk9-b50

View File

@ -451,3 +451,5 @@ c363a8b87e477ee45d6d3cb2a36cb365141bc596 jdk9-b38
a184ee1d717297bd35b7c3e35393e137921a3ed2 jdk9-b46
3b241fb72b8925b75941d612db762a6d5da66d02 jdk9-b47
cc775a4a24c7f5d9e624b4205e9fbd48a17331f6 jdk9-b48
360cd1fc42f10941a9fd17cc32d5b85a22d12a0b jdk9-b49
e0947f58c9c1426aa0d98b98ebb78357b27a7b99 jdk9-b50

View File

@ -291,3 +291,5 @@ a12d347f84176200593999f4da91ae2bb86865b2 jdk9-b39
74eaf7ad986576c792df4dbff05eed63e5727695 jdk9-b46
e391de88e69b59d7c618387e3cf91032f6991ce9 jdk9-b47
833051855168a973780fafeb6fc59e7370bcf400 jdk9-b48
786058752e0ac3e48d7aef79e0885d29d6a2a7eb jdk9-b49
74ead7bddde19263fd463bc1bd87de84f27d1b5e jdk9-b50

View File

@ -0,0 +1,585 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.datatype.ptests;
import static javax.xml.datatype.DatatypeConstants.DAYS;
import static javax.xml.datatype.DatatypeConstants.HOURS;
import static javax.xml.datatype.DatatypeConstants.MINUTES;
import static javax.xml.datatype.DatatypeConstants.MONTHS;
import static javax.xml.datatype.DatatypeConstants.SECONDS;
import static javax.xml.datatype.DatatypeConstants.YEARS;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Calendar;
import java.util.function.Function;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeConstants;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
import javax.xml.namespace.QName;
import jaxp.library.JAXPBaseTest;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/*
* @summary Class containing the test cases for Duration.
*/
public class DurationTest extends JAXPBaseTest {
private DatatypeFactory datatypeFactory;
/*
* Setup.
*/
@BeforeClass
public void setup() throws DatatypeConfigurationException {
datatypeFactory = DatatypeFactory.newInstance();
}
@DataProvider(name = "legal-number-duration")
public Object[][] getLegalNumberDuration() {
return new Object[][] {
// is positive, year, month, day, hour, minute, second
{ true, 1, 1, 1, 1, 1, 1 },
{ false, 1, 1, 1, 1, 1, 1 },
{ true, 1, 0, 0, 0, 0, 0 },
{ false, 1, 0, 0, 0, 0, 0 }
};
}
/*
* Test for constructor Duration(boolean isPositive,int years,int months,
* int days,int hours,int minutes,int seconds).
*/
@Test(dataProvider = "legal-number-duration")
public void checkNumberDurationPos(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds) {
datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
}
@DataProvider(name = "illegal-number-duration")
public Object[][] getIllegalNumberDuration() {
return new Object[][] {
// is positive, year, month, day, hour, minute, second
{ true, 1, 1, -1, 1, 1, 1 },
{ false, 1, 1, -1, 1, 1, 1 },
{ true, undef, undef, undef, undef, undef, undef },
{ false, undef, undef, undef, undef, undef, undef }
};
}
/*
* Test for constructor Duration(boolean isPositive,int years,int months,
* int days,int hours,int minutes,int seconds), if any of the fields is
* negative should throw IllegalArgumentException.
*/
@Test(expectedExceptions = IllegalArgumentException.class, dataProvider = "illegal-number-duration")
public void checkDurationNumberNeg(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds) {
datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
}
@DataProvider(name = "legal-bigint-duration")
public Object[][] getLegalBigIntegerDuration() {
return new Object[][] {
// is positive, year, month, day, hour, minute, second
{ true, zero, zero, zero, zero, zero, new BigDecimal(zero) },
{ false, zero, zero, zero, zero, zero, new BigDecimal(zero) },
{ true, one, one, one, one, one, new BigDecimal(one) },
{ false, one, one, one, one, one, new BigDecimal(one) },
{ true, null, null, null, null, null, new BigDecimal(one) },
{ false, null, null, null, null, null, new BigDecimal(one) } };
}
/*
* Test for constructor Duration(boolean isPositive,BigInteger
* years,BigInteger months, BigInteger days,BigInteger hours,BigInteger
* minutes,BigDecimal seconds).
*/
@Test(dataProvider = "legal-bigint-duration")
public void checkBigIntegerDurationPos(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes,
BigDecimal seconds) {
datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
}
@DataProvider(name = "illegal-bigint-duration")
public Object[][] getIllegalBigIntegerDuration() {
return new Object[][] {
// is positive, year, month, day, hour, minute, second
{ true, null, null, null, null, null, null },
{ false, null, null, null, null, null, null }
};
}
/*
* Test for constructor Duration(boolean isPositive,BigInteger
* years,BigInteger months, BigInteger days,BigInteger hours,BigInteger
* minutes,BigDecimal seconds), if all the fields are null should throw
* IllegalArgumentException.
*/
@Test(expectedExceptions = IllegalArgumentException.class, dataProvider = "illegal-bigint-duration")
public void checkBigIntegerDurationNeg(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes,
BigDecimal seconds) {
datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
}
@DataProvider(name = "legal-millisec-duration")
public Object[][] getLegalMilliSecondDuration() {
return new Object[][] { { 1000000 }, { 0 }, { Long.MAX_VALUE }, { Long.MIN_VALUE }
};
}
/*
* Test for constructor Duration(long durationInMilliSeconds)
*/
@Test(dataProvider = "legal-millisec-duration")
public void checkMilliSecondDuration(long millisec) {
datatypeFactory.newDuration(millisec);
}
@DataProvider(name = "legal-lexical-duration")
public Object[][] getLegalLexicalDuration() {
return new Object[][] { { "P1Y1M1DT1H1M1S" }, { "-P1Y1M1DT1H1M1S" } };
}
/*
* Test for constructor Duration(java.lang.String lexicalRepresentation)
*/
@Test(dataProvider = "legal-lexical-duration")
public void checkLexicalDurationPos(String lexRepresentation) {
datatypeFactory.newDuration(lexRepresentation);
}
@DataProvider(name = "illegal-lexical-duration")
public Object[][] getIllegalLexicalDuration() {
return new Object[][] {
{ null },
{ "P1Y1M1DT1H1M1S " },
{ " P1Y1M1DT1H1M1S" },
{ "X1Y1M1DT1H1M1S" },
{ "" },
{ "P1Y2MT" } // The designator 'T' shall be absent if all of the time items are absent in "PnYnMnDTnHnMnS"
};
}
/*
* Test for constructor Duration(java.lang.String lexicalRepresentation),
* null should throw NullPointerException, invalid lex should throw
* IllegalArgumentException
*/
@Test(expectedExceptions = { NullPointerException.class, IllegalArgumentException.class }, dataProvider = "illegal-lexical-duration")
public void checkLexicalDurationNeg(String lexRepresentation) {
datatypeFactory.newDuration(lexRepresentation);
}
@DataProvider(name = "equal-duration")
public Object[][] getEqualDurations() {
return new Object[][] { { "P1Y1M1DT1H1M1S", "P1Y1M1DT1H1M1S" } };
}
/*
* Test for compare() both durations valid and equal.
*/
@Test(dataProvider = "equal-duration")
public void checkDurationEqual(String lexRepresentation1, String lexRepresentation2) {
Duration duration1 = datatypeFactory.newDuration(lexRepresentation1);
Duration duration2 = datatypeFactory.newDuration(lexRepresentation2);
assertTrue(duration1.equals(duration2));
}
@DataProvider(name = "greater-duration")
public Object[][] getGreaterDuration() {
return new Object[][] {
{ "P1Y1M1DT1H1M2S", "P1Y1M1DT1H1M1S" },
{ "P1Y1M1DT1H1M1S", "-P1Y1M1DT1H1M2S" },
{ "P1Y1M1DT1H1M2S", "-P1Y1M1DT1H1M1S" },
{ "-P1Y1M1DT1H1M1S", "-P1Y1M1DT1H1M2S" }, };
}
/*
* Test for compare() both durations valid and lhs > rhs.
*/
@Test(dataProvider = "greater-duration")
public void checkDurationCompare(String lexRepresentation1, String lexRepresentation2) {
Duration duration1 = datatypeFactory.newDuration(lexRepresentation1);
Duration duration2 = datatypeFactory.newDuration(lexRepresentation2);
assertTrue(duration1.compare(duration2) == DatatypeConstants.GREATER);
}
@DataProvider(name = "not-equal-duration")
public Object[][] getNotEqualDurations() {
return new Object[][] {
{ "P1Y1M1DT1H1M1S", "-P1Y1M1DT1H1M1S" },
{ "P2Y1M1DT1H1M1S", "P1Y1M1DT1H1M1S" } };
}
/*
* Test for equals() both durations valid and lhs not equals rhs.
*/
@Test(dataProvider = "not-equal-duration")
public void checkDurationNotEqual(String lexRepresentation1, String lexRepresentation2) {
Duration duration1 = datatypeFactory.newDuration(lexRepresentation1);
Duration duration2 = datatypeFactory.newDuration(lexRepresentation2);
Assert.assertNotEquals(duration1, duration2);
}
@DataProvider(name = "duration-sign")
public Object[][] getDurationAndSign() {
return new Object[][] {
{ "P0Y0M0DT0H0M0S", 0 },
{ "P1Y0M0DT0H0M0S", 1 },
{ "-P1Y0M0DT0H0M0S", -1 } };
}
/*
* Test for Duration.getSign().
*/
@Test(dataProvider = "duration-sign")
public void checkDurationSign(String lexRepresentation, int sign) {
Duration duration = datatypeFactory.newDuration(lexRepresentation);
assertEquals(duration.getSign(), sign);
}
/*
* Test for Duration.negate().
*/
@Test
public void checkDurationNegate() {
Duration durationPos = datatypeFactory.newDuration("P1Y0M0DT0H0M0S");
Duration durationNeg = datatypeFactory.newDuration("-P1Y0M0DT0H0M0S");
assertEquals(durationPos.negate(), durationNeg);
assertEquals(durationNeg.negate(), durationPos);
assertEquals(durationPos.negate().negate(), durationPos);
}
/*
* Test for Duration.isShorterThan(Duration) and
* Duration.isLongerThan(Duration).
*/
@Test
public void checkDurationShorterLonger() {
Duration shorter = datatypeFactory.newDuration("P1Y1M1DT1H1M1S");
Duration longer = datatypeFactory.newDuration("P2Y1M1DT1H1M1S");
assertTrue(shorter.isShorterThan(longer));
assertFalse(longer.isShorterThan(shorter));
assertFalse(shorter.isShorterThan(shorter));
assertTrue(longer.isLongerThan(shorter));
assertFalse(shorter.isLongerThan(longer));
assertFalse(shorter.isLongerThan(shorter));
}
/*
* Test for Duration.isSet().
*/
@Test
public void checkDurationIsSet() {
Duration duration1 = datatypeFactory.newDuration(true, 1, 1, 1, 1, 1, 1);
Duration duration2 = datatypeFactory.newDuration(true, 0, 0, 0, 0, 0, 0);
assertTrue(duration1.isSet(YEARS));
assertTrue(duration1.isSet(MONTHS));
assertTrue(duration1.isSet(DAYS));
assertTrue(duration1.isSet(HOURS));
assertTrue(duration1.isSet(MINUTES));
assertTrue(duration1.isSet(SECONDS));
assertTrue(duration2.isSet(YEARS));
assertTrue(duration2.isSet(MONTHS));
assertTrue(duration2.isSet(DAYS));
assertTrue(duration2.isSet(HOURS));
assertTrue(duration2.isSet(MINUTES));
assertTrue(duration2.isSet(SECONDS));
Duration duration66 = datatypeFactory.newDuration(true, null, null, zero, null, null, null);
assertFalse(duration66.isSet(YEARS));
assertFalse(duration66.isSet(MONTHS));
assertFalse(duration66.isSet(HOURS));
assertFalse(duration66.isSet(MINUTES));
assertFalse(duration66.isSet(SECONDS));
Duration duration3 = datatypeFactory.newDuration("P1D");
assertFalse(duration3.isSet(YEARS));
assertFalse(duration3.isSet(MONTHS));
assertFalse(duration3.isSet(HOURS));
assertFalse(duration3.isSet(MINUTES));
assertFalse(duration3.isSet(SECONDS));
}
/*
* Test Duration.isSet(Field) throws NPE if the field parameter is null.
*/
@Test(expectedExceptions = NullPointerException.class)
public void checkDurationIsSetNeg() {
Duration duration = datatypeFactory.newDuration(true, 0, 0, 0, 0, 0, 0);
duration.isSet(null);
}
/*
* Test for -getField(DatatypeConstants.Field) DatatypeConstants.Field is
* null - throws NPE.
*/
@Test(expectedExceptions = NullPointerException.class)
public void checkDurationGetFieldNeg() {
Duration duration67 = datatypeFactory.newDuration("P1Y1M1DT1H1M1S");
duration67.getField(null);
}
@DataProvider(name = "duration-fields")
public Object[][] getDurationAndFields() {
return new Object[][] {
{ "P1Y1M1DT1H1M1S", one, one, one, one, one, new BigDecimal(one) },
{ "PT1M", null, null, null, null, one, null },
{ "P1M", null, one, null, null, null, null } };
}
/*
* Test for Duration.getField(DatatypeConstants.Field).
*/
@Test(dataProvider = "duration-fields")
public void checkDurationGetField(String lexRepresentation, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes,
BigDecimal seconds) {
Duration duration = datatypeFactory.newDuration(lexRepresentation);
assertEquals(duration.getField(YEARS), years);
assertEquals(duration.getField(MONTHS), months);
assertEquals(duration.getField(DAYS), days);
assertEquals(duration.getField(HOURS), hours);
assertEquals(duration.getField(MINUTES), minutes);
assertEquals(duration.getField(SECONDS), seconds);
}
@DataProvider(name = "number-string")
public Object[][] getNumberAndString() {
return new Object[][] {
// is positive, year, month, day, hour, minute, second, lexical
{ true, 1, 1, 1, 1, 1, 1, "P1Y1M1DT1H1M1S" },
{ false, 1, 1, 1, 1, 1, 1, "-P1Y1M1DT1H1M1S" },
{ true, 0, 0, 0, 0, 0, 0, "P0Y0M0DT0H0M0S" },
{ false, 0, 0, 0, 0, 0, 0, "P0Y0M0DT0H0M0S" }
};
}
/*
* Test for - toString().
*/
@Test(dataProvider = "number-string")
public void checkDurationToString(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds, String lexical) {
Duration duration = datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
assertEquals(duration.toString(), lexical);
assertEquals(datatypeFactory.newDuration(duration.toString()), duration);
}
@DataProvider(name = "duration-field")
public Object[][] getDurationAndField() {
Function<Duration, Integer> getyears = duration -> duration.getYears();
Function<Duration, Integer> getmonths = duration -> duration.getMonths();
Function<Duration, Integer> getdays = duration -> duration.getDays();
Function<Duration, Integer> gethours = duration -> duration.getHours();
Function<Duration, Integer> getminutes = duration -> duration.getMinutes();
Function<Duration, Integer> getseconds = duration -> duration.getSeconds();
return new Object[][] {
{ "P1Y1M1DT1H1M1S", getyears, 1 },
{ "P1M1DT1H1M1S", getyears, 0 },
{ "P1Y1M1DT1H1M1S", getmonths, 1 },
{ "P1Y1DT1H1M1S", getmonths, 0 },
{ "P1Y1M1DT1H1M1S", getdays, 1 },
{ "P1Y1MT1H1M1S", getdays, 0 },
{ "P1Y1M1DT1H1M1S", gethours, 1 },
{ "P1Y1M1DT1M1S", gethours, 0 },
{ "P1Y1M1DT1H1M1S", getminutes, 1 },
{ "P1Y1M1DT1H1S", getminutes, 0 },
{ "P1Y1M1DT1H1M1S", getseconds, 1 },
{ "P1Y1M1DT1H1M", getseconds, 0 },
{ "P1Y1M1DT1H1M100000000S", getseconds, 100000000 }, };
}
/*
* Test for Duration.getYears(), getMonths(), etc.
*/
@Test(dataProvider = "duration-field")
public void checkDurationGetOneField(String lexRepresentation, Function<Duration, Integer> getter, int value) {
Duration duration = datatypeFactory.newDuration(lexRepresentation);
assertEquals(getter.apply(duration).intValue(), value);
}
/*
* Test for - getField(SECONDS)
*/
@Test
public void checkDurationGetSecondsField() {
Duration duration85 = datatypeFactory.newDuration("P1Y1M1DT1H1M100000000S");
assertEquals((duration85.getField(SECONDS)).intValue(), 100000000);
}
/*
* getTimeInMillis(java.util.Calendar startInstant) returns milliseconds
* between startInstant and startInstant plus this Duration.
*/
@Test
public void checkDurationGetTimeInMillis() {
Duration duration86 = datatypeFactory.newDuration("PT1M1S");
Calendar calendar86 = Calendar.getInstance();
assertEquals(duration86.getTimeInMillis(calendar86), 61000);
}
/*
* getTimeInMillis(java.util.Calendar startInstant) returns milliseconds
* between startInstant and startInstant plus this Duration throws NPE if
* startInstant parameter is null.
*/
@Test(expectedExceptions = NullPointerException.class)
public void checkDurationGetTimeInMillisNeg() {
Duration duration87 = datatypeFactory.newDuration("PT1M1S");
Calendar calendar87 = null;
duration87.getTimeInMillis(calendar87);
}
@DataProvider(name = "duration-for-hash")
public Object[][] getDurationsForHash() {
return new Object[][] {
{ "P1Y1M1DT1H1M1S", "P1Y1M1DT1H1M1S" },
{ "P1D", "PT24H" },
{ "PT1H", "PT60M" },
{ "PT1M", "PT60S" },
{ "P1Y", "P12M" } };
}
/*
* Test for Duration.hashcode(). hashcode() should return same value for
* some equal durations.
*/
@Test(dataProvider = "duration-for-hash")
public void checkDurationHashCode(String lexRepresentation1, String lexRepresentation2) {
Duration duration1 = datatypeFactory.newDuration(lexRepresentation1);
Duration duration2 = datatypeFactory.newDuration(lexRepresentation2);
int hash1 = duration1.hashCode();
int hash2 = duration2.hashCode();
assertTrue(hash1 == hash2, " generated hash1 : " + hash1 + " generated hash2 : " + hash2);
}
@DataProvider(name = "duration-for-add")
public Object[][] getDurationsForAdd() {
return new Object[][] {
// initVal, addVal, resultVal
{ "P1Y1M1DT1H1M1S", "P1Y1M1DT1H1M1S", "P2Y2M2DT2H2M2S" },
{ "P1Y1M1DT1H1M1S", "-P1Y1M1DT1H1M1S", "P0Y0M0DT0H0M0S" },
{ "-P1Y1M1DT1H1M1S", "-P1Y1M1DT1H1M1S", "-P2Y2M2DT2H2M2S" }, };
}
/*
* Test for add(Duration rhs).
*/
@Test(dataProvider = "duration-for-add")
public void checkDurationAdd(String initVal, String addVal, String result) {
Duration durationInit = datatypeFactory.newDuration(initVal);
Duration durationAdd = datatypeFactory.newDuration(addVal);
Duration durationResult = datatypeFactory.newDuration(result);
assertEquals(durationInit.add(durationAdd), durationResult);
}
@DataProvider(name = "duration-for-addneg")
public Object[][] getDurationsForAddNeg() {
return new Object[][] {
// initVal, addVal
{ "P1Y1M1DT1H1M1S", null },
{ "P1Y", "-P1D" },
{ "-P1Y", "P1D" }, };
}
/*
* Test for add(Duration rhs) 'rhs' is null , should throw NPE. "1 year" +
* "-1 day" or "-1 year" + "1 day" should throw IllegalStateException
*/
@Test(expectedExceptions = { NullPointerException.class, IllegalStateException.class }, dataProvider = "duration-for-addneg")
public void checkDurationAddNeg(String initVal, String addVal) {
Duration durationInit = datatypeFactory.newDuration(initVal);
Duration durationAdd = addVal == null ? null : datatypeFactory.newDuration(addVal);
durationInit.add(durationAdd);
}
/*
* Test Duration#compare(Duration duration) with large durations.
*
* Bug # 4972785 UnsupportedOperationException is expected
*
*/
@Test(expectedExceptions = UnsupportedOperationException.class)
public void checkDurationCompareLarge() {
String duration1Lex = "P100000000000000000000D";
String duration2Lex = "PT2400000000000000000000H";
Duration duration1 = datatypeFactory.newDuration(duration1Lex);
Duration duration2 = datatypeFactory.newDuration(duration2Lex);
duration1.compare(duration2);
}
/*
* Test Duration#getXMLSchemaType().
*
* Bug # 5049544 Duration.getXMLSchemaType shall return the correct result
*
*/
@Test
public void checkDurationGetXMLSchemaType() {
// DURATION
Duration duration = datatypeFactory.newDuration("P1Y1M1DT1H1M1S");
QName duration_xmlSchemaType = duration.getXMLSchemaType();
assertEquals(duration_xmlSchemaType, DatatypeConstants.DURATION, "Expected DatatypeConstants.DURATION, returned " + duration_xmlSchemaType.toString());
// DURATION_DAYTIME
Duration duration_dayTime = datatypeFactory.newDuration("P1DT1H1M1S");
QName duration_dayTime_xmlSchemaType = duration_dayTime.getXMLSchemaType();
assertEquals(duration_dayTime_xmlSchemaType, DatatypeConstants.DURATION_DAYTIME, "Expected DatatypeConstants.DURATION_DAYTIME, returned "
+ duration_dayTime_xmlSchemaType.toString());
// DURATION_YEARMONTH
Duration duration_yearMonth = datatypeFactory.newDuration("P1Y1M");
QName duration_yearMonth_xmlSchemaType = duration_yearMonth.getXMLSchemaType();
assertEquals(duration_yearMonth_xmlSchemaType, DatatypeConstants.DURATION_YEARMONTH, "Expected DatatypeConstants.DURATION_YEARMONTH, returned "
+ duration_yearMonth_xmlSchemaType.toString());
}
private final int undef = DatatypeConstants.FIELD_UNDEFINED;
private final BigInteger zero = BigInteger.ZERO;
private final BigInteger one = BigInteger.ONE;
}

View File

@ -0,0 +1,74 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.datatype.ptests;
import static org.testng.Assert.assertNotNull;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
import jaxp.library.JAXPDataProvider;
import jaxp.library.JAXPBaseTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/*
* @summary Tests for DatatypeFactory.newInstance(factoryClassName , classLoader)
*/
public class FactoryNewInstanceTest extends JAXPBaseTest {
private static final String DATATYPE_FACTORY_CLASSNAME = "com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl";
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { DATATYPE_FACTORY_CLASSNAME, null }, { DATATYPE_FACTORY_CLASSNAME, this.getClass().getClassLoader() } };
}
/*
* test for DatatypeFactory.newInstance(java.lang.String factoryClassName,
* java.lang.ClassLoader classLoader) factoryClassName points to correct
* implementation of javax.xml.datatype.DatatypeFactory , should return
* newInstance of DatatypeFactory
*/
@Test(dataProvider = "parameters")
public void testNewInstance(String factoryClassName, ClassLoader classLoader) throws DatatypeConfigurationException {
DatatypeFactory dtf = DatatypeFactory.newInstance(DATATYPE_FACTORY_CLASSNAME, null);
Duration duration = dtf.newDuration(true, 1, 1, 1, 1, 1, 1);
assertNotNull(duration);
}
/*
* test for DatatypeFactory.newInstance(java.lang.String factoryClassName,
* java.lang.ClassLoader classLoader) factoryClassName is null , should
* throw DatatypeConfigurationException
*/
@Test(expectedExceptions = DatatypeConfigurationException.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewInstanceNeg(String factoryClassName, ClassLoader classLoader) throws DatatypeConfigurationException {
DatatypeFactory.newInstance(factoryClassName, classLoader);
}
}

View File

@ -0,0 +1,356 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.datatype.ptests;
import static java.util.Calendar.HOUR;
import static java.util.Calendar.MINUTE;
import static java.util.Calendar.YEAR;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeConstants;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import jaxp.library.JAXPBaseTest;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/*
* @bug 5049592 5041845 5048932 5064587 5040542 5049531 5049528
* @summary Class containing the test cases for XMLGregorianCalendar
*/
public class XMLGregorianCalendarTest extends JAXPBaseTest {
private DatatypeFactory datatypeFactory;
@BeforeClass
public void setup() throws DatatypeConfigurationException {
datatypeFactory = DatatypeFactory.newInstance();
}
@DataProvider(name = "valid-milliseconds")
public Object[][] getValidMilliSeconds() {
return new Object[][] { { 0 }, { 1 }, { 2 }, { 16 }, { 1000 } };
}
/*
* Test DatatypeFactory.newXMLGregorianCalendar(..) with milliseconds > 1.
*
* Bug # 5049592
*
*/
@Test(dataProvider = "valid-milliseconds")
public void checkNewCalendar(int ms) {
// valid milliseconds
XMLGregorianCalendar calendar = datatypeFactory.newXMLGregorianCalendar(2004, // year
6, // month
2, // day
19, // hour
20, // minute
59, // second
ms, // milliseconds
840 // timezone
);
// expected success
assertEquals(calendar.getMillisecond(), ms);
}
/*
* Test DatatypeFactory.newXMLGregorianCalendarTime(..).
*
* Bug # 5049592
*/
@Test(dataProvider = "valid-milliseconds")
public void checkNewTime(int ms) {
// valid milliseconds
XMLGregorianCalendar calendar2 = datatypeFactory.newXMLGregorianCalendarTime(19, // hour
20, // minute
59, // second
ms, // milliseconds
840 // timezone
);
// expected success
assertEquals(calendar2.getMillisecond(), ms);
}
@DataProvider(name = "invalid-milliseconds")
public Object[][] getInvalidMilliSeconds() {
return new Object[][] { { -1 }, { 1001 } };
}
/*
* Test DatatypeFactory.newXMLGregorianCalendar(..).
*
* Bug # 5049592 IllegalArgumentException is thrown if milliseconds < 0 or >
* 1001.
*
*/
@Test(expectedExceptions = IllegalArgumentException.class, dataProvider = "invalid-milliseconds")
public void checkNewCalendarNeg(int milliseconds) {
// invalid milliseconds
datatypeFactory.newXMLGregorianCalendar(2004, // year
6, // month
2, // day
19, // hour
20, // minute
59, // second
milliseconds, // milliseconds
840 // timezone
);
}
/*
* Test DatatypeFactory.newXMLGregorianCalendarTime(..).
*
* Bug # 5049592 IllegalArgumentException is thrown if milliseconds < 0 or >
* 1001.
*
*/
@Test(expectedExceptions = IllegalArgumentException.class, dataProvider = "invalid-milliseconds")
public void checkNewTimeNeg(int milliseconds) {
// invalid milliseconds
datatypeFactory.newXMLGregorianCalendarTime(19, // hour
20, // minute
59, // second
milliseconds, // milliseconds
840 // timezone
);
}
@DataProvider(name = "data-for-add")
public Object[][] getDataForAdd() {
return new Object[][] {
//calendar1, calendar2, duration
{ "1999-12-31T00:00:00Z", "2000-01-01T00:00:00Z", "P1D" },
{ "2000-12-31T00:00:00Z", "2001-01-01T00:00:00Z", "P1D" },
{ "1998-12-31T00:00:00Z", "1999-01-01T00:00:00Z", "P1D" },
{ "2001-12-31T00:00:00Z", "2002-01-01T00:00:00Z", "P1D" },
{ "2003-04-11T00:00:00Z", "2003-04-12T00:00:00Z", "P1D" },
{ "2003-04-11T00:00:00Z", "2003-04-14T00:00:00Z", "P3D" },
{ "2003-04-30T00:00:00Z", "2003-05-01T00:00:00Z", "P1D" },
{ "2003-02-28T00:00:00Z", "2003-03-01T00:00:00Z", "P1D" },
{ "2000-02-29T00:00:00Z", "2000-03-01T00:00:00Z", "P1D" },
{ "2000-02-28T00:00:00Z", "2000-02-29T00:00:00Z", "P1D" },
{ "1998-01-11T00:00:00Z", "1998-04-11T00:00:00Z", "P90D" },
{ "1999-05-11T00:00:00Z", "2002-05-11T00:00:00Z", "P1096D" }};
}
/*
* Test XMLGregorianCalendar.add(Duration).
*
*/
@Test(dataProvider = "data-for-add")
public void checkAddDays(String cal1, String cal2, String dur) {
XMLGregorianCalendar calendar1 = datatypeFactory.newXMLGregorianCalendar(cal1);
XMLGregorianCalendar calendar2 = datatypeFactory.newXMLGregorianCalendar(cal2);
Duration duration = datatypeFactory.newDuration(dur);
XMLGregorianCalendar calendar1Clone = (XMLGregorianCalendar)calendar1.clone();
calendar1Clone.add(duration);
assertEquals(calendar1Clone, calendar2);
calendar2.add(duration.negate());
assertEquals(calendar2, calendar1);
}
@DataProvider(name = "gMonth")
public Object[][] getGMonth() {
return new Object[][] {
{ "2000-02" },
{ "2000-03" },
{ "2018-02" }};
}
/*
* Test XMLGregorianCalendar#isValid(). for gMonth
*
* Bug # 5041845
*
*/
@Test(dataProvider = "gMonth")
public void checkIsValid(String month) {
XMLGregorianCalendar gMonth = datatypeFactory.newXMLGregorianCalendar(month);
gMonth.setYear(null);
Assert.assertTrue(gMonth.isValid(), gMonth.toString() + " should isValid");
}
@DataProvider(name = "lexical01")
public Object[][] getLexicalRepresentForNormalize01() {
return new Object[][] { { "2000-01-16T12:00:00Z" }, { "2000-01-16T12:00:00" } };
}
/*
* Test XMLGregorianCalendar#normalize(...).
*
* Bug # 5048932 XMLGregorianCalendar.normalize works
*
*/
@Test(dataProvider = "lexical01")
public void checkNormalize01(String lexical) {
XMLGregorianCalendar lhs = datatypeFactory.newXMLGregorianCalendar(lexical);
lhs.normalize();
}
@DataProvider(name = "lexical02")
public Object[][] getLexicalRepresentForNormalize02() {
return new Object[][] { { "2000-01-16T00:00:00.01Z" }, { "2000-01-16T00:00:00.01" }, { "13:20:00" } };
}
/*
* Test XMLGregorianCalendar#normalize(...).
*
* Bug # 5064587 XMLGregorianCalendar.normalize shall not change timezone
*
*/
@Test(dataProvider = "lexical02")
public void checkNormalize02(String lexical) {
XMLGregorianCalendar orig = datatypeFactory.newXMLGregorianCalendar(lexical);
XMLGregorianCalendar normalized = datatypeFactory.newXMLGregorianCalendar(lexical).normalize();
assertEquals(normalized.getTimezone(), orig.getTimezone());
assertEquals(normalized.getMillisecond(), orig.getMillisecond());
}
/*
* Test XMLGregorianCalendar#toGregorianCalendar( TimeZone timezone, Locale
* aLocale, XMLGregorianCalendar defaults)
*
* Bug # 5040542 the defaults XMLGregorianCalendar parameter shall take
* effect
*
*/
@Test
public void checkToGregorianCalendar01() {
XMLGregorianCalendar time_16_17_18 = datatypeFactory.newXMLGregorianCalendar("16:17:18");
XMLGregorianCalendar date_2001_02_03 = datatypeFactory.newXMLGregorianCalendar("2001-02-03");
GregorianCalendar calendar = date_2001_02_03.toGregorianCalendar(null, null, time_16_17_18);
int year = calendar.get(YEAR);
int minute = calendar.get(MINUTE);
assertTrue((year == 2001 && minute == 17), " expecting year == 2001, minute == 17" + ", result is year == " + year + ", minute == " + minute);
calendar = time_16_17_18.toGregorianCalendar(null, null, date_2001_02_03);
year = calendar.get(YEAR);
minute = calendar.get(MINUTE);
assertTrue((year == 2001 && minute == 17), " expecting year == 2001, minute == 17" + ", result is year == " + year + ", minute == " + minute);
date_2001_02_03.setMinute(3);
date_2001_02_03.setYear(null);
XMLGregorianCalendar date_time = datatypeFactory.newXMLGregorianCalendar("2003-04-11T02:13:01Z");
calendar = date_2001_02_03.toGregorianCalendar(null, null, date_time);
year = calendar.get(YEAR);
minute = calendar.get(MINUTE);
int hour = calendar.get(HOUR);
assertTrue((year == 2003 && hour == 2 && minute == 3), " expecting year == 2003, hour == 2, minute == 3" + ", result is year == " + year + ", hour == " + hour + ", minute == " + minute);
}
/*
* Test XMLGregorianCalendar#toGregorianCalendar( TimeZone timezone, Locale
* aLocale, XMLGregorianCalendar defaults) with the 'defaults' parameter
* being null.
*
* Bug # 5049531 XMLGregorianCalendar.toGregorianCalendar(..) can accept
* 'defaults' is null
*
*/
@Test
public void checkToGregorianCalendar02() {
XMLGregorianCalendar calendar = datatypeFactory.newXMLGregorianCalendar("2004-05-19T12:00:00+06:00");
calendar.toGregorianCalendar(TimeZone.getDefault(), Locale.getDefault(), null);
}
@DataProvider(name = "calendar")
public Object[][] getXMLGregorianCalendarData() {
return new Object[][] {
// year, month, day, hour, minute, second
{ 1970, 1, 1, 0, 0, 0 }, // DATETIME
{ 1970, 1, 1, undef, undef, undef }, // DATE
{ undef, undef, undef, 1, 0, 0 }, // TIME
{ 1970, 1, undef, undef, undef, undef }, // GYEARMONTH
{ undef, 1, 1, undef, undef, undef }, // GMONTHDAY
{ 1970, undef, undef, undef, undef, undef }, // GYEAR
{ undef, 1, undef, undef, undef, undef }, // GMONTH
{ undef, undef, 1, undef, undef, undef } // GDAY
};
}
/*
* Test XMLGregorianCalendar#toString()
*
* Bug # 5049528
*
*/
@Test(dataProvider = "calendar")
public void checkToStringPos(final int year, final int month, final int day, final int hour, final int minute, final int second) {
XMLGregorianCalendar calendar = datatypeFactory.newXMLGregorianCalendar(year, month, day, hour, minute, second, undef, undef);
calendar.toString();
}
/*
* Negative Test XMLGregorianCalendar#toString()
*
* Bug # 5049528 XMLGregorianCalendar.toString throws IllegalStateException
* if all parameters are undef
*
*/
@Test(expectedExceptions = IllegalStateException.class)
public void checkToStringNeg() {
XMLGregorianCalendar calendar = datatypeFactory.newXMLGregorianCalendar(undef, undef, undef, undef, undef, undef, undef, undef);
// expected to fail
calendar.toString();
}
private final int undef = DatatypeConstants.FIELD_UNDEFINED;
}

View File

@ -26,27 +26,38 @@ package javax.xml.parsers.ptests;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilePermission;
import java.io.FileReader;
import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import static javax.xml.parsers.ptests.ParserTestConst.GOLDEN_DIR;
import static javax.xml.parsers.ptests.ParserTestConst.XML_DIR;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXResult;
import jaxp.library.JAXPDataProvider;
import jaxp.library.JAXPFileBaseTest;
import static jaxp.library.JAXPTestUtilities.USER_DIR;
import static jaxp.library.JAXPTestUtilities.compareWithGold;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@ -59,6 +70,52 @@ import org.xml.sax.helpers.DefaultHandler;
* This checks the methods of DocumentBuilderFactoryImpl.
*/
public class DocumentBuilderFactoryTest extends JAXPFileBaseTest {
/**
* DocumentBuilderFactory implementation class name.
*/
private static final String DOCUMENT_BUILDER_FACTORY_CLASSNAME = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
/**
* Provide valid DocumentBuilderFactory instantiation parameters.
*
* @return a data provider contains DocumentBuilderFactory instantiation parameters.
*/
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { DOCUMENT_BUILDER_FACTORY_CLASSNAME, null }, { DOCUMENT_BUILDER_FACTORY_CLASSNAME, this.getClass().getClassLoader() } };
}
/**
* Test for DocumentBuilderFactory.newInstance(java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader) factoryClassName
* points to correct implementation of
* javax.xml.parsers.DocumentBuilderFactory , should return newInstance of
* DocumentBuilderFactory
*
* @param factoryClassName
* @param classLoader
* @throws ParserConfigurationException
*/
@Test(dataProvider = "parameters")
public void testNewInstance(String factoryClassName, ClassLoader classLoader) throws ParserConfigurationException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(factoryClassName, classLoader);
DocumentBuilder builder = dbf.newDocumentBuilder();
assertNotNull(builder);
}
/**
* test for DocumentBuilderFactory.newInstance(java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader) factoryClassName is
* null , should throw FactoryConfigurationError
*
* @param factoryClassName
* @param classLoader
*/
@Test(expectedExceptions = FactoryConfigurationError.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewInstanceNeg(String factoryClassName, ClassLoader classLoader) {
DocumentBuilderFactory.newInstance(factoryClassName, classLoader);
}
/**
* Test the default functionality of schema support method.
* @throws Exception If any errors occur.

View File

@ -0,0 +1,75 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.parsers.ptests;
import static org.testng.Assert.assertNotNull;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import jaxp.library.JAXPDataProvider;
import jaxp.library.JAXPBaseTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.xml.sax.SAXException;
/*
* @summary Tests for SAXParserFactory.newInstance(factoryClassName , classLoader)
*/
public class SAXFactoryNewInstanceTest extends JAXPBaseTest {
private static final String SAXPARSER_FACTORY_CLASSNAME = "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl";
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { SAXPARSER_FACTORY_CLASSNAME, null }, { SAXPARSER_FACTORY_CLASSNAME, this.getClass().getClassLoader() } };
}
/*
* test for SAXParserFactory.newInstance(java.lang.String factoryClassName,
* java.lang.ClassLoader classLoader) factoryClassName points to correct
* implementation of javax.xml.parsers.SAXParserFactory , should return
* newInstance of SAXParserFactory
*/
@Test(dataProvider = "parameters")
public void testNewInstance(String factoryClassName, ClassLoader classLoader) throws ParserConfigurationException, SAXException {
SAXParserFactory spf = SAXParserFactory.newInstance(factoryClassName, classLoader);
SAXParser sp = spf.newSAXParser();
assertNotNull(sp);
}
/*
* test for SAXParserFactory.newInstance(java.lang.String factoryClassName,
* java.lang.ClassLoader classLoader) factoryClassName is null , should
* throw FactoryConfigurationError
*/
@Test(expectedExceptions = FactoryConfigurationError.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewInstanceNeg(String factoryClassName, ClassLoader classLoader) {
SAXParserFactory.newInstance(factoryClassName, classLoader);
}
}

View File

@ -0,0 +1,76 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.stream.ptests;
import static org.testng.Assert.assertNotNull;
import javax.xml.stream.XMLEventFactory;
import jaxp.library.JAXPDataProvider;
import jaxp.library.JAXPBaseTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/*
* @summary Tests for XMLEventFactory.newFactory(factoryId , classLoader)
*/
public class XMLEventFactoryNewInstanceTest extends JAXPBaseTest {
private static final String XMLEVENT_FACTORY_CLASSNAME = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
private static final String XMLEVENT_FACRORY_ID = "javax.xml.stream.XMLEventFactory";
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { XMLEVENT_FACRORY_ID, null }, { XMLEVENT_FACRORY_ID, this.getClass().getClassLoader() } };
}
/*
* test for XMLEventFactory.newFactory(java.lang.String factoryClassName,
* java.lang.ClassLoader classLoader) factoryClassName points to correct
* implementation of javax.xml.stream.XMLEventFactory , should return
* newInstance of XMLEventFactory
*/
@Test(dataProvider = "parameters")
public void testNewFactory(String factoryId, ClassLoader classLoader) {
setSystemProperty(XMLEVENT_FACRORY_ID, XMLEVENT_FACTORY_CLASSNAME);
try {
XMLEventFactory xef = XMLEventFactory.newFactory(factoryId, classLoader);
assertNotNull(xef);
} finally {
setSystemProperty(XMLEVENT_FACRORY_ID, null);
}
}
/*
* test for XMLEventFactory.newFactory(java.lang.String factoryClassName,
* java.lang.ClassLoader classLoader) factoryClassName is null , should
* throw NullPointerException
*/
@Test(expectedExceptions = NullPointerException.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewFactoryNeg(String factoryId, ClassLoader classLoader) {
XMLEventFactory.newFactory(null, null);
}
}

View File

@ -0,0 +1,76 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.stream.ptests;
import static org.testng.Assert.assertNotNull;
import javax.xml.stream.XMLInputFactory;
import jaxp.library.JAXPDataProvider;
import jaxp.library.JAXPBaseTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/*
* @summary Tests for XMLInputFactory.newFactory(factoryId , classLoader)
*/
public class XMLInputFactoryNewInstanceTest extends JAXPBaseTest {
private static final String XMLINPUT_FACTORY_CLASSNAME = "com.sun.xml.internal.stream.XMLInputFactoryImpl";
private static final String XMLINPUT_FACRORY_ID = "javax.xml.stream.XMLInputFactory";
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { XMLINPUT_FACRORY_ID, null }, { XMLINPUT_FACRORY_ID, this.getClass().getClassLoader() } };
}
/*
* test for XMLInputFactory.newFactory(java.lang.String factoryId,
* java.lang.ClassLoader classLoader) factoryClassName points to correct
* implementation of javax.xml.stream.XMLInputFactory , should return
* newInstance of XMLInputFactory
*/
@Test(dataProvider = "parameters")
public void testNewFactory(String factoryId, ClassLoader classLoader) {
setSystemProperty(XMLINPUT_FACRORY_ID, XMLINPUT_FACTORY_CLASSNAME);
try {
XMLInputFactory xif = XMLInputFactory.newFactory(factoryId, classLoader);
assertNotNull(xif);
} finally {
setSystemProperty(XMLINPUT_FACRORY_ID, null);
}
}
/*
* test for XMLInputFactory.newFactory(java.lang.String factoryClassName,
* java.lang.ClassLoader classLoader) factoryClassName is null , should
* throw NullPointerException
*/
@Test(expectedExceptions = NullPointerException.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewFactoryNeg(String factoryId, ClassLoader classLoader) {
XMLInputFactory.newFactory(factoryId, classLoader);
}
}

View File

@ -0,0 +1,64 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.transform.ptests;
import java.io.ByteArrayOutputStream;
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import jaxp.library.JAXPFileBaseTest;
import static javax.xml.transform.ptests.TransformerTestConst.XML_DIR;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
/*
* @bug 6384418
* @summary verify the transforming won't throw any exception
*/
public class Bug6384418Test extends JAXPFileBaseTest {
@Test
public void test() throws Exception {
TransformerFactory tfactory = TransformerFactory.newInstance();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new File(XML_DIR + "dataentry.xsl"));
DOMSource domSource = new DOMSource(document);
Transformer transformer = tfactory.newTransformer(domSource);
StreamSource streamSource = new StreamSource(new File(XML_DIR + "test.xml"));
StreamResult streamResult = new StreamResult(new ByteArrayOutputStream());
transformer.transform(streamSource, streamResult);
}
}

View File

@ -0,0 +1,383 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.xml.transform.ptests;
import static javax.xml.transform.ptests.TransformerTestConst.XML_DIR;
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.function.Supplier;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stax.StAXResult;
import javax.xml.transform.stax.StAXSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import jaxp.library.JAXPFileBaseTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
/*
* @summary Tests for variable combination of Transformer.transform(Source, Result)
*/
@Test(singleThreaded = true)
public class TransformTest extends JAXPFileBaseTest {
/*
* Initialize the share objects.
*/
@BeforeClass
public void setup() throws Exception {
ifac = XMLInputFactory.newInstance();
ofac = XMLOutputFactory.newInstance();
tfac = TransformerFactory.newInstance();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
db = dbf.newDocumentBuilder();
xml = Files.readAllBytes(Paths.get(XML_DIR + "cities.xml"));
template = Files.readAllBytes(Paths.get(XML_DIR + "cities.xsl"));
xmlDoc = db.parse(xmlInputStream());
}
@DataProvider(name = "input-provider")
public Object[][] prepareTestCombination() throws Exception {
Supplier<Source> staxStreamSource = () -> new StAXSource(getXMLStreamReader());
Supplier<Source> staxEventSource = this::getStAXEventSource;
Supplier<Source> domSource = () -> new DOMSource(xmlDoc);
Supplier<Source> saxSource = () -> new SAXSource(new InputSource(xmlInputStream()));
Supplier<Source> streamSource = () -> new StreamSource(xmlInputStream());
Supplier<Result> staxStreamResult = () -> new StAXResult(getXMLStreamWriter());
Supplier<Result> staxEventResult = () -> new StAXResult(getXMLEventWriter());
Supplier<Result> saxResult = this::getHandlerSAXResult;
Supplier<Result> streamResult = () -> new StreamResult(transOutputStream());
Transformer domTemplateTransformer = createTransformer(getDomTemplate());
Transformer saxTemplateTransformer = createTransformer(getSAXTemplate());
Transformer streamTemplateTransformer = createTransformer(getStreamTemplate());
Transformer noTemplateTransformer = createTransformer(null);
Transformer staxStreamTemplateTransformer = createTransformer(getStAXStreamTemplate());
Transformer staxEventTemplateTransformer = createTransformer(getStAXEventTemplate());
return new Object[][] {
// StAX Stream
{ staxStreamSource, staxStreamResult, domTemplateTransformer },
{ staxStreamSource, staxStreamResult, saxTemplateTransformer },
{ staxStreamSource, staxStreamResult, streamTemplateTransformer },
{ staxStreamSource, staxStreamResult, noTemplateTransformer },
{ staxStreamSource, staxStreamResult, staxStreamTemplateTransformer },
{ staxStreamSource, saxResult, domTemplateTransformer },
{ staxStreamSource, streamResult, domTemplateTransformer },
{ domSource, staxStreamResult, domTemplateTransformer },
{ saxSource, staxStreamResult, domTemplateTransformer },
{ streamSource, staxStreamResult, domTemplateTransformer },
{ staxStreamSource, streamResult, saxTemplateTransformer },
{ domSource, staxStreamResult, saxTemplateTransformer },
{ saxSource, staxStreamResult, saxTemplateTransformer },
{ streamSource, staxStreamResult, saxTemplateTransformer },
{ staxStreamSource, streamResult, streamTemplateTransformer },
{ domSource, staxStreamResult, streamTemplateTransformer },
{ saxSource, staxStreamResult, streamTemplateTransformer },
{ streamSource, staxStreamResult, streamTemplateTransformer },
// StAX Event
{ staxEventSource, staxEventResult, domTemplateTransformer },
{ staxEventSource, staxEventResult, saxTemplateTransformer },
{ staxEventSource, staxEventResult, streamTemplateTransformer },
{ staxEventSource, staxEventResult, noTemplateTransformer },
{ staxEventSource, staxEventResult, staxEventTemplateTransformer },
{ staxEventSource, saxResult, domTemplateTransformer },
{ staxEventSource, streamResult, domTemplateTransformer },
{ domSource, staxEventResult, domTemplateTransformer },
{ saxSource, staxEventResult, domTemplateTransformer },
{ streamSource, staxEventResult, domTemplateTransformer },
{ staxEventSource, streamResult, saxTemplateTransformer },
{ domSource, staxEventResult, saxTemplateTransformer },
{ saxSource, staxEventResult, saxTemplateTransformer },
{ streamSource, staxEventResult, saxTemplateTransformer },
{ staxEventSource, streamResult, streamTemplateTransformer },
{ domSource, staxEventResult, streamTemplateTransformer },
{ saxSource, staxEventResult, streamTemplateTransformer },
{ streamSource, staxEventResult, streamTemplateTransformer } };
}
/*
* run Transformer.transform(Source, Result)
*/
@Test(dataProvider = "input-provider")
public void testTransform(Supplier<Source> src, Supplier<Result> res, Transformer transformer) throws Throwable {
try {
transformer.transform(src.get(), res.get());
} catch (WrapperException e) {
throw e.getCause();
}
}
private InputStream xmlInputStream() {
return new ByteArrayInputStream(xml);
}
private InputStream templateInputStream() {
return new ByteArrayInputStream(template);
}
private OutputStream transOutputStream() {
return new ByteArrayOutputStream(xml.length);
}
private XMLStreamReader getXMLStreamReader() {
try {
return ifac.createXMLStreamReader(xmlInputStream());
} catch (XMLStreamException e) {
throw new WrapperException(e);
}
}
private XMLStreamWriter getXMLStreamWriter() {
try {
return ofac.createXMLStreamWriter(transOutputStream());
} catch (XMLStreamException e) {
throw new WrapperException(e);
}
}
private StAXSource getStAXEventSource() {
try {
return new StAXSource(ifac.createXMLEventReader(xmlInputStream()));
} catch (XMLStreamException e) {
throw new WrapperException(e);
}
}
private XMLEventWriter getXMLEventWriter() {
try {
return ofac.createXMLEventWriter(transOutputStream());
} catch (XMLStreamException e) {
throw new WrapperException(e);
}
}
private SAXResult getHandlerSAXResult() {
SAXResult res = new SAXResult();
MyContentHandler myContentHandler = new MyContentHandler(transOutputStream());
res.setHandler(myContentHandler);
return res;
}
private Source getDomTemplate() throws SAXException, IOException {
return new DOMSource(db.parse(templateInputStream()));
}
private Source getSAXTemplate() {
return new SAXSource(new InputSource(templateInputStream()));
}
private Source getStreamTemplate() {
return new StreamSource(templateInputStream());
}
private Source getStAXStreamTemplate() throws XMLStreamException {
return new StAXSource(ifac.createXMLStreamReader(templateInputStream()));
}
private Source getStAXEventTemplate() throws XMLStreamException {
return new StAXSource(ifac.createXMLEventReader(templateInputStream()));
}
private Transformer createTransformer(Source templateSource) throws TransformerConfigurationException {
Transformer transformer = (templateSource == null) ? tfac.newTransformer() : tfac.newTransformer(templateSource);
transformer.setOutputProperty("indent", "yes");
return transformer;
}
private static class MyContentHandler implements ContentHandler {
private BufferedWriter bWriter;
public MyContentHandler(OutputStream os) {
bWriter = new BufferedWriter(new OutputStreamWriter(os));
}
public void setDocumentLocator(Locator locator) {
}
public void startDocument() throws SAXException {
String str = "startDocument";
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void endDocument() throws SAXException {
String str = "endDocument";
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
bWriter.flush();
bWriter.close();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void startPrefixMapping(String prefix, String uri) throws SAXException {
String str = "startPrefixMapping: " + prefix + ", " + uri;
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void endPrefixMapping(String prefix) throws SAXException {
String str = "endPrefixMapping: " + prefix;
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
StringBuilder str = new StringBuilder("startElement: ").append(namespaceURI).append(", ").append(namespaceURI).append(", ").append(qName).append(" : ");
int n = atts.getLength();
for (int i = 0; i < n; i++) {
str.append(", ").append(atts.getQName(i)).append(" : ").append(atts.getValue(i));
}
try {
bWriter.write(str.toString(), 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
String str = "endElement: " + namespaceURI + ", " + namespaceURI + ", " + qName;
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void characters(char ch[], int start, int length) throws SAXException {
String str = new String(ch, start, length);
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
String str = "ignorableWhitespace";
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void processingInstruction(String target, String data) throws SAXException {
String str = "processingInstruction: " + target + ", " + target;
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
public void skippedEntity(String name) throws SAXException {
String str = "skippedEntity: " + name;
try {
bWriter.write(str, 0, str.length());
bWriter.newLine();
} catch (IOException e) {
System.out.println("bWriter error");
}
}
}
private static class WrapperException extends RuntimeException {
public WrapperException(Throwable cause) {
super(cause);
}
}
private XMLInputFactory ifac;
private XMLOutputFactory ofac;
private TransformerFactory tfac;
private DocumentBuilder db;
private byte[] xml;
private byte[] template;
private Document xmlDoc;
}

View File

@ -23,25 +23,78 @@
package javax.xml.transform.ptests;
import java.io.*;
import java.io.FileOutputStream;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import static javax.xml.transform.ptests.TransformerTestConst.GOLDEN_DIR;
import static javax.xml.transform.ptests.TransformerTestConst.XML_DIR;
import javax.xml.transform.stream.*;
import jaxp.library.JAXPDataProvider;
import jaxp.library.JAXPFileBaseTest;
import static jaxp.library.JAXPTestUtilities.USER_DIR;
import static jaxp.library.JAXPTestUtilities.compareWithGold;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.w3c.dom.*;
/**
* Class containing the test cases for TransformerFactory API's
* getAssociatedStyleSheet method.
* getAssociatedStyleSheet method and TransformerFactory.newInstance(factoryClassName , classLoader).
*/
public class TransformerFactoryTest extends JAXPFileBaseTest {
/**
* TransformerFactory implementation class name.
*/
private static final String TRANSFORMER_FACTORY_CLASSNAME = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
/**
* Provide valid TransformerFactory instantiation parameters.
*
* @return a data provider contains TransformerFactory instantiation parameters.
*/
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { TRANSFORMER_FACTORY_CLASSNAME, null }, { TRANSFORMER_FACTORY_CLASSNAME, this.getClass().getClassLoader() } };
}
/**
* Test for TransformerFactory.newInstance(java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader) factoryClassName
* points to correct implementation of
* javax.xml.transform.TransformerFactory , should return newInstance of
* TransformerFactory
*
* @param factoryClassName
* @param classLoader
* @throws TransformerConfigurationException
*/
@Test(dataProvider = "parameters")
public void testNewInstance(String factoryClassName, ClassLoader classLoader) throws TransformerConfigurationException {
TransformerFactory tf = TransformerFactory.newInstance(factoryClassName, classLoader);
Transformer transformer = tf.newTransformer();
assertNotNull(transformer);
}
/**
* Test for TransformerFactory.newInstance(java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader) factoryClassName is
* null , should throw TransformerFactoryConfigurationError
*
* @param factoryClassName
* @param classLoader
*/
@Test(expectedExceptions = TransformerFactoryConfigurationError.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewInstanceNeg(String factoryClassName, ClassLoader classLoader) {
TransformerFactory.newInstance(factoryClassName, classLoader);
}
/**
* This test case checks for the getAssociatedStylesheet method
* of TransformerFactory.

View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="dataentry">
<table cellspacing="0" cellpadding="0" width="85%" align="center"
class="color1" border="0">
<xsl:apply-templates/>
</table>
</xsl:template>
<xsl:template match="list">
<xsl:value-of select="self::node()[@multi='false']"/>
<!--
<xsl:if test="self::node()[@multi='false']">
<xsl:if test="self::node()">
FALSE<br/>
</xsl:if>
-->
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,8 @@
<appcapp>
<dataentry>
<list multi="false">
<name>TypeOfLifeApp</name>
</list>
</dataentry>
</appcapp>

View File

@ -46,6 +46,8 @@ import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import jaxp.library.JAXPDataProvider;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@ -81,6 +83,59 @@ public class SchemaFactoryTest {
xml = Files.readAllBytes(Paths.get(XML_DIR + "test.xml"));
}
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { W3C_XML_SCHEMA_NS_URI, SCHEMA_FACTORY_CLASSNAME, null },
{ W3C_XML_SCHEMA_NS_URI, SCHEMA_FACTORY_CLASSNAME, this.getClass().getClassLoader() } };
}
/*
* test for SchemaFactory.newInstance(java.lang.String schemaLanguage,
* java.lang.String factoryClassName, java.lang.ClassLoader classLoader)
* factoryClassName points to correct implementation of
* javax.xml.validation.SchemaFactory , should return newInstance of
* SchemaFactory
*/
@Test(dataProvider = "parameters")
public void testNewInstance(String schemaLanguage, String factoryClassName, ClassLoader classLoader) throws SAXException {
SchemaFactory sf = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI, SCHEMA_FACTORY_CLASSNAME, null);
Schema schema = sf.newSchema();
assertNotNull(schema);
}
/*
* test for SchemaFactory.newInstance(java.lang.String schemaLanguage,
* java.lang.String factoryClassName, java.lang.ClassLoader classLoader)
* factoryClassName is null , should throw IllegalArgumentException
*/
@Test(expectedExceptions = IllegalArgumentException.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewInstanceWithNullFactoryClassName(String factoryClassName, ClassLoader classLoader) {
SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI, factoryClassName, classLoader);
}
/*
* test for SchemaFactory.newInstance(java.lang.String schemaLanguage,
* java.lang.String factoryClassName, java.lang.ClassLoader classLoader)
* schemaLanguage is null , should throw NPE
*/
@Test(expectedExceptions = NullPointerException.class)
public void testNewInstanceWithNullSchemaLanguage() {
SchemaFactory.newInstance(null, SCHEMA_FACTORY_CLASSNAME, this.getClass().getClassLoader());
}
/*
* test for SchemaFactory.newInstance(java.lang.String schemaLanguage,
* java.lang.String factoryClassName, java.lang.ClassLoader classLoader)
* schemaLanguage is empty , should throw IllegalArgumentException
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNewInstanceWithEmptySchemaLanguage() {
SchemaFactory.newInstance("", SCHEMA_FACTORY_CLASSNAME, this.getClass().getClassLoader());
}
@Test(expectedExceptions = SAXParseException.class)
public void testNewSchemaDefault() throws SAXException, IOException {
validate(sf.newSchema());
@ -288,6 +343,8 @@ public class SchemaFactoryTest {
private static final String UNRECOGNIZED_NAME = "http://xml.org/sax/features/namespace-prefixes";
private static final String SCHEMA_FACTORY_CLASSNAME = "com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory";
private SchemaFactory sf;
private byte[] xsd1;
private byte[] xsd2;

View File

@ -24,10 +24,16 @@
package javax.xml.xpath.ptests;
import static javax.xml.xpath.XPathConstants.DOM_OBJECT_MODEL;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactory;
import javax.xml.xpath.XPathFactoryConfigurationException;
import jaxp.library.JAXPDataProvider;
import jaxp.library.JAXPBaseTest;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.Assert.assertNotNull;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
@ -44,6 +50,78 @@ public class XPathFactoryTest extends JAXPBaseTest {
*/
private static final String INVALID_URL = "http://java.sun.com/jaxp/xpath/dom1";
/**
* XPathFactory implementation class name.
*/
private static final String XPATH_FACTORY_CLASSNAME = "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl";
/**
* Provide valid XPathFactory instantiation parameters.
*
* @return a data provider contains XPathFactory instantiation parameters.
*/
@DataProvider(name = "parameters")
public Object[][] getValidateParameters() {
return new Object[][] { { VALID_URL, XPATH_FACTORY_CLASSNAME, null }, { VALID_URL, XPATH_FACTORY_CLASSNAME, this.getClass().getClassLoader() } };
}
/**
* Test for XPathFactory.newInstance(java.lang.String uri, java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader) factoryClassName
* points to correct implementation of javax.xml.xpath.XPathFactory , should
* return newInstance of XPathFactory
*
* @param uri
* @param factoryClassName
* @param classLoader
* @throws XPathFactoryConfigurationException
*/
@Test(dataProvider = "parameters")
public void testNewInstance(String uri, String factoryClassName, ClassLoader classLoader) throws XPathFactoryConfigurationException {
XPathFactory xpf = XPathFactory.newInstance(uri, factoryClassName, classLoader);
XPath xpath = xpf.newXPath();
assertNotNull(xpath);
}
/**
* Test for XPathFactory.newInstance(java.lang.String uri, java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader)
*
* @param factoryClassName
* @param classLoader
* @throws XPathFactoryConfigurationException
* is expected when factoryClassName is null
*/
@Test(expectedExceptions = XPathFactoryConfigurationException.class, dataProvider = "new-instance-neg", dataProviderClass = JAXPDataProvider.class)
public void testNewInstanceWithNullFactoryClassName(String factoryClassName, ClassLoader classLoader) throws XPathFactoryConfigurationException {
XPathFactory.newInstance(VALID_URL, factoryClassName, classLoader);
}
/**
* Test for XPathFactory.newInstance(java.lang.String uri, java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader) uri is null , should
* throw NPE
*
* @throws XPathFactoryConfigurationException
*/
@Test(expectedExceptions = NullPointerException.class)
public void testNewInstanceWithNullUri() throws XPathFactoryConfigurationException {
XPathFactory.newInstance(null, XPATH_FACTORY_CLASSNAME, this.getClass().getClassLoader());
}
/**
* Test for XPathFactory.newInstance(java.lang.String uri, java.lang.String
* factoryClassName, java.lang.ClassLoader classLoader)
*
* @throws IllegalArgumentException
* is expected when uri is empty
*/
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNewInstanceWithEmptyUri() throws XPathFactoryConfigurationException {
XPathFactory.newInstance("", XPATH_FACTORY_CLASSNAME, this.getClass().getClassLoader());
}
/**
* Test for constructor - XPathFactory.newInstance().
*/

View File

@ -0,0 +1,38 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jaxp.library;
import org.testng.annotations.DataProvider;
/**
* Provide invalid parameters for negative testing Factory.newInstance.
*/
public class JAXPDataProvider {
@DataProvider(name = "new-instance-neg")
public static Object[][] getNewInstanceNeg() {
return new Object[][] { { null, null }, { null, JAXPDataProvider.class.getClassLoader() } };
}
}

View File

@ -294,3 +294,5 @@ e529374fbe526dbd668e5e98fc047b42b3bc6d33 jdk9-b45
64ca52b0bda8028636e4ccafbe1107befcdda47d jdk9-b46
6c17d648d03e4bf4729c3645f8db55d34115e0b7 jdk9-b47
33e7e699804892c0496adf60ad67cc12855aeb61 jdk9-b48
435a49db1de0589acc86b2cc5fd61d546f94b56c jdk9-b49
45a30e7ee623031a1532685512dd2c2d8e8fa0ad jdk9-b50

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,14 +45,14 @@ import java.io.InputStream;
* specialized forms of the method available:
*
* <ul>
* <li>{@link #newInstance(String,ClassLoader) JAXBContext.newInstance( "com.acme.foo:com.acme.bar" )} <br/>
* <li>{@link #newInstance(String,ClassLoader) JAXBContext.newInstance( "com.acme.foo:com.acme.bar" )} <br>
* The JAXBContext instance is initialized from a list of colon
* separated Java package names. Each java package contains
* JAXB mapped classes, schema-derived classes and/or user annotated
* classes. Additionally, the java package may contain JAXB package annotations
* that must be processed. (see JLS, Section 7.4.1 "Named Packages").
* </li>
* <li>{@link #newInstance(Class...) JAXBContext.newInstance( com.acme.foo.Foo.class )} <br/>
* <li>{@link #newInstance(Class...) JAXBContext.newInstance( com.acme.foo.Foo.class )} <br>
* The JAXBContext instance is initialized with class(es)
* passed as parameter(s) and classes that are statically reachable from
* these class(es). See {@link #newInstance(Class...)} for details.
@ -64,8 +64,8 @@ import java.io.InputStream;
* class containing the following method signatures:</i>
*
* <pre>
* public static JAXBContext createContext( String contextPath, ClassLoader classLoader, Map&lt;String,Object> properties ) throws JAXBException
* public static JAXBContext createContext( Class[] classes, Map&lt;String,Object> properties ) throws JAXBException
* public static JAXBContext createContext( String contextPath, ClassLoader classLoader, Map&lt;String,Object&gt; properties ) throws JAXBException
* public static JAXBContext createContext( Class[] classes, Map&lt;String,Object&gt; properties ) throws JAXBException
* </pre>
*
* <p><i>
@ -256,7 +256,7 @@ import java.io.InputStream;
* @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
* @see Marshaller
* @see Unmarshaller
* @see S 7.4.1 "Named Packages" in Java Language Specification</a>
* @see <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.4.1">S 7.4.1 "Named Packages" in Java Language Specification</a>
* @since 1.6, JAXB 1.0
*/
public abstract class JAXBContext {
@ -352,7 +352,7 @@ public abstract class JAXBContext {
* <p>
* To maintain compatibility with JAXB 1.0 schema to java
* interface/implementation binding, enabled by schema customization
* <tt>&lt;jaxb:globalBindings valueClass="false"></tt>,
* <tt>&lt;jaxb:globalBindings valueClass="false"&gt;</tt>,
* the JAXB provider will ensure that each package on the context path
* has a <tt>jaxb.properties</tt> file which contains a value for the
* <tt>javax.xml.bind.context.factory</tt> property and that all values

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class JAXBException extends Exception {
* Exception reference
*
*/
private Throwable linkedException;
private volatile Throwable linkedException;
static final long serialVersionUID = -5621384651494307979L;
@ -133,7 +133,7 @@ public class JAXBException extends Exception {
* indicates that the linked exception does not exist or
* is unknown).
*/
public synchronized void setLinkedException( Throwable exception ) {
public void setLinkedException( Throwable exception ) {
this.linkedException = exception;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -51,7 +51,7 @@ public abstract class JAXBIntrospector {
* <ol>
* <li>It is an instance of <code>javax.xml.bind.JAXBElement</code>.</li>
* <li>The class of <code>object</code> is annotated with
* <code>&#64XmlRootElement</code>.
* <code>&#64;XmlRootElement</code>.
* </li>
* </ol>
*
@ -74,7 +74,7 @@ public abstract class JAXBIntrospector {
*
* <p>Convenience method to abstract whether working with either
* a javax.xml.bind.JAXBElement instance or an instance of
* <tt>&#64XmlRootElement</tt> annotated Java class.</p>
* <tt>&#64;XmlRootElement</tt> annotated Java class.</p>
*
* @param jaxbElement object that #isElement(Object) returns true.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -175,7 +175,7 @@ import java.io.File;
* encoding used during these marshal operations. Client applications are
* expected to supply a valid character encoding name as defined in the
* <a href="http://www.w3.org/TR/2000/REC-xml-20001006#charencoding">W3C XML 1.0
* Recommendation</a> and supported by your Java Platform</a>.
* Recommendation</a> and supported by your Java Platform.
* </blockquote>
*
* <p>
@ -664,7 +664,7 @@ public interface Marshaller {
*
* <p>
* Every marshaller internally maintains a
* {@link java.util.Map}&lt;{@link Class},{@link XmlAdapter}>,
* {@link java.util.Map}&lt;{@link Class},{@link XmlAdapter}&gt;,
* which it uses for marshalling classes whose fields/methods are annotated
* with {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter}.
*
@ -750,17 +750,17 @@ public interface Marshaller {
public Schema getSchema();
/**
* <p/>
* <p>
* Register an instance of an implementation of this class with a {@link Marshaller} to externally listen
* for marshal events.
* <p/>
* <p/>
* </p>
* <p>
* This class enables pre and post processing of each marshalled object.
* The event callbacks are called when marshalling from an instance that maps to an xml element or
* complex type definition. The event callbacks are not called when marshalling from an instance of a
* Java datatype that represents a simple type definition.
* <p/>
* <p/>
* </p>
* <p>
* External listener is one of two different mechanisms for defining marshal event callbacks.
* See <a href="Marshaller.html#marshalEventCallback">Marshal Event Callbacks</a> for an overview.
*
@ -770,10 +770,10 @@ public interface Marshaller {
*/
public static abstract class Listener {
/**
* <p/>
* <p>
* Callback method invoked before marshalling from <tt>source</tt> to XML.
* <p/>
* <p/>
* </p>
* <p>
* This method is invoked just before marshalling process starts to marshal <tt>source</tt>.
* Note that if the class of <tt>source</tt> defines its own <tt>beforeMarshal</tt> method,
* the class specific callback method is invoked just before this method is invoked.
@ -784,10 +784,10 @@ public interface Marshaller {
}
/**
* <p/>
* <p>
* Callback method invoked after marshalling <tt>source</tt> to XML.
* <p/>
* <p/>
* </p>
* <p>
* This method is invoked after <tt>source</tt> and all its descendants have been marshalled.
* Note that if the class of <tt>source</tt> defines its own <tt>afterMarshal</tt> method,
* the class specific callback method is invoked just before this method is invoked.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -70,11 +70,11 @@ public abstract class SchemaOutputResolver {
*
* If the {@link Result} object has a system ID, it must be an
* absolute system ID. Those system IDs are relativized by the caller and used
* for &lt;xs:import> statements.
* for &lt;xs:import&gt; statements.
*
* If the {@link Result} object does not have a system ID, a schema
* for the namespace URI is generated but it won't be explicitly
* &lt;xs:import>ed from other schemas.
* &lt;xs:import&gt;ed from other schemas.
*
* If {@code null} is returned, the schema generation for this
* namespace URI will be skipped.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -57,8 +57,9 @@ public class TypeConstraintException extends java.lang.RuntimeException {
* Exception reference
*
*/
private Throwable linkedException;
private volatile Throwable linkedException;
static final long serialVersionUID = -3059799699420143848L;
/**
* Construct a TypeConstraintException with the specified detail message. The
@ -141,7 +142,7 @@ public class TypeConstraintException extends java.lang.RuntimeException {
* indicates that the linked exception does not exist or
* is unknown).
*/
public synchronized void setLinkedException( Throwable exception ) {
public void setLinkedException( Throwable exception ) {
this.linkedException = exception;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -238,13 +238,12 @@ import java.io.Reader;
* to a JAXB mapped class by {@link JAXBContext}, that the root
* element's <tt>xsi:type</tt> attribute takes
* precedence over the unmarshal methods <tt>declaredType</tt> parameter.
* These methods always return a <tt>JAXBElement&lt;declaredType></tt>
* These methods always return a <tt>JAXBElement&lt;declaredType&gt;</tt>
* instance. The table below shows how the properties of the returned JAXBElement
* instance are set.
*
* <a name="unmarshalDeclaredTypeReturn"></a>
* <p>
* <table border="2" rules="all" cellpadding="4">
* <table summary="" border="2" rules="all" cellpadding="4">
* <thead>
* <tr>
* <th align="center" colspan="2">
@ -284,19 +283,19 @@ import java.io.Reader;
* <blockquote>
* <pre>
* Schema fragment for example
* &lt;xs:schema>
* &lt;xs:complexType name="FooType">...&lt;\xs:complexType>
* &lt;!-- global element declaration "PurchaseOrder" -->
* &lt;xs:element name="PurchaseOrder">
* &lt;xs:complexType>
* &lt;xs:sequence>
* &lt;!-- local element declaration "foo" -->
* &lt;xs:element name="foo" type="FooType"/>
* &lt;xs:schema&gt;
* &lt;xs:complexType name="FooType"&gt;...&lt;\xs:complexType&gt;
* &lt;!-- global element declaration "PurchaseOrder" --&gt;
* &lt;xs:element name="PurchaseOrder"&gt;
* &lt;xs:complexType&gt;
* &lt;xs:sequence&gt;
* &lt;!-- local element declaration "foo" --&gt;
* &lt;xs:element name="foo" type="FooType"/&gt;
* ...
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;/xs:element>
* &lt;/xs:schema>
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* &lt;/xs:element&gt;
* &lt;/xs:schema&gt;
*
* JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
* Unmarshaller u = jc.createUnmarshaller();
@ -309,7 +308,7 @@ import java.io.Reader;
* // local element declaration in schema.
*
* // FooType is the JAXB mapping of the type of local element declaration foo.
* JAXBElement&lt;FooType> foo = u.unmarshal( fooSubtree, FooType.class);
* JAXBElement&lt;FooType&gt; foo = u.unmarshal( fooSubtree, FooType.class);
* </pre>
* </blockquote>
*
@ -390,7 +389,7 @@ import java.io.Reader;
* The external listener callback mechanism enables the registration of a {@link Listener}
* instance with an {@link Unmarshaller#setListener(Listener)}. The external listener receives all callback events,
* allowing for more centralized processing than per class defined callback methods. The external listener
* receives events when unmarshalling proces is marshalling to a JAXB element or to JAXB mapped class.
* receives events when unmarshalling process is marshalling to a JAXB element or to JAXB mapped class.
* <p>
* The 'class defined' and external listener event callback methods are independent of each other,
* both can be called for one event. The invocation ordering when both listener callback methods exist is
@ -1010,7 +1009,7 @@ public interface Unmarshaller {
*
* <p>
* Every unmarshaller internally maintains a
* {@link java.util.Map}&lt;{@link Class},{@link XmlAdapter}>,
* {@link java.util.Map}&lt;{@link Class},{@link XmlAdapter}&gt;,
* which it uses for unmarshalling classes whose fields/methods are annotated
* with {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter}.
*
@ -1050,7 +1049,6 @@ public interface Unmarshaller {
/**
* <p>Associate a context that resolves cid's, content-id URIs, to
* binary data passed as attachments.</p>
* <p/>
* <p>Unmarshal time validation, enabled via {@link #setSchema(Schema)},
* must be supported even when unmarshaller is performing XOP processing.
* </p>
@ -1063,21 +1061,21 @@ public interface Unmarshaller {
AttachmentUnmarshaller getAttachmentUnmarshaller();
/**
* <p/>
* <p>
* Register an instance of an implementation of this class with {@link Unmarshaller} to externally listen
* for unmarshal events.
* <p/>
* <p/>
* </p>
* <p>
* This class enables pre and post processing of an instance of a JAXB mapped class
* as XML data is unmarshalled into it. The event callbacks are called when unmarshalling
* XML content into a JAXBElement instance or a JAXB mapped class that represents a complex type definition.
* The event callbacks are not called when unmarshalling to an instance of a
* Java datatype that represents a simple type definition.
* <p/>
* <p/>
* </p>
* <p>
* External listener is one of two different mechanisms for defining unmarshal event callbacks.
* See <a href="Unmarshaller.html#unmarshalEventCallback">Unmarshal Event Callbacks</a> for an overview.
* <p/>
* </p>
* (@link #setListener(Listener)}
* (@link #getListener()}
*
@ -1085,10 +1083,10 @@ public interface Unmarshaller {
*/
public static abstract class Listener {
/**
* <p/>
* <p>
* Callback method invoked before unmarshalling into <tt>target</tt>.
* <p/>
* <p/>
* </p>
* <p>
* This method is invoked immediately after <tt>target</tt> was created and
* before the unmarshalling of this object begins. Note that
* if the class of <tt>target</tt> defines its own <tt>beforeUnmarshal</tt> method,
@ -1102,10 +1100,10 @@ public interface Unmarshaller {
}
/**
* <p/>
* <p>
* Callback method invoked after unmarshalling XML data into <tt>target</tt>.
* <p/>
* <p/>
* </p>
* <p>
* This method is invoked after all the properties (except IDREF) are unmarshalled into <tt>target</tt>,
* but before <tt>target</tt> is set into its <tt>parent</tt> object.
* Note that if the class of <tt>target</tt> defines its own <tt>afterUnmarshal</tt> method,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -62,7 +62,7 @@ import static java.lang.annotation.ElementType.METHOD;
* each attribute that is not statically associated with another
* JavaBean property, via {@link XmlAttribute}, is entered into the
* wildcard attribute map represented by
* {@link Map}&lt;{@link QName},{@link Object}>. The attribute QName is the
* {@link Map}&lt;{@link QName},{@link Object}&gt;. The attribute QName is the
* map's key. The key's value is the String value of the attribute.
*
* @author Kohsuke Kawaguchi, Sun Microsystems, Inc.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -50,7 +50,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* annotation for the other JavaBean properties on the class, is added to this
* "catch-all" property.
*
* <p>
* <h2>Usages:</h2>
* <pre>
* &#64;XmlAnyElement
@ -61,7 +60,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* public {@link Object}[] others;
*
* &#64;XmlAnyElement
* private List&lt;{@link Element}> nodes;
* private List&lt;{@link Element}&gt; nodes;
*
* &#64;XmlAnyElement
* private {@link Element} node;
@ -88,7 +87,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* <pre>
* // List of java.lang.String or DOM nodes.
* &#64;XmlAnyElement &#64;XmlMixed
* List&lt;Object> others;
* List&lt;Object&gt; others;
* </pre>
*
*
@ -96,13 +95,13 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
*
* The following schema would produce the following Java class:
* <pre>
* &lt;xs:complexType name="foo">
* &lt;xs:sequence>
* &lt;xs:element name="a" type="xs:int" />
* &lt;xs:element name="b" type="xs:int" />
* &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;xs:complexType name="foo"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="a" type="xs:int" /&gt;
* &lt;xs:element name="b" type="xs:int" /&gt;
* &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <pre>
@ -110,35 +109,35 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* int a;
* int b;
* &#64;{@link XmlAnyElement}
* List&lt;Element> any;
* List&lt;Element&gt; any;
* }
* </pre>
*
* It can unmarshal instances like
*
* <pre>
* &lt;foo xmlns:e="extra">
* &lt;a>1</a>
* &lt;e:other /> // this will be bound to DOM, because unmarshalling is orderless
* &lt;b>3</b>
* &lt;e:other />
* &lt;c>5</c> // this will be bound to DOM, because the annotation doesn't remember namespaces.
* &lt;/foo>
* &lt;foo xmlns:e="extra"&gt;
* &lt;a&gt;1&lt;/a&gt;
* &lt;e:other /&gt; // this will be bound to DOM, because unmarshalling is orderless
* &lt;b&gt;3&lt;/b&gt;
* &lt;e:other /&gt;
* &lt;c&gt;5&lt;/c&gt; // this will be bound to DOM, because the annotation doesn't remember namespaces.
* &lt;/foo&gt;
* </pre>
*
*
*
* The following schema would produce the following Java class:
* <pre>
* &lt;xs:complexType name="bar">
* &lt;xs:complexContent>
* &lt;xs:extension base="foo">
* &lt;xs:sequence>
* &lt;xs:element name="c" type="xs:int" />
* &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
* &lt;/xs:sequence>
* &lt;/xs:extension>
* &lt;/xs:complexType>
* &lt;xs:complexType name="bar"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:extension base="foo"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="c" type="xs:int" /&gt;
* &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:extension&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <pre>
@ -152,14 +151,14 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* It can unmarshal instances like
*
* <pre>
* &lt;bar xmlns:e="extra">
* &lt;a>1</a>
* &lt;e:other /> // this will be bound to DOM, because unmarshalling is orderless
* &lt;b>3</b>
* &lt;e:other />
* &lt;c>5</c> // this now goes to Bar.c
* &lt;e:other /> // this will go to Foo.any
* &lt;/bar>
* &lt;bar xmlns:e="extra"&gt;
* &lt;a&gt;1&lt;/a&gt;
* &lt;e:other /&gt; // this will be bound to DOM, because unmarshalling is orderless
* &lt;b&gt;3&lt;/b&gt;
* &lt;e:other /&gt;
* &lt;c&gt;5&lt;/c&gt; // this now goes to Bar.c
* &lt;e:other /&gt; // this will go to Foo.any
* &lt;/bar&gt;
* </pre>
*
*
@ -173,13 +172,13 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* <p>
* The following schema would produce the following Java class:
* <pre>
* &lt;xs:complexType name="foo">
* &lt;xs:choice maxOccurs="unbounded" minOccurs="0">
* &lt;xs:element name="a" type="xs:int" />
* &lt;xs:element name="b" type="xs:int" />
* &lt;xs:any namespace="##other" processContents="lax" />
* &lt;/xs:choice>
* &lt;/xs:complexType>
* &lt;xs:complexType name="foo"&gt;
* &lt;xs:choice maxOccurs="unbounded" minOccurs="0"&gt;
* &lt;xs:element name="a" type="xs:int" /&gt;
* &lt;xs:element name="b" type="xs:int" /&gt;
* &lt;xs:any namespace="##other" processContents="lax" /&gt;
* &lt;/xs:choice&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <pre>
@ -189,27 +188,27 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* &#64;{@link XmlElementRef}(name="a", type="JAXBElement.class")
* &#64;{@link XmlElementRef}(name="b", type="JAXBElement.class")
* })
* {@link List}&lt;{@link Object}> others;
* {@link List}&lt;{@link Object}&gt; others;
* }
*
* &#64;XmlRegistry
* class ObjectFactory {
* ...
* &#64;XmlElementDecl(name = "a", namespace = "", scope = Foo.class)
* {@link JAXBElement}&lt;Integer> createFooA( Integer i ) { ... }
* {@link JAXBElement}&lt;Integer&gt; createFooA( Integer i ) { ... }
*
* &#64;XmlElementDecl(name = "b", namespace = "", scope = Foo.class)
* {@link JAXBElement}&lt;Integer> createFooB( Integer i ) { ... }
* {@link JAXBElement}&lt;Integer&gt; createFooB( Integer i ) { ... }
* </pre>
*
* It can unmarshal instances like
*
* <pre>
* &lt;foo xmlns:e="extra">
* &lt;a>1</a> // this will unmarshal to a {@link JAXBElement} instance whose value is 1.
* &lt;e:other /> // this will unmarshal to a DOM {@link Element}.
* &lt;b>3</b> // this will unmarshal to a {@link JAXBElement} instance whose value is 1.
* &lt;/foo>
* &lt;foo xmlns:e="extra"&gt;
* &lt;a&gt;1&lt;/a&gt; // this will unmarshal to a {@link JAXBElement} instance whose value is 1.
* &lt;e:other /&gt; // this will unmarshal to a DOM {@link Element}.
* &lt;b&gt;3&lt;/b&gt; // this will unmarshal to a {@link JAXBElement} instance whose value is 1.
* &lt;/foo&gt;
* </pre>
*
*
@ -227,10 +226,10 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* </pre>
* then the following document will unmarshal like this:
* <pre>
* &lt;foo>
* &lt;unknown />
* &lt;foo />
* &lt;/foo>
* &lt;foo&gt;
* &lt;unknown /&gt;
* &lt;foo /&gt;
* &lt;/foo&gt;
*
* Foo foo = unmarshal();
* // 1 for 'unknown', another for 'foo'

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -52,14 +52,14 @@ import java.lang.annotation.Target;
* </pre>
* The above code maps to the following XML:
* <pre>
* &lt;xs:element name="foo" xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd">
* &lt;xs:complexType>
* &lt;xs:sequence>
* &lt;xs:element name="body" type="ref:swaRef" minOccurs="0" />
* &lt;/xs:sequence>
* &lt;xs:attribute name="data" type="ref:swaRef" use="optional" />
* &lt;/xs:complexType>
* &lt;/xs:element>
* &lt;xs:element name="foo" xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd"&gt;
* &lt;xs:complexType&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="body" type="ref:swaRef" minOccurs="0" /&gt;
* &lt;/xs:sequence&gt;
* &lt;xs:attribute name="data" type="ref:swaRef" use="optional" /&gt;
* &lt;/xs:complexType&gt;
* &lt;/xs:element&gt;
* </pre>
*
* <p>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -56,8 +56,8 @@ import static java.lang.annotation.RetentionPolicy.*;
* simple type.
* <pre>
* // Examples
* &#64;XmlAttribute List&lt;Integer> items; //legal
* &#64;XmlAttribute List&lt;Bar> foo; // illegal if Bar does not map to a schema simple type
* &#64;XmlAttribute List&lt;Integer&gt; items; //legal
* &#64;XmlAttribute List&lt;Bar&gt; foo; // illegal if Bar does not map to a schema simple type
* </pre>
* </li>
* <li> If the type of the field or the property is a non
@ -80,7 +80,6 @@ import static java.lang.annotation.RetentionPolicy.*;
* {@link XmlInlineBinaryData},
* {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter}.</li>
* </ul>
* </p>
*
* <p> <b>Example 1: </b>Map a JavaBean property to an XML attribute.</p>
* <pre>
@ -91,12 +90,12 @@ import static java.lang.annotation.RetentionPolicy.*;
* public void setPrice(java.math.BigDecimal ) {...};
* }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:complexType name="USPrice">
* &lt;xs:sequence>
* &lt;/xs:sequence>
* &lt;xs:attribute name="price" type="xs:decimal"/>
* &lt;/xs:complexType>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:complexType name="USPrice"&gt;
* &lt;xs:sequence&gt;
* &lt;/xs:sequence&gt;
* &lt;xs:attribute name="price" type="xs:decimal"/&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <p> <b>Example 2: </b>Map a JavaBean property to an XML attribute with anonymous type.</p>
@ -107,17 +106,17 @@ import static java.lang.annotation.RetentionPolicy.*;
* // Example: Code fragment
* class Foo {
* ...
* &#64;XmlAttribute List&lt;Integer> items;
* &#64;XmlAttribute List&lt;Integer&gt; items;
* }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:complexType name="foo">
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:complexType name="foo"&gt;
* ...
* &lt;xs:attribute name="items">
* &lt;xs:simpleType>
* &lt;xs:list itemType="xs:int"/>
* &lt;/xs:simpleType>
* &lt;/xs:complexType>
* &lt;xs:attribute name="items"&gt;
* &lt;xs:simpleType&gt;
* &lt;xs:list itemType="xs:int"/&gt;
* &lt;/xs:simpleType&gt;
* &lt;/xs:complexType&gt;
*
* </pre>
* @author Sekhar Vajjhala, Sun Microsystems, Inc.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -83,12 +83,12 @@ import static java.lang.annotation.RetentionPolicy.*;
* public java.math.BigDecimal price;
* }
*
* &lt;!-- Example: Local XML Schema element -->
* &lt;xs:complexType name="USPrice"/>
* &lt;xs:sequence>
* &lt;xs:element name="itemprice" type="xs:decimal" minOccurs="0"/>
* &lt;/sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: Local XML Schema element --&gt;
* &lt;xs:complexType name="USPrice"/&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="itemprice" type="xs:decimal" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
* <p>
*
@ -101,12 +101,12 @@ import static java.lang.annotation.RetentionPolicy.*;
* public java.math.BigDecimal price;
* }
*
* &lt;!-- Example: Local XML Schema element -->
* &lt;xs:complexType name="USPrice">
* &lt;xs:sequence>
* &lt;xs:element name="price" type="xs:decimal" nillable="true" minOccurs="0"/>
* &lt;/sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: Local XML Schema element --&gt;
* &lt;xs:complexType name="USPrice"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="price" type="xs:decimal" nillable="true" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
* <p>
* <b> Example 3: </b> Map a field to a nillable, required element.
@ -118,14 +118,13 @@ import static java.lang.annotation.RetentionPolicy.*;
* public java.math.BigDecimal price;
* }
*
* &lt;!-- Example: Local XML Schema element -->
* &lt;xs:complexType name="USPrice">
* &lt;xs:sequence>
* &lt;xs:element name="price" type="xs:decimal" nillable="true" minOccurs="1"/>
* &lt;/sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: Local XML Schema element --&gt;
* &lt;xs:complexType name="USPrice"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="price" type="xs:decimal" nillable="true" minOccurs="1"/&gt;
* &lt;/sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
* <p>
*
* <p> <b>Example 4: </b>Map a JavaBean property to an XML element
* with anonymous type.</p>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -62,23 +62,23 @@ import static java.lang.annotation.ElementType.METHOD;
* &#64;XmlRegistry
* class ObjectFactory {
* &#64;XmlElementDecl(name="foo")
* JAXBElement&lt;String> createFoo(String s) { ... }
* JAXBElement&lt;String&gt; createFoo(String s) { ... }
* }
* </pre>
* <pre>
* &lt;!-- XML input -->
* &lt;foo>string</foo>
* &lt;!-- XML input --&gt;
* &lt;foo&gt;string&lt;/foo&gt;
*
* // Example: code fragment corresponding to XML input
* JAXBElement<String> o =
* (JAXBElement<String>)unmarshaller.unmarshal(aboveDocument);
* JAXBElement&lt;String&gt; o =
* (JAXBElement&lt;String&gt;)unmarshaller.unmarshal(aboveDocument);
* // print JAXBElement instance to show values
* System.out.println(o.getName()); // prints "{}foo"
* System.out.println(o.getValue()); // prints "string"
* System.out.println(o.getValue().getClass()); // prints "java.lang.String"
*
* &lt;!-- Example: XML schema definition -->
* &lt;xs:element name="foo" type="xs:string"/>
* &lt;!-- Example: XML schema definition --&gt;
* &lt;xs:element name="foo" type="xs:string"/&gt;
* </pre>
*
* <p><b>Example 2: </b> Element declaration with non local scope
@ -91,16 +91,16 @@ import static java.lang.annotation.ElementType.METHOD;
* this javadoc.
*
* <pre>
* &lt;!-- Example: XML schema definition -->
* &lt;xs:schema>
* &lt;xs:complexType name="pea">
* &lt;xs:choice maxOccurs="unbounded">
* &lt;xs:element name="foo" type="xs:string"/>
* &lt;xs:element name="bar" type="xs:string"/>
* &lt;/xs:choice>
* &lt;/xs:complexType>
* &lt;xs:element name="foo" type="xs:int"/>
* &lt;/xs:schema>
* &lt;!-- Example: XML schema definition --&gt;
* &lt;xs:schema&gt;
* &lt;xs:complexType name="pea"&gt;
* &lt;xs:choice maxOccurs="unbounded"&gt;
* &lt;xs:element name="foo" type="xs:string"/&gt;
* &lt;xs:element name="bar" type="xs:string"/&gt;
* &lt;/xs:choice&gt;
* &lt;/xs:complexType&gt;
* &lt;xs:element name="foo" type="xs:int"/&gt;
* &lt;/xs:schema&gt;
* </pre>
* <pre>
* // Example: expected default binding
@ -109,19 +109,19 @@ import static java.lang.annotation.ElementType.METHOD;
* &#64;XmlElementRef(name="foo",type=JAXBElement.class)
* &#64;XmlElementRef(name="bar",type=JAXBElement.class)
* })
* List&lt;JAXBElement&lt;String>> fooOrBar;
* List&lt;JAXBElement&lt;String&gt;&gt; fooOrBar;
* }
*
* &#64;XmlRegistry
* class ObjectFactory {
* &#64;XmlElementDecl(scope=Pea.class,name="foo")
* JAXBElement<String> createPeaFoo(String s);
* JAXBElement&lt;String&gt; createPeaFoo(String s);
*
* &#64;XmlElementDecl(scope=Pea.class,name="bar")
* JAXBElement<String> createPeaBar(String s);
* JAXBElement&lt;String&gt; createPeaBar(String s);
*
* &#64;XmlElementDecl(name="foo")
* JAXBElement<Integer> createFoo(Integer i);
* JAXBElement&lt;Integer&gt; createFoo(Integer i);
* }
*
* </pre>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -57,8 +57,8 @@ import static java.lang.annotation.ElementType.METHOD;
* (section 5.5.5, "Element Property" of JAXB 2.0 specification). An
* element property method signature is of the form:
* <pre>
* public void setTerm(JAXBElement<? extends Operator>);
* public JAXBElement<? extends Operator> getTerm();
* public void setTerm(JAXBElement&lt;? extends Operator&gt;);
* public JAXBElement&lt;? extends Operator&gt; getTerm();
* </pre>
* <p>
* An element factory method annotated with {@link XmlElementDecl} is
@ -106,7 +106,7 @@ import static java.lang.annotation.ElementType.METHOD;
* // element name will be derived from the &#64;XmlRootElement
* // annotation on the type (for e.g. "jar" for JarTask).
* &#64;XmlElementRef
* List&lt;Task> tasks;
* List&lt;Task&gt; tasks;
* }
*
* abstract class Task {
@ -122,16 +122,16 @@ import static java.lang.annotation.ElementType.METHOD;
* ...
* }
*
* &lt;!-- XML Schema fragment -->
* &lt;xs:element name="target" type="Target">
* &lt;xs:complexType name="Target">
* &lt;xs:sequence>
* &lt;xs:choice maxOccurs="unbounded">
* &lt;xs:element ref="jar">
* &lt;xs:element ref="javac">
* &lt;/xs:choice>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- XML Schema fragment --&gt;
* &lt;xs:element name="target" type="Target"&gt;
* &lt;xs:complexType name="Target"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:choice maxOccurs="unbounded"&gt;
* &lt;xs:element ref="jar"&gt;
* &lt;xs:element ref="javac"&gt;
* &lt;/xs:choice&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
*
* </pre>
* <p>
@ -144,14 +144,14 @@ import static java.lang.annotation.ElementType.METHOD;
* </pre>
* will produce the following XML output:
* <pre>
* &lt;target>
* &lt;jar>
* &lt;target&gt;
* &lt;jar&gt;
* ....
* &lt;/jar>
* &lt;javac>
* &lt;/jar&gt;
* &lt;javac&gt;
* ....
* &lt;/javac>
* &lt;/target>
* &lt;/javac&gt;
* &lt;/target&gt;
* </pre>
* <p>
* It is not an error to have a class that extends <tt>Task</tt>
@ -182,17 +182,17 @@ import static java.lang.annotation.ElementType.METHOD;
* // substituted in the XML document.
* //
* &#64;XmlElementRef(type=JAXBElement.class,name="operator")
* JAXBElement&lt;? extends Operator> term;
* JAXBElement&lt;? extends Operator&gt; term;
* }
*
* &#64;XmlRegistry
* class ObjectFactory {
* &#64;XmlElementDecl(name="operator")
* JAXBElement&lt;Operator> createOperator(Operator o) {...}
* JAXBElement&lt;Operator&gt; createOperator(Operator o) {...}
* &#64;XmlElementDecl(name="add",substitutionHeadName="operator")
* JAXBElement&lt;Operator> createAdd(Operator o) {...}
* JAXBElement&lt;Operator&gt; createAdd(Operator o) {...}
* &#64;XmlElementDecl(name="sub",substitutionHeadName="operator")
* JAXBElement&lt;Operator> createSub(Operator o) {...}
* JAXBElement&lt;Operator&gt; createSub(Operator o) {...}
* }
*
* class Operator {
@ -208,9 +208,9 @@ import static java.lang.annotation.ElementType.METHOD;
* </pre>
* will produce the following XML output:
* <pre>
* &lt;math>
* &lt;add>...&lt;/add>
* &lt;/math>
* &lt;math&gt;
* &lt;add&gt;...&lt;/add&gt;
* &lt;/math&gt;
* </pre>
*
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -44,15 +44,15 @@ import java.lang.annotation.Target;
* int[] names;
*
* // XML Serialization Form 1 (Unwrapped collection)
* &lt;names> ... &lt;/names>
* &lt;names> ... &lt;/names>
* &lt;names&gt; ... &lt;/names&gt;
* &lt;names&gt; ... &lt;/names&gt;
*
* // XML Serialization Form 2 ( Wrapped collection )
* &lt;wrapperElement>
* &lt;names> value-of-item &lt;/names>
* &lt;names> value-of-item &lt;/names>
* &lt;wrapperElement&gt;
* &lt;names&gt; value-of-item &lt;/names&gt;
* &lt;names&gt; value-of-item &lt;/names&gt;
* ....
* &lt;/wrapperElement>
* &lt;/wrapperElement&gt;
* </pre>
*
* <p> The two serialized XML forms allow a null collection to be

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -83,21 +83,21 @@ import java.lang.annotation.Target;
* }
*
* &lt;!-- XML Representation for a List of {1,2.5}
* XML output is not wrapped using another element -->
* XML output is not wrapped using another element --&gt;
* ...
* &lt;A> 1 &lt;/A>
* &lt;B> 2.5 &lt;/B>
* &lt;A&gt; 1 &lt;/A&gt;
* &lt;B&gt; 2.5 &lt;/B&gt;
* ...
*
* &lt;!-- XML Schema fragment -->
* &lt;xs:complexType name="Foo">
* &lt;xs:sequence>
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
* &lt;xs:element name="A" type="xs:int"/>
* &lt;xs:element name="B" type="xs:float"/>
* &lt;xs:choice>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- XML Schema fragment --&gt;
* &lt;xs:complexType name="Foo"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
* &lt;xs:element name="A" type="xs:int"/&gt;
* &lt;xs:element name="B" type="xs:float"/&gt;
* &lt;xs:choice&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
*
* </pre>
*
@ -115,19 +115,19 @@ import java.lang.annotation.Target;
* public List items;
* }
*
* &lt;!-- XML Schema fragment -->
* &lt;xs:complexType name="Foo">
* &lt;xs:sequence>
* &lt;xs:element name="bar">
* &lt;xs:complexType>
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
* &lt;xs:element name="A" type="xs:int"/>
* &lt;xs:element name="B" type="xs:float"/>
* &lt;/xs:choice>
* &lt;/xs:complexType>
* &lt;/xs:element>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- XML Schema fragment --&gt;
* &lt;xs:complexType name="Foo"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="bar"&gt;
* &lt;xs:complexType&gt;
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
* &lt;xs:element name="A" type="xs:int"/&gt;
* &lt;xs:element name="B" type="xs:float"/&gt;
* &lt;/xs:choice&gt;
* &lt;/xs:complexType&gt;
* &lt;/xs:element&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <p><b>Example 3:</b> Change element name based on type using an adapter.
@ -146,19 +146,19 @@ import java.lang.annotation.Target;
* &#64;XmlType(name="PX") class PX extends P {...}
* &#64;XmlType(name="PY") class PY extends P {...}
*
* &lt;!-- XML Schema fragment -->
* &lt;xs:complexType name="Foo">
* &lt;xs:sequence>
* &lt;xs:element name="bar">
* &lt;xs:complexType>
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
* &lt;xs:element name="A" type="PX"/>
* &lt;xs:element name="B" type="PY"/>
* &lt;/xs:choice>
* &lt;/xs:complexType>
* &lt;/xs:element>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- XML Schema fragment --&gt;
* &lt;xs:complexType name="Foo"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="bar"&gt;
* &lt;xs:complexType&gt;
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
* &lt;xs:element name="A" type="PX"/&gt;
* &lt;xs:element name="B" type="PY"/&gt;
* &lt;/xs:choice&gt;
* &lt;/xs:complexType&gt;
* &lt;/xs:element&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -56,23 +56,23 @@ import static java.lang.annotation.ElementType.FIELD;
* <p> In the absence of this annotation, {@link Enum#name()} is used
* as the XML representation.
*
* <p> <b>Example 1: </b>Map enum constant name -> enumeration facet</p>
* <p> <b>Example 1: </b>Map enum constant name -&gt; enumeration facet</p>
* <pre>
* //Example: Code fragment
* &#64;XmlEnum(String.class)
* public enum Card { CLUBS, DIAMONDS, HEARTS, SPADES }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:simpleType name="Card">
* &lt;xs:restriction base="xs:string"/>
* &lt;xs:enumeration value="CLUBS"/>
* &lt;xs:enumeration value="DIAMONDS"/>
* &lt;xs:enumeration value="HEARTS"/>
* &lt;xs:enumeration value="SPADES"/>
* &lt;/xs:simpleType>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:simpleType name="Card"&gt;
* &lt;xs:restriction base="xs:string"/&gt;
* &lt;xs:enumeration value="CLUBS"/&gt;
* &lt;xs:enumeration value="DIAMONDS"/&gt;
* &lt;xs:enumeration value="HEARTS"/&gt;
* &lt;xs:enumeration value="SPADES"/&gt;
* &lt;/xs:simpleType&gt;
* </pre>
*
* <p><b>Example 2: </b>Map enum constant name(value) -> enumeration facet </p>
* <p><b>Example 2: </b>Map enum constant name(value) -&gt; enumeration facet </p>
* <pre>
* //Example: code fragment
* &#64;XmlType
@ -83,18 +83,18 @@ import static java.lang.annotation.ElementType.FIELD;
* &#64;XmlEnumValue("10") DIME(10),
* &#64;XmlEnumValue("25") QUARTER(25) }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:simpleType name="Coin">
* &lt;xs:restriction base="xs:int">
* &lt;xs:enumeration value="1"/>
* &lt;xs:enumeration value="5"/>
* &lt;xs:enumeration value="10"/>
* &lt;xs:enumeration value="25"/>
* &lt;/xs:restriction>
* &lt;/xs:simpleType>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:simpleType name="Coin"&gt;
* &lt;xs:restriction base="xs:int"&gt;
* &lt;xs:enumeration value="1"/&gt;
* &lt;xs:enumeration value="5"/&gt;
* &lt;xs:enumeration value="10"/&gt;
* &lt;xs:enumeration value="25"/&gt;
* &lt;/xs:restriction&gt;
* &lt;/xs:simpleType&gt;
* </pre>
*
* <p><b>Example 3: </b>Map enum constant name -> enumeration facet </p>
* <p><b>Example 3: </b>Map enum constant name -&gt; enumeration facet </p>
*
* <pre>
* //Code fragment
@ -105,13 +105,13 @@ import static java.lang.annotation.ElementType.FIELD;
* &#64;XmlEnumValue("2") TWO;
* }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:simpleType name="Code">
* &lt;xs:restriction base="xs:int">
* &lt;xs:enumeration value="1"/>
* &lt;xs:enumeration value="2"/>
* &lt;/xs:restriction>
* &lt;/xs:simpleType>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:simpleType name="Code"&gt;
* &lt;xs:restriction base="xs:int"&gt;
* &lt;xs:enumeration value="1"/&gt;
* &lt;xs:enumeration value="2"/&gt;
* &lt;/xs:restriction&gt;
* &lt;/xs:simpleType&gt;
* </pre>
*
* @since 1.6, JAXB 2.0

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -74,15 +74,15 @@ import static java.lang.annotation.RetentionPolicy.*;
* .... other properties not shown
* }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:complexType name="Customer">
* &lt;xs:complexContent>
* &lt;xs:sequence>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:complexType name="Customer"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:sequence&gt;
* ....
* &lt;/xs:sequence>
* &lt;xs:attribute name="customerID" type="xs:ID"/>
* &lt;/xs:complexContent>
* &lt;/xs:complexType>
* &lt;/xs:sequence&gt;
* &lt;xs:attribute name="customerID" type="xs:ID"/&gt;
* &lt;/xs:complexContent&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* @author Sekhar Vajjhala, Sun Microsystems, Inc.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -83,15 +83,15 @@ import static java.lang.annotation.RetentionPolicy.*;
* ....
* }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:complexType name="Shipping">
* &lt;xs:complexContent>
* &lt;xs:sequence>
* &lt;xs:element name="customer" type="xs:IDREF"/>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:complexType name="Shipping"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="customer" type="xs:IDREF"/&gt;
* ....
* &lt;/xs:sequence>
* &lt;/xs:complexContent>
* &lt;/xs:complexType>
* &lt;/xs:sequence&gt;
* &lt;/xs:complexContent&gt;
* &lt;/xs:complexType&gt;
*
* </pre>
*
@ -143,61 +143,61 @@ import static java.lang.annotation.RetentionPolicy.*;
* public Invoice getInvoice();
* }
*
* &lt;!-- XML Schema mapping for above code frament -->
* &lt;!-- XML Schema mapping for above code frament --&gt;
*
* &lt;xs:complexType name="Invoice">
* &lt;xs:complexContent>
* &lt;xs:sequence>
* &lt;xs:element name="customer" type="xs:IDREF"/>
* &lt;xs:complexType name="Invoice"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="customer" type="xs:IDREF"/&gt;
* ....
* &lt;/xs:sequence>
* &lt;/xs:complexContent>
* &lt;/xs:complexType>
* &lt;/xs:sequence&gt;
* &lt;/xs:complexContent&gt;
* &lt;/xs:complexType&gt;
*
* &lt;xs:complexType name="Shipping">
* &lt;xs:complexContent>
* &lt;xs:sequence>
* &lt;xs:element name="customer" type="xs:IDREF"/>
* &lt;xs:complexType name="Shipping"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="customer" type="xs:IDREF"/&gt;
* ....
* &lt;/xs:sequence>
* &lt;/xs:complexContent>
* &lt;/xs:complexType>
* &lt;/xs:sequence&gt;
* &lt;/xs:complexContent&gt;
* &lt;/xs:complexType&gt;
*
* &lt;xs:complexType name="Customer">
* &lt;xs:complexContent>
* &lt;xs:sequence>
* &lt;xs:complexType name="Customer"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:sequence&gt;
* ....
* &lt;/xs:sequence>
* &lt;xs:attribute name="CustomerID" type="xs:ID"/>
* &lt;/xs:complexContent>
* &lt;/xs:complexType>
* &lt;/xs:sequence&gt;
* &lt;xs:attribute name="CustomerID" type="xs:ID"/&gt;
* &lt;/xs:complexContent&gt;
* &lt;/xs:complexType&gt;
*
* &lt;xs:complexType name="CustomerData">
* &lt;xs:complexContent>
* &lt;xs:sequence>
* &lt;xs:element name="customer" type="xs:Customer"/>
* &lt;xs:element name="shipping" type="xs:Shipping"/>
* &lt;xs:element name="invoice" type="xs:Invoice"/>
* &lt;/xs:sequence>
* &lt;/xs:complexContent>
* &lt;/xs:complexType>
* &lt;xs:complexType name="CustomerData"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="customer" type="xs:Customer"/&gt;
* &lt;xs:element name="shipping" type="xs:Shipping"/&gt;
* &lt;xs:element name="invoice" type="xs:Invoice"/&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexContent&gt;
* &lt;/xs:complexType&gt;
*
* &lt;xs:element name"customerData" type="xs:CustomerData"/>
* &lt;xs:element name"customerData" type="xs:CustomerData"/&gt;
*
* &lt;!-- Instance document conforming to the above XML Schema -->
* &lt;customerData>
* &lt;customer customerID="Alice">
* &lt;!-- Instance document conforming to the above XML Schema --&gt;
* &lt;customerData&gt;
* &lt;customer customerID="Alice"&gt;
* ....
* &lt;/customer>
* &lt;/customer&gt;
*
* &lt;shipping customer="Alice">
* &lt;shipping customer="Alice"&gt;
* ....
* &lt;/shipping>
* &lt;/shipping&gt;
*
* &lt;invoice customer="Alice">
* &lt;invoice customer="Alice"&gt;
* ....
* &lt;/invoice>
* &lt;/customerData>
* &lt;/invoice&gt;
* &lt;/customerData&gt;
*
* </pre>
*
@ -210,14 +210,14 @@ import static java.lang.annotation.RetentionPolicy.*;
* public List customers;
* }
*
* &lt;!-- XML schema fragment -->
* &lt;xs:complexType name="Shipping">
* &lt;xs:sequence>
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
* &lt;xs:element name="Alice" type="xs:IDREF"/>
* &lt;/xs:choice>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- XML schema fragment --&gt;
* &lt;xs:complexType name="Shipping"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
* &lt;xs:element name="Alice" type="xs:IDREF"/&gt;
* &lt;/xs:choice&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <p><b>Example 4: </b> Mapping a List to a list of elements of type IDREF.
@ -231,15 +231,15 @@ import static java.lang.annotation.RetentionPolicy.*;
* public List customers;
* }
*
* &lt;!-- XML Schema fragment -->
* &lt;xs:complexType name="Shipping">
* &lt;xs:sequence>
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
* &lt;xs:element name="Alice" type="xs:IDREF"/>
* &lt;xs:element name="John" type="xs:IDREF"/>
* &lt;/xs:choice>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- XML Schema fragment --&gt;
* &lt;xs:complexType name="Shipping"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
* &lt;xs:element name="Alice" type="xs:IDREF"/&gt;
* &lt;xs:element name="John" type="xs:IDREF"/&gt;
* &lt;/xs:choice&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
* @author Sekhar Vajjhala, Sun Microsystems, Inc.
* @see XmlID

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -53,17 +53,17 @@ import static java.lang.annotation.ElementType.PARAMETER;
* &#64;XmlRootElement
* class Foo {
* &#64;XmlElement
* List&lt;String> data;
* List&lt;String&gt; data;
* }
* </pre>
*
* would produce XML like this:
*
* <pre>
* &lt;foo>
* &lt;data>abc</data>
* &lt;data>def</data>
* &lt;/foo>
* &lt;foo&gt;
* &lt;data&gt;abc&lt;/data&gt;
* &lt;data&gt;def&lt;/data&gt;
* &lt;/foo&gt;
* </pre>
*
* &#64;XmlList annotation, on the other hand, allows multiple values to be
@ -74,16 +74,16 @@ import static java.lang.annotation.ElementType.PARAMETER;
* class Foo {
* &#64;XmlElement
* &#64;XmlList
* List&lt;String> data;
* List&lt;String&gt; data;
* }
* </pre>
*
* the above code will produce XML like this:
*
* <pre>
* &lt;foo>
* &lt;data>abc def</data>
* &lt;/foo>
* &lt;foo&gt;
* &lt;data&gt;abc def&lt;/data&gt;
* &lt;/foo&gt;
* </pre>
*
* <p>This annotation can be used with the following annotations:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -57,16 +57,16 @@ import javax.xml.bind.JAXBElement;
*
* Below is an example of binding and creation of mixed content.
* <pre>
* &lt;!-- schema fragment having mixed content -->
* &lt;xs:complexType name="letterBody" mixed="true">
* &lt;xs:sequence>
* &lt;xs:element name="name" type="xs:string"/>
* &lt;xs:element name="quantity" type="xs:positiveInteger"/>
* &lt;xs:element name="productName" type="xs:string"/>
* &lt;!-- etc. -->
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;xs:element name="letterBody" type="letterBody"/>
* &lt;!-- schema fragment having mixed content --&gt;
* &lt;xs:complexType name="letterBody" mixed="true"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="name" type="xs:string"/&gt;
* &lt;xs:element name="quantity" type="xs:positiveInteger"/&gt;
* &lt;xs:element name="productName" type="xs:string"/&gt;
* &lt;!-- etc. --&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* &lt;xs:element name="letterBody" type="letterBody"/&gt;
*
* // Schema-derived Java code:
* // (Only annotations relevant to mixed content are shown below,
@ -74,12 +74,12 @@ import javax.xml.bind.JAXBElement;
* import java.math.BigInteger;
* public class ObjectFactory {
* // element instance factories
* JAXBElement&lt;LetterBody> createLetterBody(LetterBody value);
* JAXBElement&lt;String> createLetterBodyName(String value);
* JAXBElement&lt;BigInteger> createLetterBodyQuantity(BigInteger value);
* JAXBElement&lt;String> createLetterBodyProductName(String value);
* JAXBElement&lt;LetterBody&gt; createLetterBody(LetterBody value);
* JAXBElement&lt;String&gt; createLetterBodyName(String value);
* JAXBElement&lt;BigInteger&gt; createLetterBodyQuantity(BigInteger value);
* JAXBElement&lt;String&gt; createLetterBodyProductName(String value);
* // type instance factory
* LetterBody> createLetterBody();
* LetterBody createLetterBody();
* }
* </pre>
* <pre>
@ -97,16 +97,16 @@ import javax.xml.bind.JAXBElement;
* </pre>
* The following is an XML instance document with mixed content
* <pre>
* &lt;letterBody>
* Dear Mr.&lt;name>Robert Smith&lt;/name>
* Your order of &lt;quantity>1&lt;/quantity> &lt;productName>Baby
* Monitor&lt;/productName> shipped from our warehouse. ....
* &lt;/letterBody>
* &lt;letterBody&gt;
* Dear Mr.&lt;name&gt;Robert Smith&lt;/name&gt;
* Your order of &lt;quantity&gt;1&lt;/quantity&gt; &lt;productName&gt;Baby
* Monitor&lt;/productName&gt; shipped from our warehouse. ....
* &lt;/letterBody&gt;
* </pre>
* that can be constructed using following JAXB API calls.
* <pre>
* LetterBody lb = ObjectFactory.createLetterBody();
* JAXBElement&lt;LetterBody> lbe = ObjectFactory.createLetterBody(lb);
* JAXBElement&lt;LetterBody&gt; lbe = ObjectFactory.createLetterBody(lb);
* List gcl = lb.getContent(); //add mixed content to general content property.
* gcl.add("Dear Mr."); // add text information item as a String.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,8 +36,7 @@ package javax.xml.bind.annotation;
* The namespace qualification values are used in the annotations
* defined in this packge. The enumeration values are mapped as follows:
*
* <p>
* <table border="1" cellpadding="4" cellspacing="3">
* <table summary="" border="1" cellpadding="4" cellspacing="3">
* <tbody>
* <tr>
* <td><b>Enum Value</b></td>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -54,7 +54,7 @@ import static java.lang.annotation.ElementType.TYPE;
* <p> This annotation can be used with the following annotations:
* {@link XmlType}, {@link XmlEnum}, {@link XmlAccessorType},
* {@link XmlAccessorOrder}.
* <p>
* </p>
* <p>
* <b>Example 1: </b> Associate an element with XML Schema type
@ -74,11 +74,11 @@ import static java.lang.annotation.ElementType.TYPE;
* </pre>
*
* <pre>
* &lt;!-- Example: XML output -->
* &lt;point>
* &lt;x> 3 </x>
* &lt;y> 5 </y>
* &lt;/point>
* &lt;!-- Example: XML output --&gt;
* &lt;point&gt;
* &lt;x&gt; 3 &lt;/x&gt;
* &lt;y&gt; 5 &lt;/y&gt;
* &lt;/point&gt;
* </pre>
*
* The annotation causes an global element declaration to be produced
@ -86,14 +86,14 @@ import static java.lang.annotation.ElementType.TYPE;
* the XML schema type to which the class is mapped.
*
* <pre>
* &lt;!-- Example: XML schema definition -->
* &lt;xs:element name="point" type="point"/>
* &lt;xs:complexType name="point">
* &lt;xs:sequence>
* &lt;xs:element name="x" type="xs:int"/>
* &lt;xs:element name="y" type="xs:int"/>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: XML schema definition --&gt;
* &lt;xs:element name="point" type="point"/&gt;
* &lt;xs:complexType name="point"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="x" type="xs:int"/&gt;
* &lt;xs:element name="y" type="xs:int"/&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <p>
@ -114,25 +114,25 @@ import static java.lang.annotation.ElementType.TYPE;
* //Example: Code fragment corresponding to XML output *
* marshal( new Point3D(3,5,0), System.out );
*
* &lt;!-- Example: XML output -->
* &lt;!-- The element name is point3D not point -->
* &lt;point3D>
* &lt;x>3&lt;/x>
* &lt;y>5&lt;/y>
* &lt;z>0&lt;/z>
* &lt;/point3D>
* &lt;!-- Example: XML output --&gt;
* &lt;!-- The element name is point3D not point --&gt;
* &lt;point3D&gt;
* &lt;x&gt;3&lt;/x&gt;
* &lt;y&gt;5&lt;/y&gt;
* &lt;z&gt;0&lt;/z&gt;
* &lt;/point3D&gt;
*
* &lt;!-- Example: XML schema definition -->
* &lt;xs:element name="point3D" type="point3D"/>
* &lt;xs:complexType name="point3D">
* &lt;xs:complexContent>
* &lt;xs:extension base="point">
* &lt;xs:sequence>
* &lt;xs:element name="z" type="xs:int"/>
* &lt;/xs:sequence>
* &lt;/xs:extension>
* &lt;/xs:complexContent>
* &lt;/xs:complexType>
* &lt;!-- Example: XML schema definition --&gt;
* &lt;xs:element name="point3D" type="point3D"/&gt;
* &lt;xs:complexType name="point3D"&gt;
* &lt;xs:complexContent&gt;
* &lt;xs:extension base="point"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="z" type="xs:int"/&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:extension&gt;
* &lt;/xs:complexContent&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <b>Example 3: </b> Associate a global element with XML Schema type
@ -145,13 +145,13 @@ import static java.lang.annotation.ElementType.TYPE;
* public java.math.BigDecimal price;
* }
*
* &lt;!-- Example: XML schema definition -->
* &lt;xs:element name="PriceElement" type="USPrice"/>
* &lt;xs:complexType name="USPrice">
* &lt;xs:sequence>
* &lt;xs:element name="price" type="xs:decimal"/>
* &lt;/sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: XML schema definition --&gt;
* &lt;xs:element name="PriceElement" type="USPrice"/&gt;
* &lt;xs:complexType name="USPrice"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="price" type="xs:decimal"/&gt;
* &lt;/sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* @author Sekhar Vajjhala, Sun Microsystems, Inc.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -55,7 +55,6 @@ import static java.lang.annotation.RetentionPolicy.*;
* will allow the package level annotations to be defined in
* package-info.java.
* </ul>
* <p>
*
* <p><b>Example 1:</b> Customize name of XML namespace to which
* package is mapped.</p>
@ -65,14 +64,14 @@ import static java.lang.annotation.RetentionPolicy.*;
* namespace = "http://www.example.com/MYPO1"
* )
*
* &lt;!-- XML Schema fragment -->
* &lt;!-- XML Schema fragment --&gt;
* &lt;schema
* xmlns=...
* xmlns:po=....
* targetNamespace="http://www.example.com/MYPO1"
* >
* &gt;
* &lt;!-- prefixes generated by default are implementation
* depedenent -->
* depedenent --&gt;
* </pre>
*
* <p><b>Example 2:</b> Customize namespace prefix, namespace URI
@ -90,11 +89,11 @@ import static java.lang.annotation.RetentionPolicy.*;
* )
* )
*
* &lt;!-- XML Schema fragment -->
* &lt;!-- XML Schema fragment --&gt;
* &lt;schema
* xmlns:xs="http://www.w3.org/2001/XMLSchema"
* xmlns:po="http://www.example.com/PO1"
* targetNamespace="http://www.example.com/PO1">
* targetNamespace="http://www.example.com/PO1"&gt;
*
* </pre>
*
@ -105,11 +104,11 @@ import static java.lang.annotation.RetentionPolicy.*;
* ...
* )
*
* &lt;!-- XML Schema fragment -->
* &lt;!-- XML Schema fragment --&gt;
* &lt;schema
* xmlns="http://www.w3.org/2001/XMLSchema"
* xmlns:po="http://www.example.com/PO1"
* elementFormDefault="unqualified">
* elementFormDefault="unqualified"&gt;
*
* </pre>
@ -180,11 +179,11 @@ public @interface XmlSchema {
* More precisely, the value must be either <tt>""</tt>, <tt>"##generate"</tt>, or
* <a href="http://www.w3.org/TR/xmlschema-2/#anyURI">
* a valid lexical representation of <tt>xs:anyURI</tt></a> that begins
* with <tt>&lt;scheme>:</tt>.
* with <tt>&lt;scheme&gt;:</tt>.
*
* <p>
* A schema generator is expected to generate a corresponding
* <tt>&lt;xs:import namespace="..." schemaLocation="..."/></tt> (or
* <tt>&lt;xs:import namespace="..." schemaLocation="..."/&gt;</tt> (or
* no <tt>schemaLocation</tt> attribute at all if the empty string is specified.)
* However, the schema generator is allowed to use a different value in
* the <tt>schemaLocation</tt> attribute (including not generating

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -66,12 +66,12 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* public XMLGregorianCalendar date;
* }
*
* &lt;!-- Example: Local XML Schema element -->
* &lt;xs:complexType name="USPrice"/>
* &lt;xs:sequence>
* &lt;xs:element name="date" type="xs:date"/>
* &lt;/sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: Local XML Schema element --&gt;
* &lt;xs:complexType name="USPrice"/&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="date" type="xs:date"/&gt;
* &lt;/sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <p> <b> Example 2: </b> Customize mapping of XMLGregorianCalendar at package

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -79,12 +79,12 @@ import static java.lang.annotation.RetentionPolicy.*;
* }
*
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:complexType name="USAddress">
* &lt;xs:sequence>
* &lt;xs:element name="name" type="xs:string"/>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:complexType name="USAddress"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="name" type="xs:string"/&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* @author Sekhar Vajjhala, Sun Microsystems, Inc.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -64,7 +64,7 @@ import java.lang.annotation.Target;
* mapping of JavaBean properties and fields contained within the
* class. The schema type to which the class is mapped can either be
* named or anonymous. A class can be mapped to an anonymous schema
* type by annotating the class with <tt>&#64XmlType(name="")</tt>.
* type by annotating the class with <tt>&#64;XmlType(name="")</tt>.
* <p>
* Either a global element, local element or a local attribute can be
* associated with an anonymous type as follows:
@ -112,14 +112,14 @@ import java.lang.annotation.Target;
* The following table shows the mapping of the class to a XML Schema
* complex type or simple type. The notational symbols used in the table are:
* <ul>
* <li> -> : represents a mapping </li>
* <li> -&gt; : represents a mapping </li>
* <li> [x]+ : one or more occurances of x </li>
* <li> [ <tt>@XmlValue</tt> property ]: JavaBean property annotated with
* <tt>@XmlValue</tt></li>
* <li> X : don't care
* </ul>
* <blockquote>
* <table border="1" cellpadding="4" cellspacing="3">
* <table summary="" border="1" cellpadding="4" cellspacing="3">
* <tbody>
* <tr>
* <td><b>Target</b></td>
@ -132,7 +132,7 @@ import java.lang.annotation.Target;
* <tr valign="top">
* <td>Class</td>
* <td>{}</td>
* <td>[property]+ -> elements</td>
* <td>[property]+ -&gt; elements</td>
* <td>complexcontent<br>xs:all</td>
* <td> </td>
* </tr>
@ -140,7 +140,7 @@ import java.lang.annotation.Target;
* <tr valign="top">
* <td>Class</td>
* <td>non empty</td>
* <td>[property]+ -> elements</td>
* <td>[property]+ -&gt; elements</td>
* <td>complexcontent<br>xs:sequence</td>
* <td> </td>
* </tr>
@ -148,7 +148,7 @@ import java.lang.annotation.Target;
* <tr valign="top">
* <td>Class</td>
* <td>X</td>
* <td>no property -> element</td>
* <td>no property -&gt; element</td>
* <td>complexcontent<br>empty sequence</td>
* <td> </td>
* </tr>
@ -156,8 +156,7 @@ import java.lang.annotation.Target;
* <tr valign="top">
* <td>Class</td>
* <td>X</td>
* <td>1 [ <tt>@XmlValue</tt> property] && <br> [property]+
* ->attributes</td>
* <td>1 [<tt>@XmlValue</tt> property] {@literal &&} <br> [property]+ -&gt; attributes</td>
* <td>simplecontent</td>
* <td> </td>
* </tr>
@ -165,11 +164,9 @@ import java.lang.annotation.Target;
* <tr valign="top">
* <td>Class</td>
* <td>X</td>
* <td>1 [ <tt>@XmlValue</tt> property ]&& <br> no properties
* -> attribute</td>
* <td>1 [<tt>@XmlValue</tt> property] {@literal &&} <br> no properties -&gt; attribute</td>
* <td> </td>
* <td>simpletype</td>
* <td> </td>
* </tr>
* </tbody>
* </table>
@ -212,16 +209,16 @@ import java.lang.annotation.Target;
* void setZip(java.math.BigDecimal) {..};
* }
*
* &lt;!-- XML Schema mapping for USAddress -->
* &lt;xs:complexType name="USAddress">
* &lt;xs:sequence>
* &lt;xs:element name="street" type="xs:string"/>
* &lt;xs:element name="city" type="xs:string"/>
* &lt;xs:element name="state" type="xs:string"/>
* &lt;xs:element name="zip" type="xs:decimal"/>
* &lt;xs:element name="name" type="xs:string"/>
* &lt;/xs:all>
* &lt;/xs:complexType>
* &lt;!-- XML Schema mapping for USAddress --&gt;
* &lt;xs:complexType name="USAddress"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="street" type="xs:string"/&gt;
* &lt;xs:element name="city" type="xs:string"/&gt;
* &lt;xs:element name="state" type="xs:string"/&gt;
* &lt;xs:element name="zip" type="xs:decimal"/&gt;
* &lt;xs:element name="name" type="xs:string"/&gt;
* &lt;/xs:all&gt;
* &lt;/xs:complexType&gt;
* </pre>
* <p> <b> Example 2: </b> Map a class to a complex type with
* xs:all </p>
@ -229,16 +226,16 @@ import java.lang.annotation.Target;
* &#64;XmlType(propOrder={})
* public class USAddress { ...}
*
* &lt;!-- XML Schema mapping for USAddress -->
* &lt;xs:complexType name="USAddress">
* &lt;xs:all>
* &lt;xs:element name="name" type="xs:string"/>
* &lt;xs:element name="street" type="xs:string"/>
* &lt;xs:element name="city" type="xs:string"/>
* &lt;xs:element name="state" type="xs:string"/>
* &lt;xs:element name="zip" type="xs:decimal"/>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- XML Schema mapping for USAddress --&gt;
* &lt;xs:complexType name="USAddress"&gt;
* &lt;xs:all&gt;
* &lt;xs:element name="name" type="xs:string"/&gt;
* &lt;xs:element name="street" type="xs:string"/&gt;
* &lt;xs:element name="city" type="xs:string"/&gt;
* &lt;xs:element name="state" type="xs:string"/&gt;
* &lt;xs:element name="zip" type="xs:decimal"/&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
*</pre>
* <p> <b> Example 3: </b> Map a class to a global element with an
* anonymous type.
@ -248,22 +245,22 @@ import java.lang.annotation.Target;
* &#64;XmlType(name="")
* public class USAddress { ...}
*
* &lt;!-- XML Schema mapping for USAddress -->
* &lt;xs:element name="USAddress">
* &lt;xs:complexType>
* &lt;xs:sequence>
* &lt;xs:element name="name" type="xs:string"/>
* &lt;xs:element name="street" type="xs:string"/>
* &lt;xs:element name="city" type="xs:string"/>
* &lt;xs:element name="state" type="xs:string"/>
* &lt;xs:element name="zip" type="xs:decimal"/>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;/xs:element>
* &lt;!-- XML Schema mapping for USAddress --&gt;
* &lt;xs:element name="USAddress"&gt;
* &lt;xs:complexType&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="name" type="xs:string"/&gt;
* &lt;xs:element name="street" type="xs:string"/&gt;
* &lt;xs:element name="city" type="xs:string"/&gt;
* &lt;xs:element name="state" type="xs:string"/&gt;
* &lt;xs:element name="zip" type="xs:decimal"/&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* &lt;/xs:element&gt;
* </pre>
*
* <p> <b> Example 4: </b> Map a property to a local element with
* anonmyous type.
* anonymous type.
* <pre>
* //Example: Code fragment
* public class Invoice {
@ -275,20 +272,20 @@ import java.lang.annotation.Target;
* public class USAddress { ... }
* }
*
* &lt;!-- XML Schema mapping for USAddress -->
* &lt;xs:complexType name="Invoice">
* &lt;xs:sequence>
* &lt;xs:element name="addr">
* &lt;xs:complexType>
* &lt;xs:element name="name", type="xs:string"/>
* &lt;xs:element name="city", type="xs:string"/>
* &lt;xs:element name="city" type="xs:string"/>
* &lt;xs:element name="state" type="xs:string"/>
* &lt;xs:element name="zip" type="xs:decimal"/>
* &lt;/xs:complexType>
* &lt;!-- XML Schema mapping for USAddress --&gt;
* &lt;xs:complexType name="Invoice"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="addr"&gt;
* &lt;xs:complexType&gt;
* &lt;xs:element name="name", type="xs:string"/&gt;
* &lt;xs:element name="city", type="xs:string"/&gt;
* &lt;xs:element name="city" type="xs:string"/&gt;
* &lt;xs:element name="state" type="xs:string"/&gt;
* &lt;xs:element name="zip" type="xs:decimal"/&gt;
* &lt;/xs:complexType&gt;
* ...
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <p> <b> Example 5: </b> Map a property to an attribute with
@ -310,17 +307,17 @@ import java.lang.annotation.Target;
* public java.math.BigDecimal price;
* }
*
* &lt;!-- Example: XML Schema fragment -->
* &lt;xs:complexType name="Item">
* &lt;xs:sequence>
* &lt;xs:element name="name" type="xs:string"/>
* &lt;xs:attribute name="price">
* &lt;xs:simpleType>
* &lt;xs:restriction base="xs:decimal"/>
* &lt;/xs:simpleType>
* &lt;/xs:attribute>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;!-- Example: XML Schema fragment --&gt;
* &lt;xs:complexType name="Item"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="name" type="xs:string"/&gt;
* &lt;xs:attribute name="price"&gt;
* &lt;xs:simpleType&gt;
* &lt;xs:restriction base="xs:decimal"/&gt;
* &lt;/xs:simpleType&gt;
* &lt;/xs:attribute&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* <p> <b> Example 6: </b> Define a factoryClass and factoryMethod

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -67,7 +67,6 @@ import static java.lang.annotation.RetentionPolicy.*;
* type, then the type must map to a XML Schema simple type. </li>
*
* </ul>
* </p>
* <p>
* If the annotated JavaBean property is the sole class member being
* mapped to XML Schema construct, then the class is mapped to a
@ -89,10 +88,10 @@ import static java.lang.annotation.RetentionPolicy.*;
* public java.math.BigDecimal price;
* }
*
* &lt;!-- Example 1: XML Schema fragment -->
* &lt;xs:simpleType name="USPrice">
* &lt;xs:restriction base="xs:decimal"/>
* &lt;/xs:simpleType>
* &lt;!-- Example 1: XML Schema fragment --&gt;
* &lt;xs:simpleType name="USPrice"&gt;
* &lt;xs:restriction base="xs:decimal"/&gt;
* &lt;/xs:simpleType&gt;
*
* </pre>
*
@ -110,17 +109,16 @@ import static java.lang.annotation.RetentionPolicy.*;
* public String currency;
* }
*
* &lt;!-- Example 2: XML Schema fragment -->
* &lt;xs:complexType name="InternationalPrice">
* &lt;xs:simpleContent>
* &lt;xs:extension base="xs:decimal">
* &lt;xs:attribute name="currency" type="xs:string"/>
* &lt;/xs:extension>
* &lt;/xs:simpleContent>
* &lt;/xs:complexType>
* &lt;!-- Example 2: XML Schema fragment --&gt;
* &lt;xs:complexType name="InternationalPrice"&gt;
* &lt;xs:simpleContent&gt;
* &lt;xs:extension base="xs:decimal"&gt;
* &lt;xs:attribute name="currency" type="xs:string"/&gt;
* &lt;/xs:extension&gt;
* &lt;/xs:simpleContent&gt;
* &lt;/xs:complexType&gt;
*
* </pre>
* </p>
*
* @author Sekhar Vajjhala, Sun Microsystems, Inc.
* @see XmlType

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -76,11 +76,11 @@ package javax.xml.bind.annotation.adapters;
* <p> <b> Step 1: </b> Determine the desired XML representation for HashMap.
*
* <pre>
* &lt;hashmap>
* &lt;entry key="id123">this is a value&lt;/entry>
* &lt;entry key="id312">this is another value&lt;/entry>
* &lt;hashmap&gt;
* &lt;entry key="id123"&gt;this is a value&lt;/entry&gt;
* &lt;entry key="id312"&gt;this is another value&lt;/entry&gt;
* ...
* &lt;/hashmap>
* &lt;/hashmap&gt;
* </pre>
*
* <p> <b> Step 2: </b> Determine the schema definition that the
@ -88,20 +88,20 @@ package javax.xml.bind.annotation.adapters;
*
* <pre>
*
* &lt;xs:complexType name="myHashMapType">
* &lt;xs:sequence>
* &lt;xs:complexType name="myHashMapType"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="entry" type="myHashMapEntryType"
* minOccurs = "0" maxOccurs="unbounded"/>
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* minOccurs = "0" maxOccurs="unbounded"/&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
*
* &lt;xs:complexType name="myHashMapEntryType">
* &lt;xs:simpleContent>
* &lt;xs:extension base="xs:string">
* &lt;xs:attribute name="key" type="xs:int"/>
* &lt;/xs:extension>
* &lt;/xs:simpleContent>
* &lt;/xs:complexType>
* &lt;xs:complexType name="myHashMapEntryType"&gt;
* &lt;xs:simpleContent&gt;
* &lt;xs:extension base="xs:string"&gt;
* &lt;xs:attribute name="key" type="xs:int"/&gt;
* &lt;/xs:extension&gt;
* &lt;/xs:simpleContent&gt;
* &lt;/xs:complexType&gt;
*
* </pre>
*
@ -110,7 +110,7 @@ package javax.xml.bind.annotation.adapters;
*
* <pre>
* public class MyHashMapType {
* List&lt;MyHashMapEntryType> entry;
* List&lt;MyHashMapEntryType&gt; entry;
* }
*
* public class MyHashMapEntryType {
@ -127,7 +127,7 @@ package javax.xml.bind.annotation.adapters;
*
* <pre>
* public final class MyHashMapAdapter extends
* XmlAdapter&lt;MyHashMapType,HashMap> { ... }
* XmlAdapter&lt;MyHashMapType,HashMap&gt; { ... }
*
* </pre>
*
@ -144,11 +144,11 @@ package javax.xml.bind.annotation.adapters;
* The above code fragment will map to the following schema:
*
* <pre>
* &lt;xs:complexType name="Foo">
* &lt;xs:sequence>
* &lt;xs:element name="hashmap" type="myHashMapType"
* &lt;/xs:sequence>
* &lt;/xs:complexType>
* &lt;xs:complexType name="Foo"&gt;
* &lt;xs:sequence&gt;
* &lt;xs:element name="hashmap" type="myHashMapType"&gt;
* &lt;/xs:sequence&gt;
* &lt;/xs:complexType&gt;
* </pre>
*
* @param <BoundType>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -70,7 +70,7 @@ public abstract class AttachmentUnmarshaller {
*
* <p>The returned <code>DataHandler</code> instance must be configured
* to meet the following required mapping constaint.
* <table border="2" rules="all" cellpadding="4">
* <table summary="" border="2" rules="all" cellpadding="4">
* <thead>
* <tr>
* <th align="center" colspan="2">
@ -100,7 +100,7 @@ public abstract class AttachmentUnmarshaller {
* </tr>
* </tbody>
* </table>
* Note that it is allowable to support additional mappings.</p>
* Note that it is allowable to support additional mappings.
*
* @param cid It is expected to be a valid lexical form of the XML Schema
* <code>xs:anyURI</code> datatype. If <code>{@link #isXOPPackage()}

View File

@ -23,7 +23,7 @@
# questions.
#
build-id=2.2.11-b141124.1933
build-version=JAX-WS RI 2.2.11-b141124.1933
build-id=2.2.11-b150127.1410
build-version=JAX-WS RI 2.2.11-b150127.1410
major-version=2.2.11
svn-revision=312b19a2e0e312b55e1ea6f531bd595955cd581f
svn-revision=28121d09ed8ac02b76788709ccb4cdb66e03bbfa

View File

@ -30,10 +30,10 @@ BASEDIR_DOESNT_EXIST = \
Non-existent directory: {0}
VERSION = \
schemagen 2.2.12-b141016.1821
schemagen 2.2.12-b150126.1924
FULLVERSION = \
schemagen full version "2.2.12-b141016.1821"
schemagen full version "2.2.12-b150126.1924"
USAGE = \
Usage: schemagen [-options ...] <java files> \n\

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Nicht erkanntes {0} in Zeile {1} Spalte {2}
BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0}
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.12-b141016.1821"
FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.12-b150126.1924"
USAGE = Verwendung: schemagen [-options ...] <java files> \nOptionen: \n\\ \\ \\ \\ -d <path> : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp <path> : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath <path> : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding <encoding> : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode <file> : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help : Zeigt diese Verwendungsmeldung an

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Aparece un {0} inesperado en la l\u00EDnea {1} y la colu
BASEDIR_DOESNT_EXIST = Directorio no existente: {0}
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = versi\u00F3n completa de schemagen "2.2.12-b141016.1821"
FULLVERSION = versi\u00F3n completa de schemagen "2.2.12-b150126.1924"
USAGE = Sintaxis: schemagen [-options ...] <archivos java> \nOpciones: \n\\ \\ \\ \\ -d <ruta de acceso> : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp <ruta de acceso> : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding <codificaci\u00F3n> : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode <archivo> : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help : muestra este mensaje de sintaxis

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Un \u00E9l\u00E9ment {0} inattendu appara\u00EEt \u00E0
BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = version compl\u00E8te de schemagen "2.2.12-b141016.1821"
FULLVERSION = version compl\u00E8te de schemagen "2.2.12-b150126.1924"
USAGE = Syntaxe : schemagen [-options ...] <java files> \nOptions : \n\ \ \ \ -d <path> : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding <encoding> : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode <file> : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} imprevisto visualizzato sulla riga {1} colonna {2}
BASEDIR_DOESNT_EXIST = Directory non esistente: {0}
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = versione completa schemagen "2.2.12-b141016.1821"
FULLVERSION = versione completa schemagen "2.2.12-b150126.1924"
USAGE = Uso: schemagen [-options ...] <java files> \nOpzioni: \n\ \ \ \ -d <path> : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp <path> : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath <path> : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding <encoding> : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode <file> : genera il file di episodio per la compilazione separata\n\ \ \ \ -version : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion : visualizza le informazioni sulla versione completa\n\ \ \ \ -help : visualizza questo messaggio sull'uso

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u4E88\u671F\u3057\u306A\u3044{0}\u304C\u884C{1}\u3001\u
BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.12-b141016.1821"
FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.12-b150126.1924"
USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] <java files> \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d <path> : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp <path> : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath <path> : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding <encoding> : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode <file> : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \uC608\uC0C1\uCE58 \uC54A\uC740 {0}\uC774(\uAC00) {1}\uD
BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0}
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.12-b141016.1821"
FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.12-b150126.1924"
USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] <java files> \n\uC635\uC158: \n\ \ \ \ -d <path> : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp <path> : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath <path> : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding <encoding> : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode <file> : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} inesperado aparece na linha {1} coluna {2}
BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0}
VERSION = gera\u00E7\u00E3o do esquema 2.2.12-b141016.1821
VERSION = gera\u00E7\u00E3o do esquema 2.2.12-b150126.1924
FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.12-b141016.1821"
FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.12-b150126.1924"
USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] <java files> \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d <path> : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp <path> : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath <path> : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding <encoding> : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode <file> : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help : exibir esta mensagem de uso

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u5728\u7B2C {1} \u884C, \u7B2C {2} \u5217\u51FA\u73B0\u
BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0}
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.12-b141016.1821"
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.12-b150126.1924"
USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9009\u9879: \n\ \ \ \ -d <path> : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp <path> : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath <path> : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding <encoding> : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode <file> : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F

View File

@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u672A\u9810\u671F\u7684 {0} \u986F\u793A\u65BC\u884C {1
BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0}
VERSION = schemagen 2.2.12-b141016.1821
VERSION = schemagen 2.2.12-b150126.1924
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.12-b141016.1821"
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.12-b150126.1924"
USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9078\u9805: \n\\ \\ \\ \\ -d <path> : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp <path> : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath <path> : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding <encoding> : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode <file> : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F

View File

@ -171,20 +171,20 @@ Driver.CompilingSchema = \
Driver.FailedToGenerateCode = \
Failed to produce code.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \
This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b141016.1821 \n\
This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b150126.1924 \n\
See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\
Any modifications to this file will be lost upon recompilation of the source schema. \n\
Generated on: {0} \n
Driver.Version = \
xjc 2.2.12-b141016.1821
xjc 2.2.12-b150126.1924
Driver.FullVersion = \
xjc full version "2.2.12-b141016.1821"
xjc full version "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = Ein Schema wird kompiliert ...
Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b141016.1821 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b150126.1924 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.12-b141016.1821"
Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = Compilando un esquema...
Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.12-b141016.1821 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.12-b150126.1924 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = versi\u00F3n completa de xjc "2.2.12-b141016.1821"
Driver.FullVersion = versi\u00F3n completa de xjc "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = compilation d'un sch\u00e9ma...
Driver.FailedToGenerateCode = Echec de la production du code.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.12-b141016.1821 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.12-b150126.1924 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = version compl\u00E8te xjc "2.2.12-b141016.1821"
Driver.FullVersion = version compl\u00E8te xjc "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = compilazione di uno schema in corso...
Driver.FailedToGenerateCode = Produzione del codice non riuscita.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.12-b141016.1821 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.12-b150126.1924 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = versione completa xjc "2.2.12-b141016.1821"
Driver.FullVersion = versione completa xjc "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u30b3\u30f3\u30d1\u30a4\
Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.12-b141016.1821\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.12-b150126.1924\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.12-b141016.1821"
Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub294
Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.12-b141016.1821 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.12-b150126.1924 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n
Driver.Version = XJC 2.2.12-b141016.1821
Driver.Version = XJC 2.2.12-b150126.1924
Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.12-b141016.1821"
Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = compilando um esquema...
Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.12-b141016.1821 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.12-b150126.1924 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = vers\u00E3o completa de xjc "2.2.12-b141016.1821"
Driver.FullVersion = vers\u00E3o completa de xjc "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = \u6b63\u5728\u7f16\u8bd1\u6a21\u5f0f...
Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.12-b141016.1821 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.12-b150126.1924 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.12-b141016.1821"
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -96,14 +96,14 @@ Driver.CompilingSchema = \u6b63\u5728\u7de8\u8b6f\u7db1\u8981...
Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc.
# DO NOT localize the 2.2.12-b141016.1821 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b141016.1821 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n
# DO NOT localize the 2.2.12-b150126.1924 string - it is a token for an mvn <properties filter>
Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.12-b150126.1924 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n
Driver.Version = xjc 2.2.12-b141016.1821
Driver.Version = xjc 2.2.12-b150126.1924
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.12-b141016.1821"
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.12-b150126.1924"
Driver.BuildID = 2.2.12-b141016.1821
Driver.BuildID = 2.2.12-b150126.1924
# for JDK integration - include version in source zip
jaxb.jdk.version=@@JAXB_JDK_VERSION@@

View File

@ -32,18 +32,18 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
import java.util.ServiceLoader;
import java.util.Set;
import com.sun.codemodel.internal.CodeWriter;
@ -354,9 +354,7 @@ public class Options
*/
public List<Plugin> getAllPlugins() {
if(allPlugins==null) {
allPlugins = new ArrayList<Plugin>();
ClassLoader ucl = getUserClassLoader(SecureLoader.getClassClassLoader(getClass()));
allPlugins.addAll(Arrays.asList(findServices(Plugin.class,ucl)));
allPlugins = findServices(Plugin.class);
}
return allPlugins;
@ -924,118 +922,44 @@ public class Options
/**
* If a plugin failed to load, report.
*/
private static String pluginLoadFailure;
private String pluginLoadFailure;
/**
* Looks for all "META-INF/services/[className]" files and
* create one instance for each class name found inside this file.
*/
private static <T> T[] findServices( Class<T> clazz, ClassLoader classLoader ) {
// if true, print debug output
final boolean debug = com.sun.tools.internal.xjc.util.Util.getSystemProperty(Options.class,"findServices")!=null;
// if we are running on Mustang or Dolphin, use ServiceLoader
// so that we can take advantage of JSR-277 module system.
private <T> List<T> findServices( Class<T> clazz) {
final List<T> result = new ArrayList<T>();
final boolean debug = getDebugPropertyValue();
try {
Class<?> serviceLoader = Class.forName("java.util.ServiceLoader");
if(debug)
System.out.println("Using java.util.ServiceLoader");
Iterable<T> itr = (Iterable<T>)serviceLoader.getMethod("load",Class.class,ClassLoader.class).invoke(null,clazz,classLoader);
List<T> r = new ArrayList<T>();
for (T t : itr)
r.add(t);
return r.toArray((T[])Array.newInstance(clazz,r.size()));
} catch (ClassNotFoundException e) {
// fall through
} catch (IllegalAccessException e) {
Error x = new IllegalAccessError();
x.initCause(e);
throw x;
} catch (InvocationTargetException e) {
Throwable x = e.getTargetException();
if (x instanceof RuntimeException)
throw (RuntimeException) x;
if (x instanceof Error)
throw (Error) x;
throw new Error(x);
} catch (NoSuchMethodException e) {
Error x = new NoSuchMethodError();
x.initCause(e);
throw x;
}
String serviceId = "META-INF/services/" + clazz.getName();
// used to avoid creating the same instance twice
Set<String> classNames = new HashSet<String>();
if(debug) {
System.out.println("Looking for "+serviceId+" for add-ons");
}
// try to find services in CLASSPATH
try {
Enumeration<URL> e = classLoader.getResources(serviceId);
if(e==null) return (T[])Array.newInstance(clazz,0);
ArrayList<T> a = new ArrayList<T>();
while(e.hasMoreElements()) {
URL url = e.nextElement();
BufferedReader reader=null;
if(debug) {
System.out.println("Checking "+url+" for an add-on");
}
try {
reader = new BufferedReader(new InputStreamReader(url.openStream()));
String impl;
while((impl = reader.readLine())!=null ) {
// try to instanciate the object
impl = impl.trim();
if(classNames.add(impl)) {
Class implClass = classLoader.loadClass(impl);
if(!clazz.isAssignableFrom(implClass)) {
pluginLoadFailure = impl+" is not a subclass of "+clazz+". Skipping";
if(debug)
System.out.println(pluginLoadFailure);
continue;
}
if(debug) {
System.out.println("Attempting to instanciate "+impl);
}
a.add(clazz.cast(implClass.newInstance()));
}
}
reader.close();
} catch( Exception ex ) {
// let it go.
StringWriter w = new StringWriter();
ex.printStackTrace(new PrintWriter(w));
pluginLoadFailure = w.toString();
if(debug) {
System.out.println(pluginLoadFailure);
}
if( reader!=null ) {
try {
reader.close();
} catch( IOException ex2 ) {
// ignore
}
}
}
}
return a.toArray((T[])Array.newInstance(clazz,a.size()));
// TCCL allows user plugins to be loaded even if xjc is in jdk
// We have to use our SecureLoader to obtain it because we are trying to avoid SecurityException
final ClassLoader tccl = SecureLoader.getContextClassLoader();
final ServiceLoader<T> sl = ServiceLoader.load(clazz, tccl);
for (T t : sl)
result.add(t);
} catch( Throwable e ) {
// ignore any error
StringWriter w = new StringWriter();
e.printStackTrace(new PrintWriter(w));
pluginLoadFailure = w.toString();
if(debug) {
if(debug)
System.out.println(pluginLoadFailure);
}
return (T[])Array.newInstance(clazz,0);
}
return result;
}
private static boolean getDebugPropertyValue() {
final String debugPropertyName = Options.class.getName() + ".findServices";
if (System.getSecurityManager() != null) {
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
return Boolean.getBoolean(debugPropertyName);
}
});
} else {
return Boolean.getBoolean(debugPropertyName);
}
}

View File

@ -40,7 +40,7 @@ import com.sun.codemodel.internal.JForEach;
import com.sun.codemodel.internal.JType;
import com.sun.codemodel.internal.JVar;
import com.sun.tools.internal.xjc.model.CElementInfo;
import static com.sun.tools.internal.xjc.model.Aspect.EXPOSED;
import static com.sun.tools.internal.xjc.outline.Aspect.EXPOSED;
import com.sun.tools.internal.xjc.outline.FieldAccessor;
import com.sun.tools.internal.xjc.outline.FieldOutline;

View File

@ -33,7 +33,7 @@ import com.sun.codemodel.internal.JVar;
import com.sun.codemodel.internal.JConditional;
import com.sun.codemodel.internal.JExpr;
import com.sun.codemodel.internal.JExpression;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.FieldOutline;
import com.sun.tools.internal.xjc.outline.FieldAccessor;
import com.sun.tools.internal.xjc.model.CElementInfo;

View File

@ -36,7 +36,7 @@ import com.sun.tools.internal.xjc.generator.annotation.spec.XmlJavaTypeAdapterWr
import com.sun.tools.internal.xjc.model.CAdapter;
import com.sun.tools.internal.xjc.model.TypeUse;
import com.sun.tools.internal.xjc.model.nav.NType;
import static com.sun.tools.internal.xjc.model.Aspect.EXPOSED;
import static com.sun.tools.internal.xjc.outline.Aspect.EXPOSED;
import com.sun.tools.internal.xjc.outline.Outline;
import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapterMarker;

View File

@ -25,7 +25,7 @@
package com.sun.tools.internal.xjc.generator.bean;
import static com.sun.tools.internal.xjc.model.Aspect.EXPOSED;
import static com.sun.tools.internal.xjc.outline.Aspect.EXPOSED;
import java.io.Serializable;
import java.net.URL;
@ -90,7 +90,7 @@ import com.sun.tools.internal.xjc.model.CPropertyInfo;
import com.sun.tools.internal.xjc.model.CTypeRef;
import com.sun.tools.internal.xjc.model.Model;
import com.sun.tools.internal.xjc.model.CClassRef;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.ClassOutline;
import com.sun.tools.internal.xjc.outline.EnumConstantOutline;
import com.sun.tools.internal.xjc.outline.EnumOutline;

View File

@ -39,7 +39,7 @@ import com.sun.codemodel.internal.JMethod;
import com.sun.codemodel.internal.JMod;
import com.sun.codemodel.internal.JType;
import com.sun.tools.internal.xjc.model.CElementInfo;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.ElementOutline;
/**

View File

@ -42,7 +42,7 @@ import com.sun.codemodel.internal.JType;
import com.sun.codemodel.internal.JVar;
import com.sun.tools.internal.xjc.generator.annotation.spec.XmlAccessorTypeWriter;
import com.sun.tools.internal.xjc.model.CClassInfo;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.Outline;
/**

View File

@ -51,7 +51,7 @@ import com.sun.tools.internal.xjc.model.CElementInfo;
import com.sun.tools.internal.xjc.model.CPropertyInfo;
import com.sun.tools.internal.xjc.model.Constructor;
import com.sun.tools.internal.xjc.model.Model;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.FieldAccessor;
import com.sun.tools.internal.xjc.outline.FieldOutline;
import com.sun.xml.internal.bind.v2.TODO;

View File

@ -49,7 +49,7 @@ import com.sun.tools.internal.xjc.model.CTypeRef;
import com.sun.tools.internal.xjc.model.CValuePropertyInfo;
import com.sun.tools.internal.xjc.model.Model;
import com.sun.tools.internal.xjc.outline.PackageOutline;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
/**
* {@link PackageOutline} enhanced with schema2java specific

View File

@ -32,7 +32,7 @@ import com.sun.codemodel.internal.JPackage;
import com.sun.codemodel.internal.fmt.JPropertyFile;
import com.sun.tools.internal.xjc.model.CElementInfo;
import com.sun.tools.internal.xjc.model.Model;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.runtime.JAXBContextFactory;
/**

View File

@ -28,7 +28,7 @@ package com.sun.tools.internal.xjc.generator.bean;
import com.sun.codemodel.internal.JPackage;
import com.sun.tools.internal.xjc.model.CElementInfo;
import com.sun.tools.internal.xjc.model.Model;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
/**
* Generates public ObjectFactory.

View File

@ -63,8 +63,8 @@ import com.sun.tools.internal.xjc.model.CTypeInfo;
import com.sun.tools.internal.xjc.model.CTypeRef;
import com.sun.tools.internal.xjc.model.CValuePropertyInfo;
import com.sun.tools.internal.xjc.model.nav.NClass;
import com.sun.tools.internal.xjc.model.Aspect;
import static com.sun.tools.internal.xjc.model.Aspect.IMPLEMENTATION;
import com.sun.tools.internal.xjc.outline.Aspect;
import static com.sun.tools.internal.xjc.outline.Aspect.IMPLEMENTATION;
import com.sun.tools.internal.xjc.outline.ClassOutline;
import com.sun.tools.internal.xjc.outline.FieldAccessor;
import com.sun.tools.internal.xjc.outline.FieldOutline;

View File

@ -38,7 +38,7 @@ import com.sun.codemodel.internal.JVar;
import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
import com.sun.tools.internal.xjc.model.CPropertyInfo;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.xml.internal.bind.api.impl.NameConverter;
import java.io.Serializable;

View File

@ -40,7 +40,7 @@ import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
import com.sun.tools.internal.xjc.model.CElement;
import com.sun.tools.internal.xjc.model.CPropertyInfo;
import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.xml.internal.bind.api.impl.NameConverter;
import java.io.Serializable;
import java.util.Set;

View File

@ -35,7 +35,7 @@ import com.sun.codemodel.internal.JVar;
import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
import com.sun.tools.internal.xjc.model.CPropertyInfo;
import com.sun.tools.internal.xjc.model.Aspect;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.FieldAccessor;
import com.sun.xml.internal.bind.api.impl.NameConverter;

View File

@ -34,6 +34,7 @@ import com.sun.tools.internal.xjc.model.nav.EagerNClass;
import com.sun.tools.internal.xjc.model.nav.NClass;
import com.sun.tools.internal.xjc.model.nav.NType;
import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.Outline;
import com.sun.xml.internal.bind.v2.model.core.Adapter;

View File

@ -28,6 +28,7 @@ package com.sun.tools.internal.xjc.model;
import javax.xml.namespace.QName;
import com.sun.codemodel.internal.JType;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.xml.internal.bind.v2.model.util.ArrayInfoUtil;
import com.sun.tools.internal.xjc.model.nav.NClass;
import com.sun.tools.internal.xjc.model.nav.NType;

View File

@ -49,6 +49,7 @@ import com.sun.codemodel.internal.JExpr;
import com.sun.codemodel.internal.JExpression;
import com.sun.codemodel.internal.JType;
import com.sun.tools.internal.xjc.model.nav.NClass;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
import com.sun.xml.internal.bind.v2.model.core.BuiltinLeafInfo;
import com.sun.xml.internal.bind.v2.model.core.Element;

View File

@ -45,6 +45,7 @@ import com.sun.istack.internal.Nullable;
import com.sun.tools.internal.xjc.Language;
import com.sun.tools.internal.xjc.model.nav.NClass;
import com.sun.tools.internal.xjc.model.nav.NType;
import com.sun.tools.internal.xjc.outline.Aspect;
import com.sun.tools.internal.xjc.outline.Outline;
import com.sun.tools.internal.xjc.reader.Ring;
import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;

Some files were not shown because too many files have changed in this diff Show More