Merge
This commit is contained in:
commit
b3e23ac700
1
.hgtags
1
.hgtags
@ -17,3 +17,4 @@ a2879b2837f5a4c87e9542efe69ef138194af8ff jdk7-b38
|
||||
3c53424bbe3bb77e01b468b4b0140deec33e11fc jdk7-b40
|
||||
3cb2a607c347934f8e7e86f840a094c28b08d9ea jdk7-b41
|
||||
caf58ffa084568990cbb3441f9ae188e36b31770 jdk7-b42
|
||||
41bd0a702bc8ec6feebd725a63e7c3227f82ab11 jdk7-b43
|
||||
|
@ -17,3 +17,4 @@ ab523b49de1fc73fefe6855ce1e0349bdbd7af29 jdk7-b39
|
||||
44be42de6693063fb191989bf0e188de2fa51e7c jdk7-b40
|
||||
541bdc5ad32fc33255944d0a044ad992f3d915e8 jdk7-b41
|
||||
94052b87287303527125026fe4b2698cf867ea83 jdk7-b42
|
||||
848e684279d2ba42577d9621d5b2e5af3823d12d jdk7-b43
|
||||
|
@ -17,3 +17,4 @@ ef6af34d75a7b44e77083f1d4ee47631fa09d3b4 jdk7-b31
|
||||
184e21992f47a8d730df1adc5b21a108f3125489 jdk7-b40
|
||||
c90eeda9594ed2983403e2049aed8d503126c62e jdk7-b41
|
||||
ccd6a16502e0650d91d85c4b86be05cbcd461a87 jdk7-b42
|
||||
9cd740d48a4855321d69f137a7109c00bcda76be jdk7-b43
|
||||
|
@ -17,3 +17,4 @@ d9bc824aa078573829bb66572af847e26e1bd12e jdk7-b38
|
||||
81a0cbe3b28460ce836109934ece03db7afaf9cc jdk7-b40
|
||||
f9d938ede1960d18cb7cf23c645b026519c1a678 jdk7-b41
|
||||
ad8c8ca4ab0f4c86e74c061958f44a8f4a930f2c jdk7-b42
|
||||
fc6a5ae3fef5ebacfa896dbb3ae37715e388e282 jdk7-b43
|
||||
|
@ -131,6 +131,14 @@ endif
|
||||
# Enable linker optimization
|
||||
LFLAGS += -Xlinker -O1
|
||||
|
||||
# If this is a --hash-style=gnu system, use --hash-style=both
|
||||
# The gnu .hash section won't work on some Linux systems like SuSE 10.
|
||||
_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
|
||||
ifneq ($(_HAS_HASH_STYLE_GNU),)
|
||||
LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
|
||||
endif
|
||||
LFLAGS += $(LDFLAGS_HASH_STYLE)
|
||||
|
||||
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
|
||||
MAPFLAG = -Xlinker --version-script=FILENAME
|
||||
|
||||
|
@ -17,3 +17,4 @@ e9f750f0a3a00413a7b77028b2ecdabb7129ae32 jdk7-b38
|
||||
54946f466e2c047c44c903f1bec400b685c2508e jdk7-b40
|
||||
0758bd3e2852e4f931ba211cc4d48f589450eeb4 jdk7-b41
|
||||
036e0dca841a5a17f784d15c86a9da88d2a6f1e6 jdk7-b42
|
||||
96fe28d4a9131e1a97bfe00f779e5626cd09c4d0 jdk7-b43
|
||||
|
@ -17,3 +17,4 @@ a2a6f9edf761934faf59ea60d7fe7178371302cd jdk7-b37
|
||||
70a6ac6dd737fe45c2fadb57646195b2b4fe269d jdk7-b40
|
||||
a8379d24aa03386610169cb0f4e4b8ed266a2e8d jdk7-b41
|
||||
621c02d83abc850c170fb6726d57b19f1eaf5033 jdk7-b42
|
||||
1ad2f51564db6ca4c6d95760cf13fb083d3dec94 jdk7-b43
|
||||
|
@ -17,3 +17,4 @@ cc5f810b5af8a3a83b0df5a29d9e24d7a0ff8086 jdk7-b38
|
||||
2201dad60231a3c3e0346e3a0250d69ca3b71fd4 jdk7-b40
|
||||
44941f893cea95ecdd5987b12e548069bd803849 jdk7-b41
|
||||
3ef0bdfa7609f79d4f2ea621f30cf593a2e432ce jdk7-b42
|
||||
50c67678b0d180063ade199d398b67a54063fa7f jdk7-b43
|
||||
|
@ -142,9 +142,11 @@ endif
|
||||
$(UNPACK_EXE): $(UNPACK_EXE_FILES_o) winres
|
||||
$(prep-target)
|
||||
$(LINKER) $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
|
||||
ifdef MT
|
||||
$(MT) /manifest $(TEMPDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
|
||||
endif
|
||||
$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
|
||||
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
$(RES):: $(VERSIONINFO_RESOURCE)
|
||||
$(prep-target)
|
||||
|
@ -68,11 +68,24 @@ PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
|
||||
|
||||
# The following DLL's are considered MS runtime libraries and should
|
||||
# not to be REBASEd, see deploy/make/common/Release.gmk.
|
||||
# msvcrt.dll, msvcr71.dll: Microsoft runtimes
|
||||
# msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
|
||||
MS_RUNTIME_LIBRARIES = msvcrt.dll
|
||||
MSVCRNN_DLL =
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
ifeq ($(COMPILER_VERSION), VS2003)
|
||||
MS_RUNTIME_LIBRARIES += msvcr71.dll
|
||||
MSVCRNN_DLL = msvcr71.dll
|
||||
MSVCPNN_DLL = msvcp71.dll
|
||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2005)
|
||||
MSVCRNN_DLL = msvcr80.dll
|
||||
MSVCPNN_DLL = msvcp80.dll
|
||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2008)
|
||||
MSVCRNN_DLL = msvcr90.dll
|
||||
MSVCPNN_DLL = msvcp90.dll
|
||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -178,9 +191,22 @@ ifeq ($(CC_VERSION),msvc)
|
||||
CC_OPT/LOWER = -O1
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2008)
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
GX_OPTION = -EHsc
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
CC_OPT/HIGHEST = -O2
|
||||
CC_OPT/HIGHER = -O1
|
||||
CC_OPT/LOWER = -O1
|
||||
else
|
||||
CC_OPT/HIGHEST = -O2
|
||||
CC_OPT/HIGHER = -O1
|
||||
CC_OPT/LOWER = -O1
|
||||
endif
|
||||
endif
|
||||
|
||||
else # CC_VERSION
|
||||
|
||||
# GCC not supported, but left for historical reference...
|
||||
CC_OPT/NONE =
|
||||
CC_OPT/LOWER = -O2
|
||||
@ -200,10 +226,13 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
|
||||
# -MTd Use static debug version (better than -MDd, no runtime issues)
|
||||
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
|
||||
#
|
||||
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcp71.dll
|
||||
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
|
||||
#
|
||||
# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
|
||||
ifeq ($(MS_RUNTIME_STATIC),true)
|
||||
MS_RUNTIME_OPTION=-MT
|
||||
ifeq ($(COMPILER_VERSION), VS2003)
|
||||
MS_RUNTIME_OPTION=-MT
|
||||
endif
|
||||
else
|
||||
MS_RUNTIME_OPTION=-MD
|
||||
endif
|
||||
@ -238,7 +267,7 @@ ifeq ($(CC_VERSION),msvc)
|
||||
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
|
||||
# -nologo Don't print out startup message
|
||||
# /D _STATIC_CPPLIB
|
||||
# Use static link for the C++ runtime (so msvcp71.dll not needed)
|
||||
# Use static link for the C++ runtime (so msvcpnn.dll not needed)
|
||||
#
|
||||
CFLAGS_COMMON += -Zi -nologo
|
||||
CFLAGS_OPT = $(CC_OPT)
|
||||
@ -277,8 +306,16 @@ ifeq ($(CC_VERSION),msvc)
|
||||
# Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
|
||||
LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
|
||||
|
||||
# VS2008 has bufferoverflow baked in:
|
||||
LFLAGS_VS2008 =
|
||||
|
||||
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
|
||||
BASELFLAGS = -nologo /opt:REF /incremental:no
|
||||
ifdef MT
|
||||
# VS2005, VS2008, and beyond: ask LINK to generate manifests for .dll & .exe
|
||||
BASELFLAGS += /manifest
|
||||
endif
|
||||
|
||||
LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
|
||||
LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
|
||||
|
||||
|
@ -179,6 +179,9 @@ else # LIBRARY
|
||||
# build it into $(OBJDIR) so that the other generated files get put
|
||||
# there, then copy just the DLL (and MAP file) to the requested directory.
|
||||
#
|
||||
# In VS2005 or VS2008 the link command creates a .manifest file that we want
|
||||
# to insert into the linked artifact so we do not need to track it separately.
|
||||
# Use ";#2" for .dll and ";#1" for .exe in the MT command below:
|
||||
$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
|
||||
@$(prep-target)
|
||||
@$(MKDIR) -p $(OBJDIR)
|
||||
@ -186,6 +189,9 @@ $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
|
||||
-map:$(OBJDIR)/$(LIBRARY).map \
|
||||
$(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \
|
||||
$(OTHER_LCF) $(JAVALIB) $(LDLIBS)
|
||||
ifdef MT
|
||||
$(MT) /manifest $(OBJDIR)/$(@F).manifest /outputresource:$(OBJDIR)/$(@F);#2
|
||||
endif
|
||||
$(CP) $(OBJDIR)/$(@F) $@
|
||||
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
|
||||
$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
|
||||
|
@ -153,6 +153,9 @@ else
|
||||
STACK_SIZE=1048576
|
||||
endif
|
||||
|
||||
# In VS2005 or VS2008 the link command creates a .manifest file that we want
|
||||
# to insert into the linked artifact so we do not need to track it separately.
|
||||
# Use ";#2" for .dll and ";#1" for .exe in the MT command below:
|
||||
$(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF)
|
||||
@$(prep-target)
|
||||
@set -- $?; \
|
||||
@ -160,6 +163,9 @@ $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LC
|
||||
$(LINK) -out:$@ /STACK:$(STACK_SIZE) \
|
||||
-map:$(OBJDIR)/$(PROGRAM).map $(LFLAGS) $(LDFLAGS) \
|
||||
@$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
|
||||
ifdef MT
|
||||
$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
|
||||
endif
|
||||
|
||||
else # PLATFORM
|
||||
|
||||
|
@ -54,17 +54,10 @@ ifeq ($(PLATFORM), windows)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
|
||||
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
|
||||
REQUIRED_CC_VER = 13.10.3077
|
||||
REQUIRED_LINK_VER = 7.10.3077
|
||||
ifeq ($(CC_MAJORVER), 12)
|
||||
# This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447
|
||||
COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3
|
||||
COMPILER_VERSION=VC6
|
||||
REBASE = $(COMPILER_PATH)rebase
|
||||
MTL = $(COMPILER_PATH)midl
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 13)
|
||||
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
|
||||
REQUIRED_CC_VER = 13.10.3077
|
||||
REQUIRED_LINK_VER = 7.10.3077
|
||||
COMPILER_NAME=Visual Studio .NET 2003 Professional C++
|
||||
COMPILER_VERSION=VS2003
|
||||
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
|
||||
@ -74,17 +67,34 @@ ifeq ($(PLATFORM), windows)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 14)
|
||||
# This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000
|
||||
# NOTE: This compiler has not been tried yet on 32bit systems
|
||||
COMPILER_NAME=Visual Studio .NET 2005
|
||||
# This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42
|
||||
REQUIRED_CC_VER = 14.00.50727.42
|
||||
REQUIRED_LINK_VER = 8.00.50727.42
|
||||
COMPILER_NAME=Visual Studio 8
|
||||
COMPILER_VERSION=VS2005
|
||||
REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
|
||||
MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
|
||||
MT = $(MSDEVTOOLS_PATH)mt
|
||||
ifndef COMPILER_PATH
|
||||
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 15)
|
||||
# This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08
|
||||
REQUIRED_CC_VER = 15.00.21022.08
|
||||
REQUIRED_LINK_VER = 9.00.21022.08
|
||||
COMPILER_NAME=Visual Studio 9
|
||||
COMPILER_VERSION=VS2008
|
||||
#rebase and midl moved out of Visual Studio into the SDK:
|
||||
REBASE = $(MSDEVTOOLS_PATH)/rebase
|
||||
MTL = $(MSDEVTOOLS_PATH)/midl.exe
|
||||
MT = $(MSDEVTOOLS_PATH)mt
|
||||
ifndef COMPILER_PATH
|
||||
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
# else ARCH_DATA_MODEL is 64
|
||||
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
|
||||
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
|
||||
CC_MINORVER :=$(call MinorVersion,$(CC_VER))
|
||||
|
@ -74,7 +74,7 @@ override INCREMENTAL_BUILD = false
|
||||
# The ALT values should never really have spaces or use \.
|
||||
# Suspect these environment variables to have spaces and/or \ characters:
|
||||
# SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
|
||||
# DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VC71COMNTOOLS,
|
||||
# DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS,
|
||||
# MSVCDIR, MSVCDir.
|
||||
# So use $(subst \,/,) on them first adding quotes and placing them in
|
||||
# their own variable assigned with :=, then use FullPath.
|
||||
@ -247,22 +247,36 @@ ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir))
|
||||
_msvc_dir :=
|
||||
endif
|
||||
# If we still don't have it, look for VS71COMNTOOLS, setup by installer?
|
||||
# If we still don't have it, look for VSnnCOMNTOOLS (newest first),
|
||||
# set by installer?
|
||||
ifeq ($(_msvc_dir),)
|
||||
ifdef VS90COMNTOOLS # /Common/Tools directory, use ../../Vc
|
||||
xVS90COMNTOOLS :="$(subst \,/,$(VS90COMNTOOLS))"
|
||||
_vs90tools :=$(call FullPath,$(xVS90COMNTOOLS))
|
||||
endif
|
||||
ifneq ($(_vs90tools),)
|
||||
_msvc_dir :=$(_vs90tools)/../../Vc
|
||||
_redist_sdk :=$(_msvc_dir)/../SDK/v3.5/Bin
|
||||
endif
|
||||
ifdef VS80COMNTOOLS # /Common/Tools directory, use ../../Vc
|
||||
xVS80COMNTOOLS :="$(subst \,/,$(VS80COMNTOOLS))"
|
||||
_vs80tools :=$(call FullPath,$(xVS80COMNTOOLS))
|
||||
endif
|
||||
ifneq ($(_vs80tools),)
|
||||
_msvc_dir :=$(_vs80tools)/../../Vc
|
||||
_redist_sdk :=$(_msvc_dir)/../SDK/v2.0/Bin
|
||||
endif
|
||||
ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
|
||||
xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
|
||||
_vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
|
||||
endif
|
||||
ifneq ($(_vs71tools),)
|
||||
_msvc_dir :=$(_vs71tools)/../../Vc7
|
||||
_redist_sdk :=$(_vs71tools)/../..
|
||||
endif
|
||||
endif
|
||||
ifneq ($(_msvc_dir),)
|
||||
_compiler_bin :=$(_msvc_dir)/Bin
|
||||
_redist_sdk :=$(_msvc_dir)/../SDK/v1.1/Bin
|
||||
_ms_sdk :=$(_msvc_dir)/PlatformSDK
|
||||
endif
|
||||
endif
|
||||
@ -410,8 +424,8 @@ _REDIST_SDK_EXISTS := $(shell \
|
||||
else \
|
||||
echo "false"; \
|
||||
fi)
|
||||
_REDIST71_SDK_EXISTS := $(shell \
|
||||
if [ -f "$(_redist_sdk)/msvcr71.dll" ]; then \
|
||||
_REDISTNN_SDK_EXISTS := $(shell \
|
||||
if [ -f "$(_redist_sdk)/$(MSVCRNN_DLL)" ]; then \
|
||||
echo "true"; \
|
||||
else \
|
||||
echo "false"; \
|
||||
@ -435,20 +449,20 @@ ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH)
|
||||
MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH)
|
||||
|
||||
# MSVCR71_DLL_PATH: location of msvcr71.dll that will be re-distributed
|
||||
ifdef ALT_MSVCR71_DLL_PATH
|
||||
xALT_MSVCR71_DLL_PATH :="$(subst \,/,$(ALT_MSVCR71_DLL_PATH))"
|
||||
MSVCR71_DLL_PATH :=$(call FullPath,$(xALT_MSVCR71_DLL_PATH))
|
||||
# MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed
|
||||
ifdef ALT_MSVCRNN_DLL_PATH
|
||||
xALT_MSVCRNN_DLL_PATH :="$(subst \,/,$(ALT_MSVCRNN_DLL_PATH))"
|
||||
MSVCRNN_DLL_PATH :=$(call FullPath,$(xALT_MSVCRNN_DLL_PATH))
|
||||
else
|
||||
ifeq ($(_REDIST71_SDK_EXISTS), true)
|
||||
xREDIST71_DIR :=$(_redist_sdk)
|
||||
ifeq ($(_REDISTNN_SDK_EXISTS), true)
|
||||
xREDISTNN_DIR :=$(_redist_sdk)
|
||||
else
|
||||
xREDIST71_DIR :=$(_system_root)/system32
|
||||
xREDISTNN_DIR :=$(_system_root)/system32
|
||||
endif
|
||||
MSVCR71_DLL_PATH :=$(call FullPath,$(xREDIST71_DIR))
|
||||
MSVCRNN_DLL_PATH :=$(call FullPath,$(xREDISTNN_DIR))
|
||||
endif
|
||||
MSVCR71_DLL_PATH :=$(call AltCheckSpaces,MSVCR71_DLL_PATH)
|
||||
MSVCR71_DLL_PATH:=$(call AltCheckValue,MSVCR71_DLL_PATH)
|
||||
MSVCRNN_DLL_PATH :=$(call AltCheckSpaces,MSVCRNN_DLL_PATH)
|
||||
MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH)
|
||||
|
||||
else
|
||||
|
||||
|
@ -98,7 +98,7 @@ endif
|
||||
ifeq ($(PLATFORM),windows)
|
||||
ALL_SETTINGS+=$(call addAltSetting,MSVCRT_DLL_PATH)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
ALL_SETTINGS+=$(call addAltSetting,MSVCR71_DLL_PATH)
|
||||
ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH)
|
||||
endif
|
||||
ALL_SETTINGS+=$(call addAltSetting,MSDEVTOOLS_PATH)
|
||||
endif
|
||||
|
@ -835,15 +835,13 @@ ifeq ($(PLATFORM), windows)
|
||||
"" >> $(ERROR_FILE) ; \
|
||||
fi
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
ifeq ($(COMPILER_VERSION), VS2003)
|
||||
@if [ ! -r "$(MSVCR71_DLL_PATH)/msvcr71.dll" ]; then \
|
||||
$(ECHO) "ERROR: You do not have access to msvcr71.dll. \n" \
|
||||
@if [ ! -r "$(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)" ]; then \
|
||||
$(ECHO) "ERROR: You do not have access to $(MSVCRNN_DLL). \n" \
|
||||
" Please check your access to \n" \
|
||||
" $(MSVCR71_DLL_PATH) \n" \
|
||||
" and/or check your value of ALT_MSVCR71_DLL_PATH. \n" \
|
||||
" $(MSVCRNN_DLL_PATH) \n" \
|
||||
" and/or check your value of ALT_MSVCRNN_DLL_PATH. \n" \
|
||||
"" >> $(ERROR_FILE) ; \
|
||||
fi
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -64,7 +64,7 @@ CORE_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
|
||||
-bottom $(JAVADOCBOTTOM_SWITCH) \
|
||||
$(OVERVIEW_OPTION)
|
||||
|
||||
DRAFT = '<br><b>DRAFT '$(MILESTONE)-$(BUILD_NUMBER)'</b>'
|
||||
DRAFT = '<br><strong>DRAFT '$(MILESTONE)-$(BUILD_NUMBER)'</strong>'
|
||||
THIS_YEAR := $(shell $(DATE) | $(SED) -e 's/ / /g' | $(CUT) -d' ' -f6)
|
||||
TRADEMARK = &\#x2122;
|
||||
|
||||
@ -95,7 +95,7 @@ endif
|
||||
|
||||
JAVADOCTITLE = 'Java$(TRADEMARK) Platform, Standard Edition $(JDK_MINOR_VERSION)<br>API Specification'
|
||||
JAVADOCWINDOWTITLE = 'Java Platform SE $(JDK_MINOR_VERSION)'
|
||||
JAVADOCHEADER = '<b>Java$(TRADEMARK) Platform<br>Standard Ed. $(JDK_MINOR_VERSION)</b>'
|
||||
JAVADOCHEADER = '<strong>Java$(TRADEMARK) Platform<br>Standard Ed. $(JDK_MINOR_VERSION)</strong>'
|
||||
JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="{@docroot}/../../webnotes/devdocs-vs-specs.html">Java SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to <a href="{@docroot}/../legal/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font>'
|
||||
JAVADOCOVERVIEW = $(SHARE_SRC)/classes/overview-core.html
|
||||
|
||||
@ -120,7 +120,7 @@ DOMAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
|
||||
-group $(DOMAPI_GROUPNAME) $(DOMAPI_REGEXP)
|
||||
DOMAPI_JAVADOCTITLE = 'Common DOM API'
|
||||
DOMAPI_JAVADOCWINDOWTITLE = 'Common DOM API'
|
||||
DOMAPI_JAVADOCHEADER = '<b>Common DOM API</b>'
|
||||
DOMAPI_JAVADOCHEADER = '<strong>Common DOM API</strong>'
|
||||
DOMAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. 4150 Network Circle<br>Santa Clara, California, 95054, U.S.A. All Rights Reserved.</font>'
|
||||
DOMAPI_GROUPNAME = "Packages"
|
||||
DOMAPI_REGEXP = "com.sun.java.browser.dom:org.w3c.dom*"
|
||||
@ -140,7 +140,7 @@ MIRROR_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
|
||||
-overview $(MIRROR_OVERVIEW)
|
||||
MIRROR_JAVADOCTITLE = 'Mirror API'
|
||||
MIRROR_JAVADOCWINDOWTITLE = 'Mirror API'
|
||||
MIRROR_JAVADOCHEADER = '<b>Mirror API</b>'
|
||||
MIRROR_JAVADOCHEADER = '<strong>Mirror API</strong>'
|
||||
MIRROR_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Report a bug or request a feature.</a><br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.</font>'
|
||||
MIRROR_GROUPNAME = "Packages"
|
||||
MIRROR_OVERVIEW = $(IMPORTSRCDIR)/com/sun/mirror/overview.html
|
||||
@ -163,7 +163,7 @@ DOCLETAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
|
||||
-group $(DOCLETAPI_GROUPNAME) $(DOCLETAPI_REGEXP)
|
||||
DOCLETAPI_JAVADOCTITLE = 'Doclet API'
|
||||
DOCLETAPI_JAVADOCWINDOWTITLE = 'Doclet API'
|
||||
DOCLETAPI_JAVADOCHEADER = '<b>Doclet API</b>'
|
||||
DOCLETAPI_JAVADOCHEADER = '<strong>Doclet API</strong>'
|
||||
DOCLETAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-$(THIS_YEAR) Sun Microsystems, Inc. 4150 Network Circle<br>Santa Clara, California, 95054, U.S.A. All Rights Reserved.</font>'
|
||||
DOCLETAPI_GROUPNAME = "Packages"
|
||||
DOCLETAPI_REGEXP = "com.sun.javadoc"
|
||||
@ -407,7 +407,7 @@ TREEAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
|
||||
#
|
||||
TREEAPI_JAVADOCTITLE = 'Compiler Tree API'
|
||||
TREEAPI_JAVADOCWINDOWTITLE = 'Compiler Tree API'
|
||||
TREEAPI_JAVADOCHEADER = '<b>Compiler Tree API</b>'
|
||||
TREEAPI_JAVADOCHEADER = '<strong>Compiler Tree API</strong>'
|
||||
TREEAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Report a bug or request a feature.</a><br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.</font>'
|
||||
TREEAPI_GROUPNAME = "Packages"
|
||||
TREEAPI_OVERVIEW = $(SHARE_SRC)/classes/com/sun/source/overview.html
|
||||
|
@ -28,11 +28,10 @@ PROGRAM = java
|
||||
PRODUCT = java
|
||||
|
||||
#
|
||||
# Statically link java to avoid the dependency on msvcr71.dll. This
|
||||
# Statically link java to avoid the dependency on msvcrNN.dll. This
|
||||
# must be set before Defs.gmk is included.
|
||||
#
|
||||
MS_RUNTIME_STATIC = true
|
||||
|
||||
#
|
||||
# Statically link java to avoid the dependency on jli.dll. This
|
||||
# must be set before Program.gmk is included.
|
||||
@ -44,6 +43,7 @@ include $(BUILDDIR)/common/Defs.gmk
|
||||
# Override the default version info with our own resource file (see 5106536)
|
||||
ifeq ($(PLATFORM), windows)
|
||||
LDLIBS_COMMON += user32.lib comctl32.lib
|
||||
|
||||
ifdef OPENJDK
|
||||
RC_FLAGS += -i "$(PLATFORM_SRC)/resource/icons"
|
||||
else
|
||||
|
@ -32,11 +32,10 @@ PROGRAM = javaw
|
||||
PRODUCT = java
|
||||
|
||||
#
|
||||
# Statically link javaw to avoid the dependency on msvcr71.dll. This
|
||||
# Statically link javaw to avoid the dependency on msvcrNN.dll. This
|
||||
# must be set before Defs.gmk is included.
|
||||
#
|
||||
MS_RUNTIME_STATIC = true
|
||||
|
||||
#
|
||||
# Statically link javaw to avoid the dependency on jli.dll. This
|
||||
# must be set before Program.gmk is included.
|
||||
|
@ -109,7 +109,7 @@ IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
|
||||
$(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
|
||||
$(install-import-file)
|
||||
$(CHMOD) a+x $@
|
||||
$(BINDIR)/msvcr71.dll: $(MSVCR71_DLL_PATH)/msvcr71.dll
|
||||
$(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
|
||||
$(install-import-file)
|
||||
$(CHMOD) a+x $@
|
||||
|
||||
|
@ -32,6 +32,43 @@
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER > 1400
|
||||
|
||||
/*
|
||||
* When building for Microsoft Windows, main has a dependency on msvcr??.dll.
|
||||
*
|
||||
* When using Visual Studio 2005 or later, that must be recorded in
|
||||
* the [java,javaw].exe.manifest file.
|
||||
*
|
||||
* Reference:
|
||||
* C:/Program Files/Microsoft SDKs/Windows/v6.1/include/crtdefs.h
|
||||
*/
|
||||
#include <crtassem.h>
|
||||
#ifdef _M_IX86
|
||||
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
|
||||
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
|
||||
"version='" _CRT_ASSEMBLY_VERSION "' " \
|
||||
"processorArchitecture='x86' " \
|
||||
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
|
||||
|
||||
#endif /* _M_IX86 */
|
||||
|
||||
//This may not be necessary yet for the Windows 64-bit build, but it
|
||||
//will be when that build environment is updated. Need to test to see
|
||||
//if it is harmless:
|
||||
#ifdef _M_AMD64
|
||||
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
|
||||
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
|
||||
"version='" _CRT_ASSEMBLY_VERSION "' " \
|
||||
"processorArchitecture='amd64' " \
|
||||
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
|
||||
|
||||
#endif /* _M_AMD64 */
|
||||
#endif /* _MSC_VER > 1400 */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/*
|
||||
* Entry point.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1996-2008 Sun Microsystems, Inc. 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
|
||||
@ -486,4 +486,21 @@ final class CipherBox {
|
||||
|
||||
return newlen;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dispose of any intermediate state in the underlying cipher.
|
||||
* For PKCS11 ciphers, this will release any attached sessions, and
|
||||
* thus make finalization faster.
|
||||
*/
|
||||
void dispose() {
|
||||
try {
|
||||
if (cipher != null) {
|
||||
// ignore return value.
|
||||
cipher.doFinal();
|
||||
}
|
||||
} catch (GeneralSecurityException e) {
|
||||
// swallow for now.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2003-2008 Sun Microsystems, Inc. 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
|
||||
@ -547,6 +547,8 @@ final public class SSLEngineImpl extends SSLEngine {
|
||||
|
||||
// ... create decompressor
|
||||
|
||||
CipherBox oldCipher = readCipher;
|
||||
|
||||
try {
|
||||
readCipher = handshaker.newReadCipher();
|
||||
readMAC = handshaker.newReadMAC();
|
||||
@ -555,6 +557,16 @@ final public class SSLEngineImpl extends SSLEngine {
|
||||
throw (SSLException)new SSLException
|
||||
("Algorithm missing: ").initCause(e);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dispose of any intermediate state in the underlying cipher.
|
||||
* For PKCS11 ciphers, this will release any attached sessions,
|
||||
* and thus make finalization faster.
|
||||
*
|
||||
* Since MAC's doFinal() is called for every SSL/TLS packet, it's
|
||||
* not necessary to do the same with MAC's.
|
||||
*/
|
||||
oldCipher.dispose();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -572,6 +584,8 @@ final public class SSLEngineImpl extends SSLEngine {
|
||||
|
||||
// ... create compressor
|
||||
|
||||
CipherBox oldCipher = writeCipher;
|
||||
|
||||
try {
|
||||
writeCipher = handshaker.newWriteCipher();
|
||||
writeMAC = handshaker.newWriteMAC();
|
||||
@ -580,6 +594,9 @@ final public class SSLEngineImpl extends SSLEngine {
|
||||
throw (SSLException)new SSLException
|
||||
("Algorithm missing: ").initCause(e);
|
||||
}
|
||||
|
||||
// See comment above.
|
||||
oldCipher.dispose();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1231,6 +1248,9 @@ final public class SSLEngineImpl extends SSLEngine {
|
||||
break;
|
||||
}
|
||||
|
||||
// See comment in changeReadCiphers()
|
||||
writeCipher.dispose();
|
||||
|
||||
connectionState = cs_CLOSED;
|
||||
}
|
||||
|
||||
@ -1271,6 +1291,10 @@ final public class SSLEngineImpl extends SSLEngine {
|
||||
|
||||
closeOutboundInternal();
|
||||
inboundDone = true;
|
||||
|
||||
// See comment in changeReadCiphers()
|
||||
readCipher.dispose();
|
||||
|
||||
connectionState = cs_CLOSED;
|
||||
}
|
||||
|
||||
@ -1457,6 +1481,10 @@ final public class SSLEngineImpl extends SSLEngine {
|
||||
|
||||
connectionState = cs_CLOSED;
|
||||
|
||||
// See comment in changeReadCiphers()
|
||||
readCipher.dispose();
|
||||
writeCipher.dispose();
|
||||
|
||||
if (cause instanceof RuntimeException) {
|
||||
throw (RuntimeException)cause;
|
||||
} else {
|
||||
|
@ -1427,6 +1427,10 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
waitForClose(false);
|
||||
}
|
||||
|
||||
// See comment in changeReadCiphers()
|
||||
readCipher.dispose();
|
||||
writeCipher.dispose();
|
||||
|
||||
// state will be set to cs_CLOSED in the finally block below
|
||||
|
||||
break;
|
||||
@ -1633,6 +1637,11 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
* Clean up our side.
|
||||
*/
|
||||
closeSocket();
|
||||
|
||||
// See comment in changeReadCiphers()
|
||||
readCipher.dispose();
|
||||
writeCipher.dispose();
|
||||
|
||||
connectionState = (oldState == cs_APP_CLOSED) ? cs_APP_CLOSED
|
||||
: cs_CLOSED;
|
||||
throw closeReason;
|
||||
@ -1763,6 +1772,8 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
|
||||
// ... create decompressor
|
||||
|
||||
CipherBox oldCipher = readCipher;
|
||||
|
||||
try {
|
||||
readCipher = handshaker.newReadCipher();
|
||||
readMAC = handshaker.newReadMAC();
|
||||
@ -1771,6 +1782,16 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
throw (SSLException)new SSLException
|
||||
("Algorithm missing: ").initCause(e);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dispose of any intermediate state in the underlying cipher.
|
||||
* For PKCS11 ciphers, this will release any attached sessions,
|
||||
* and thus make finalization faster.
|
||||
*
|
||||
* Since MAC's doFinal() is called for every SSL/TLS packet, it's
|
||||
* not necessary to do the same with MAC's.
|
||||
*/
|
||||
oldCipher.dispose();
|
||||
}
|
||||
|
||||
// used by Handshaker
|
||||
@ -1783,6 +1804,8 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
|
||||
// ... create compressor
|
||||
|
||||
CipherBox oldCipher = writeCipher;
|
||||
|
||||
try {
|
||||
writeCipher = handshaker.newWriteCipher();
|
||||
writeMAC = handshaker.newWriteMAC();
|
||||
@ -1791,6 +1814,9 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
throw (SSLException)new SSLException
|
||||
("Algorithm missing: ").initCause(e);
|
||||
}
|
||||
|
||||
// See comment above.
|
||||
oldCipher.dispose();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -46,9 +46,18 @@ class Main {
|
||||
String zname = "";
|
||||
String[] files;
|
||||
String rootjar = null;
|
||||
Hashtable filesTable = new Hashtable();
|
||||
Vector paths = new Vector();
|
||||
Vector v;
|
||||
|
||||
// An entryName(path)->File map generated during "expand", it helps to
|
||||
// decide whether or not an existing entry in a jar file needs to be
|
||||
// replaced, during the "update" operation.
|
||||
Map<String, File> entryMap = new HashMap<String, File>();
|
||||
|
||||
// All files need to be added/updated.
|
||||
Set<File> entries = new LinkedHashSet<File>();
|
||||
|
||||
// Directories specified by "-C" operation.
|
||||
List<String> paths = new ArrayList<String>();
|
||||
|
||||
CRC32 crc32 = new CRC32();
|
||||
/*
|
||||
* cflag: create
|
||||
@ -175,7 +184,8 @@ class Main {
|
||||
vflag = false;
|
||||
}
|
||||
}
|
||||
create(new BufferedOutputStream(out), expand(files), manifest);
|
||||
expand(null, files, false);
|
||||
create(new BufferedOutputStream(out, 4096), manifest);
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
@ -198,8 +208,8 @@ class Main {
|
||||
}
|
||||
InputStream manifest = (!Mflag && (mname != null)) ?
|
||||
(new FileInputStream(mname)) : null;
|
||||
expand(files);
|
||||
boolean updateOk = update(in, new BufferedOutputStream(out), manifest);
|
||||
expand(null, files, true);
|
||||
boolean updateOk = update(in, new BufferedOutputStream(out), manifest, null);
|
||||
if (ok) {
|
||||
ok = updateOk;
|
||||
}
|
||||
@ -354,7 +364,7 @@ class Main {
|
||||
while (dir.indexOf("//") > -1) {
|
||||
dir = dir.replace("//", "/");
|
||||
}
|
||||
paths.addElement(dir.replace(File.separatorChar, '/'));
|
||||
paths.add(dir.replace(File.separatorChar, '/'));
|
||||
nameBuf[k++] = dir + args[++i];
|
||||
} else {
|
||||
nameBuf[k++] = args[i];
|
||||
@ -387,17 +397,7 @@ class Main {
|
||||
* Expands list of files to process into full list of all files that
|
||||
* can be found by recursively descending directories.
|
||||
*/
|
||||
String[] expand(String[] files) {
|
||||
v = new Vector();
|
||||
expand(null, files, v, filesTable);
|
||||
files = new String[v.size()];
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
files[i] = ((File)v.elementAt(i)).getPath();
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
void expand(File dir, String[] files, Vector v, Hashtable t) {
|
||||
void expand(File dir, String[] files, boolean isUpdate) {
|
||||
if (files == null) {
|
||||
return;
|
||||
}
|
||||
@ -409,17 +409,20 @@ class Main {
|
||||
f = new File(dir, files[i]);
|
||||
}
|
||||
if (f.isFile()) {
|
||||
if (!t.contains(f)) {
|
||||
t.put(entryName(f.getPath()), f);
|
||||
v.addElement(f);
|
||||
if (entries.add(f)) {
|
||||
if (isUpdate)
|
||||
entryMap.put(entryName(f.getPath()), f);
|
||||
}
|
||||
} else if (f.isDirectory()) {
|
||||
String dirPath = f.getPath();
|
||||
dirPath = (dirPath.endsWith(File.separator)) ? dirPath :
|
||||
(dirPath + File.separator);
|
||||
t.put(entryName(dirPath), f);
|
||||
v.addElement(f);
|
||||
expand(f, f.list(), v, t);
|
||||
if (entries.add(f)) {
|
||||
if (isUpdate) {
|
||||
String dirPath = f.getPath();
|
||||
dirPath = (dirPath.endsWith(File.separator)) ? dirPath :
|
||||
(dirPath + File.separator);
|
||||
entryMap.put(entryName(dirPath), f);
|
||||
}
|
||||
expand(f, f.list(), isUpdate);
|
||||
}
|
||||
} else {
|
||||
error(formatMsg("error.nosuch.fileordir", String.valueOf(f)));
|
||||
ok = false;
|
||||
@ -430,7 +433,7 @@ class Main {
|
||||
/*
|
||||
* Creates a new JAR file.
|
||||
*/
|
||||
void create(OutputStream out, String[] files, Manifest manifest)
|
||||
void create(OutputStream out, Manifest manifest)
|
||||
throws IOException
|
||||
{
|
||||
ZipOutputStream zos = new JarOutputStream(out);
|
||||
@ -455,8 +458,8 @@ class Main {
|
||||
manifest.write(zos);
|
||||
zos.closeEntry();
|
||||
}
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
addFile(zos, new File(files[i]));
|
||||
for (File file: entries) {
|
||||
addFile(zos, file);
|
||||
}
|
||||
zos.close();
|
||||
}
|
||||
@ -465,10 +468,9 @@ class Main {
|
||||
* update an existing jar file.
|
||||
*/
|
||||
boolean update(InputStream in, OutputStream out,
|
||||
InputStream newManifest) throws IOException
|
||||
InputStream newManifest,
|
||||
JarIndex jarIndex) throws IOException
|
||||
{
|
||||
Hashtable t = filesTable;
|
||||
Vector v = this.v;
|
||||
ZipInputStream zis = new ZipInputStream(in);
|
||||
ZipOutputStream zos = new JarOutputStream(out);
|
||||
ZipEntry e = null;
|
||||
@ -477,8 +479,8 @@ class Main {
|
||||
int n = 0;
|
||||
boolean updateOk = true;
|
||||
|
||||
if (t.containsKey(INDEX)) {
|
||||
addIndex((JarIndex)t.get(INDEX), zos);
|
||||
if (jarIndex != null) {
|
||||
addIndex(jarIndex, zos);
|
||||
}
|
||||
|
||||
// put the old entries first, replace if necessary
|
||||
@ -488,9 +490,8 @@ class Main {
|
||||
boolean isManifestEntry = name.toUpperCase(
|
||||
java.util.Locale.ENGLISH).
|
||||
equals(MANIFEST);
|
||||
if ((name.toUpperCase().equals(INDEX)
|
||||
&& t.containsKey(INDEX))
|
||||
|| (Mflag && isManifestEntry)) {
|
||||
if ((name.toUpperCase().equals(INDEX) && jarIndex != null)
|
||||
|| (Mflag && isManifestEntry)) {
|
||||
continue;
|
||||
} else if (isManifestEntry && ((newManifest != null) ||
|
||||
(ename != null))) {
|
||||
@ -514,8 +515,7 @@ class Main {
|
||||
}
|
||||
updateManifest(old, zos);
|
||||
} else {
|
||||
if (!t.containsKey(name)) { // copy the old stuff
|
||||
|
||||
if (!entryMap.containsKey(name)) { // copy the old stuff
|
||||
// do our own compression
|
||||
ZipEntry e2 = new ZipEntry(name);
|
||||
e2.setMethod(e.getMethod());
|
||||
@ -531,21 +531,17 @@ class Main {
|
||||
zos.write(buf, 0, n);
|
||||
}
|
||||
} else { // replace with the new files
|
||||
addFile(zos, (File)(t.get(name)));
|
||||
t.remove(name);
|
||||
File f = entryMap.get(name);
|
||||
addFile(zos, f);
|
||||
entryMap.remove(name);
|
||||
entries.remove(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
t.remove(INDEX);
|
||||
|
||||
// add the remaining new files
|
||||
if (!t.isEmpty()) {
|
||||
for (int i = 0; i < v.size(); i++) {
|
||||
File f = (File)v.elementAt(i);
|
||||
if (t.containsValue(f)) {
|
||||
addFile(zos, f);
|
||||
}
|
||||
}
|
||||
for (File f: entries) {
|
||||
addFile(zos, f);
|
||||
}
|
||||
if (!foundManifest) {
|
||||
if (newManifest != null) {
|
||||
@ -611,8 +607,7 @@ class Main {
|
||||
private String entryName(String name) {
|
||||
name = name.replace(File.separatorChar, '/');
|
||||
String matchPath = "";
|
||||
for (int i = 0; i < paths.size(); i++) {
|
||||
String path = (String)paths.elementAt(i);
|
||||
for (String path : paths) {
|
||||
if (name.startsWith(path) && (path.length() > matchPath.length())) {
|
||||
matchPath = path;
|
||||
}
|
||||
@ -669,7 +664,6 @@ class Main {
|
||||
void addFile(ZipOutputStream zos, File file) throws IOException {
|
||||
String name = file.getPath();
|
||||
boolean isDir = file.isDirectory();
|
||||
|
||||
if (isDir) {
|
||||
name = name.endsWith(File.separator) ? name :
|
||||
(name + File.separator);
|
||||
@ -704,7 +698,7 @@ class Main {
|
||||
}
|
||||
zos.putNextEntry(e);
|
||||
if (!isDir) {
|
||||
byte[] buf = new byte[1024];
|
||||
byte[] buf = new byte[8192];
|
||||
int len;
|
||||
InputStream is = new BufferedInputStream(new FileInputStream(file));
|
||||
while ((len = is.read(buf, 0, buf.length)) != -1) {
|
||||
@ -749,7 +743,7 @@ class Main {
|
||||
*/
|
||||
private void crc32File(ZipEntry e, File f) throws IOException {
|
||||
InputStream is = new BufferedInputStream(new FileInputStream(f));
|
||||
byte[] buf = new byte[1024];
|
||||
byte[] buf = new byte[8192];
|
||||
crc32.reset();
|
||||
int r = 0;
|
||||
int nread = 0;
|
||||
@ -772,7 +766,7 @@ class Main {
|
||||
void extract(InputStream in, String files[]) throws IOException {
|
||||
ZipInputStream zis = new ZipInputStream(in);
|
||||
ZipEntry e;
|
||||
// Set of all directory entries specified in archive. Dissallows
|
||||
// Set of all directory entries specified in archive. Disallows
|
||||
// null entries. Disallows all entries if using pre-6.0 behavior.
|
||||
Set<ZipEntry> dirs = new HashSet<ZipEntry>() {
|
||||
public boolean add(ZipEntry e) {
|
||||
@ -897,17 +891,16 @@ class Main {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Output the class index table to the INDEX.LIST file of the
|
||||
* root jar file.
|
||||
*/
|
||||
void dumpIndex(String rootjar, JarIndex index) throws IOException {
|
||||
filesTable.put(INDEX, index);
|
||||
File scratchFile = File.createTempFile("scratch", null, new File("."));
|
||||
File jarFile = new File(rootjar);
|
||||
boolean updateOk = update(new FileInputStream(jarFile),
|
||||
new FileOutputStream(scratchFile), null);
|
||||
new FileOutputStream(scratchFile),
|
||||
null, index);
|
||||
jarFile.delete();
|
||||
if (!scratchFile.renameTo(jarFile)) {
|
||||
scratchFile.delete();
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "jni.h"
|
||||
#include "jni_util.h"
|
||||
@ -34,9 +35,9 @@
|
||||
|
||||
/* IO helper functions */
|
||||
|
||||
int
|
||||
jint
|
||||
readSingle(JNIEnv *env, jobject this, jfieldID fid) {
|
||||
int nread;
|
||||
jint nread;
|
||||
char ret;
|
||||
FD fd = GET_FD(this, fid);
|
||||
if (fd == -1) {
|
||||
@ -49,7 +50,7 @@ readSingle(JNIEnv *env, jobject this, jfieldID fid) {
|
||||
} else if (nread == JVM_IO_ERR) { /* error */
|
||||
JNU_ThrowIOExceptionWithLastError(env, "Read error");
|
||||
} else if (nread == JVM_IO_INTR) {
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0);
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
|
||||
}
|
||||
return ret & 0xFF;
|
||||
}
|
||||
@ -58,25 +59,35 @@ readSingle(JNIEnv *env, jobject this, jfieldID fid) {
|
||||
*/
|
||||
#define BUF_SIZE 8192
|
||||
|
||||
/*
|
||||
* Returns true if the array slice defined by the given offset and length
|
||||
* is out of bounds.
|
||||
*/
|
||||
static int
|
||||
outOfBounds(JNIEnv *env, jint off, jint len, jbyteArray array) {
|
||||
return ((off < 0) ||
|
||||
(len < 0) ||
|
||||
// We are very careful to avoid signed integer overflow,
|
||||
// the result of which is undefined in C.
|
||||
((*env)->GetArrayLength(env, array) - off < len));
|
||||
}
|
||||
|
||||
int
|
||||
jint
|
||||
readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
|
||||
jint off, jint len, jfieldID fid)
|
||||
{
|
||||
int nread, datalen;
|
||||
jint nread;
|
||||
char stackBuf[BUF_SIZE];
|
||||
char *buf = 0;
|
||||
char *buf = NULL;
|
||||
FD fd;
|
||||
|
||||
if (IS_NULL(bytes)) {
|
||||
JNU_ThrowNullPointerException(env, 0);
|
||||
JNU_ThrowNullPointerException(env, NULL);
|
||||
return -1;
|
||||
}
|
||||
datalen = (*env)->GetArrayLength(env, bytes);
|
||||
|
||||
if ((off < 0) || (off > datalen) ||
|
||||
(len < 0) || ((off + len) > datalen) || ((off + len) < 0)) {
|
||||
JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0);
|
||||
if (outOfBounds(env, off, len, bytes)) {
|
||||
JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -84,8 +95,8 @@ readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
|
||||
return 0;
|
||||
} else if (len > BUF_SIZE) {
|
||||
buf = malloc(len);
|
||||
if (buf == 0) {
|
||||
JNU_ThrowOutOfMemoryError(env, 0);
|
||||
if (buf == NULL) {
|
||||
JNU_ThrowOutOfMemoryError(env, NULL);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
@ -95,18 +106,18 @@ readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
|
||||
fd = GET_FD(this, fid);
|
||||
if (fd == -1) {
|
||||
JNU_ThrowIOException(env, "Stream Closed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
nread = IO_Read(fd, buf, len);
|
||||
if (nread > 0) {
|
||||
(*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf);
|
||||
} else if (nread == JVM_IO_ERR) {
|
||||
JNU_ThrowIOExceptionWithLastError(env, "Read error");
|
||||
} else if (nread == JVM_IO_INTR) { /* EOF */
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0);
|
||||
} else { /* EOF */
|
||||
nread = -1;
|
||||
} else {
|
||||
nread = IO_Read(fd, buf, len);
|
||||
if (nread > 0) {
|
||||
(*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf);
|
||||
} else if (nread == JVM_IO_ERR) {
|
||||
JNU_ThrowIOExceptionWithLastError(env, "Read error");
|
||||
} else if (nread == JVM_IO_INTR) {
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
|
||||
} else { /* EOF */
|
||||
nread = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (buf != stackBuf) {
|
||||
@ -117,8 +128,9 @@ readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
|
||||
|
||||
void
|
||||
writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid) {
|
||||
char c = byte;
|
||||
int n;
|
||||
// Discard the 24 high-order bits of byte. See OutputStream#write(int)
|
||||
char c = (char) byte;
|
||||
jint n;
|
||||
FD fd = GET_FD(this, fid);
|
||||
if (fd == -1) {
|
||||
JNU_ThrowIOException(env, "Stream Closed");
|
||||
@ -128,28 +140,26 @@ writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid) {
|
||||
if (n == JVM_IO_ERR) {
|
||||
JNU_ThrowIOExceptionWithLastError(env, "Write error");
|
||||
} else if (n == JVM_IO_INTR) {
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0);
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
|
||||
jint off, jint len, jfieldID fid)
|
||||
jint off, jint len, jfieldID fid)
|
||||
{
|
||||
int n, datalen;
|
||||
jint n;
|
||||
char stackBuf[BUF_SIZE];
|
||||
char *buf = 0;
|
||||
char *buf = NULL;
|
||||
FD fd;
|
||||
|
||||
if (IS_NULL(bytes)) {
|
||||
JNU_ThrowNullPointerException(env, 0);
|
||||
JNU_ThrowNullPointerException(env, NULL);
|
||||
return;
|
||||
}
|
||||
datalen = (*env)->GetArrayLength(env, bytes);
|
||||
|
||||
if ((off < 0) || (off > datalen) ||
|
||||
(len < 0) || ((off + len) > datalen) || ((off + len) < 0)) {
|
||||
JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0);
|
||||
if (outOfBounds(env, off, len, bytes)) {
|
||||
JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -157,8 +167,8 @@ writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
|
||||
return;
|
||||
} else if (len > BUF_SIZE) {
|
||||
buf = malloc(len);
|
||||
if (buf == 0) {
|
||||
JNU_ThrowOutOfMemoryError(env, 0);
|
||||
if (buf == NULL) {
|
||||
JNU_ThrowOutOfMemoryError(env, NULL);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@ -180,7 +190,7 @@ writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
|
||||
JNU_ThrowIOExceptionWithLastError(env, "Write error");
|
||||
break;
|
||||
} else if (n == JVM_IO_INTR) {
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0);
|
||||
JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
|
||||
break;
|
||||
}
|
||||
off += n;
|
||||
@ -196,19 +206,19 @@ void
|
||||
throwFileNotFoundException(JNIEnv *env, jstring path)
|
||||
{
|
||||
char buf[256];
|
||||
int n;
|
||||
jint n;
|
||||
jobject x;
|
||||
jstring why = NULL;
|
||||
|
||||
n = JVM_GetLastErrorString(buf, sizeof(buf));
|
||||
if (n > 0) {
|
||||
why = JNU_NewStringPlatform(env, buf);
|
||||
why = JNU_NewStringPlatform(env, buf);
|
||||
}
|
||||
x = JNU_NewObjectByName(env,
|
||||
"java/io/FileNotFoundException",
|
||||
"(Ljava/lang/String;Ljava/lang/String;)V",
|
||||
path, why);
|
||||
"java/io/FileNotFoundException",
|
||||
"(Ljava/lang/String;Ljava/lang/String;)V",
|
||||
path, why);
|
||||
if (x != NULL) {
|
||||
(*env)->Throw(env, x);
|
||||
(*env)->Throw(env, x);
|
||||
}
|
||||
}
|
||||
|
@ -38,9 +38,9 @@ extern jfieldID IO_handle_fdID;
|
||||
* IO helper functions
|
||||
*/
|
||||
|
||||
int readSingle(JNIEnv *env, jobject this, jfieldID fid);
|
||||
int readBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off,
|
||||
jint len, jfieldID fid);
|
||||
jint readSingle(JNIEnv *env, jobject this, jfieldID fid);
|
||||
jint readBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off,
|
||||
jint len, jfieldID fid);
|
||||
void writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid);
|
||||
void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off,
|
||||
jint len, jfieldID fid);
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
#define JVM_DLL "jvm.dll"
|
||||
#define JAVA_DLL "java.dll"
|
||||
#define CRT_DLL "msvcr71.dll"
|
||||
|
||||
/*
|
||||
* Prototypes.
|
||||
@ -206,7 +205,15 @@ LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
|
||||
* assumed to be present in the "JRE path" directory. If it is not found
|
||||
* there (or "JRE path" fails to resolve), skip the explicit load and let
|
||||
* nature take its course, which is likely to be a failure to execute.
|
||||
*
|
||||
* (NOTE: the above statement is only true for Visual Studio 2003 and
|
||||
* msvcr71.dll.)
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER < 1400
|
||||
#define CRT_DLL "msvcr71.dll"
|
||||
#endif
|
||||
#ifdef CRT_DLL
|
||||
if (GetJREPath(crtpath, MAXPATHLEN)) {
|
||||
(void)JLI_StrCat(crtpath, "\\bin\\" CRT_DLL); /* Add crt dll */
|
||||
JLI_TraceLauncher("CRT path is %s\n", crtpath);
|
||||
@ -217,6 +224,8 @@ LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* CRT_DLL */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Load the Java VM DLL */
|
||||
if ((handle = LoadLibrary(jvmpath)) == 0) {
|
||||
|
@ -345,7 +345,6 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_WindowsVirtualMachine_enqueue
|
||||
DataBlock data;
|
||||
DataBlock* pData;
|
||||
DWORD* pCode;
|
||||
DWORD numBytes;
|
||||
DWORD stubLen;
|
||||
HANDLE hProcess, hThread;
|
||||
jint argsLen, i;
|
||||
@ -400,7 +399,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_WindowsVirtualMachine_enqueue
|
||||
JNU_ThrowIOExceptionWithLastError(env, "VirtualAllocEx failed");
|
||||
return;
|
||||
}
|
||||
WriteProcessMemory( hProcess, (LPVOID)pData, (LPVOID)&data, (DWORD)sizeof(DataBlock), &numBytes );
|
||||
WriteProcessMemory( hProcess, (LPVOID)pData, (LPCVOID)&data, (SIZE_T)sizeof(DataBlock), NULL );
|
||||
|
||||
|
||||
stubLen = (DWORD)(*env)->GetArrayLength(env, stub);
|
||||
@ -412,7 +411,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_WindowsVirtualMachine_enqueue
|
||||
VirtualFreeEx(hProcess, pData, 0, MEM_RELEASE);
|
||||
return;
|
||||
}
|
||||
WriteProcessMemory( hProcess, (LPVOID)pCode, (LPVOID)stubCode, (DWORD)stubLen, &numBytes );
|
||||
WriteProcessMemory( hProcess, (LPVOID)pCode, (LPCVOID)stubCode, (SIZE_T)stubLen, NULL );
|
||||
if (isCopy) {
|
||||
(*env)->ReleaseByteArrayElements(env, stub, stubCode, JNI_ABORT);
|
||||
}
|
||||
|
51
jdk/test/java/io/readBytes/MemoryLeak.java
Normal file
51
jdk/test/java/io/readBytes/MemoryLeak.java
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 6791458
|
||||
* @summary Reading from closed input files leaks native memory
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class MemoryLeak {
|
||||
public static void main(String[] args) throws Throwable {
|
||||
byte[] bytes = new byte[1 << 20];
|
||||
String dir = System.getProperty("test.src", ".");
|
||||
File testFile = new File(dir, "input.txt");
|
||||
FileInputStream s = new FileInputStream(testFile);
|
||||
s.close();
|
||||
for (int i = 0; i < 10000; i++) {
|
||||
try {
|
||||
s.read(bytes);
|
||||
throw new Error("expected IOException");
|
||||
} catch (IOException _) {
|
||||
/* OK */
|
||||
} catch (OutOfMemoryError oome) {
|
||||
System.out.printf("Got OutOfMemoryError, i=%d%n", i);
|
||||
throw oome;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -22,107 +22,76 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 4017728 4079849
|
||||
@summary Check for correct Array Bounds check in read of FileInputStream and
|
||||
RandomAccessFile
|
||||
*/
|
||||
* @test
|
||||
* @bug 4017728 4079849 6788196
|
||||
* @summary Check for correct Array Bounds check in read of FileInputStream and
|
||||
* RandomAccessFile
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
|
||||
|
||||
/*
|
||||
* The test calls the read(byte buf[] , int off , int len) of FileInputStream with
|
||||
* different values of off and len to see if the ArrayOutOfBoundsException is
|
||||
* thrown according to the JLS1.0 specification. The read(...) method calls
|
||||
* readBytes(...) in native code(io_util.c). The read(...) method in RandomAccessFile
|
||||
* also calls the same native method. So one should see similar results.
|
||||
* The test calls the read(byte buf[] , int off , int len) of
|
||||
* FileInputStream with different values of off and len to see if the
|
||||
* IndexOutOfBoundsException is thrown. The read(...) method calls
|
||||
* readBytes(...) in native code(io_util.c). The read(...) method in
|
||||
* RandomAccessFile also calls the same native method. So one should
|
||||
* see similar results.
|
||||
*/
|
||||
|
||||
|
||||
public class ReadBytesBounds {
|
||||
|
||||
public static void main(String argv[]) throws Exception{
|
||||
|
||||
int num_test_cases = 12;
|
||||
int off[] = {-1 , -1 , 0 , 0 , 33 , 33 , 0 , 32 , 32 , 4 , 1 , 0};
|
||||
int len[] = {-1 , 0 , -1 , 33 , 0 , 4 , 32 , 0 , 4 , 16 , 31 , 0};
|
||||
boolean results[] = { false , false , false , false , false , false ,
|
||||
true , true , false , true , true , true};
|
||||
|
||||
|
||||
FileInputStream fis = null;
|
||||
RandomAccessFile raf = null;
|
||||
byte b[] = new byte[32];
|
||||
|
||||
int num_good = 0;
|
||||
int num_bad = 0;
|
||||
|
||||
String dir = System.getProperty("test.src", ".");
|
||||
File testFile = new File(dir, "input.txt");
|
||||
fis = new FileInputStream(testFile);
|
||||
for(int i = 0; i < num_test_cases; i++) {
|
||||
|
||||
try {
|
||||
int bytes_read = fis.read(b , off[i] , len[i]);
|
||||
} catch(IndexOutOfBoundsException aiobe) {
|
||||
if (results[i]) {
|
||||
throw new RuntimeException("Unexpected result");
|
||||
}
|
||||
else {
|
||||
num_good++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (results[i]) {
|
||||
num_good++;
|
||||
}
|
||||
else {
|
||||
throw new RuntimeException("Unexpected result");
|
||||
}
|
||||
static final FileInputStream fis;
|
||||
static final RandomAccessFile raf;
|
||||
static final byte[] b = new byte[32];
|
||||
|
||||
static {
|
||||
try {
|
||||
String dir = System.getProperty("test.src", ".");
|
||||
File testFile = new File(dir, "input.txt");
|
||||
fis = new FileInputStream(testFile);
|
||||
raf = new RandomAccessFile(testFile , "r");
|
||||
} catch (Throwable t) {
|
||||
throw new Error(t);
|
||||
}
|
||||
System.out.println("Results for FileInputStream.read");
|
||||
System.out.println("\nTotal number of test cases = " + num_test_cases +
|
||||
"\nNumber succeded = " + num_good +
|
||||
"\nNumber failed = " + num_bad);
|
||||
|
||||
|
||||
|
||||
num_good = 0;
|
||||
num_bad = 0;
|
||||
|
||||
raf = new RandomAccessFile(testFile , "r");
|
||||
for(int i = 0; i < num_test_cases; i++) {
|
||||
|
||||
try {
|
||||
int bytes_read = raf.read(b , off[i] , len[i]);
|
||||
} catch(IndexOutOfBoundsException aiobe) {
|
||||
if (results[i]) {
|
||||
throw new RuntimeException("Unexpected result");
|
||||
}
|
||||
else {
|
||||
num_good++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (results[i]) {
|
||||
num_good++;
|
||||
}
|
||||
else {
|
||||
throw new RuntimeException("Unexpected result");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
System.out.println("Results for RandomAccessFile.read");
|
||||
System.out.println("\nTotal number of test cases = " + num_test_cases +
|
||||
"\nNumber succeded = " + num_good +
|
||||
"\nNumber failed = " + num_bad);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void main(String argv[]) throws Throwable {
|
||||
byte b[] = new byte[32];
|
||||
testRead(-1, -1, false);
|
||||
testRead(-1, 0, false);
|
||||
testRead( 0, -1, false);
|
||||
testRead( 0, 33, false);
|
||||
testRead(33, 0, false);
|
||||
testRead(33, 4, false);
|
||||
testRead( 0, 32, true);
|
||||
testRead(32, 0, true);
|
||||
testRead(32, 4, false);
|
||||
testRead( 4, 16, true);
|
||||
testRead( 1, 31, true);
|
||||
testRead( 0, 0, true);
|
||||
testRead(31, Integer.MAX_VALUE, false);
|
||||
testRead( 0, Integer.MAX_VALUE, false);
|
||||
testRead(-1, Integer.MAX_VALUE, false);
|
||||
testRead(-4, Integer.MIN_VALUE, false);
|
||||
testRead( 0, Integer.MIN_VALUE, false);
|
||||
}
|
||||
|
||||
static void testRead(int off, int len, boolean expected) throws Throwable {
|
||||
System.err.printf("off=%d len=%d expected=%b%n", off, len, expected);
|
||||
boolean result;
|
||||
try {
|
||||
fis.read(b, off, len);
|
||||
raf.read(b, off, len);
|
||||
result = true;
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
result = false;
|
||||
}
|
||||
|
||||
if (result != expected) {
|
||||
throw new RuntimeException
|
||||
(String.format("Unexpected result off=%d len=%d expected=%b",
|
||||
off, len, expected));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
71
jdk/test/sun/jvmstat/monitor/MonitoredVm/CR6672135.java
Normal file
71
jdk/test/sun/jvmstat/monitor/MonitoredVm/CR6672135.java
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2004 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Set;
|
||||
import sun.jvmstat.monitor.MonitorException;
|
||||
import sun.jvmstat.monitor.MonitoredHost;
|
||||
import sun.jvmstat.monitor.MonitoredVm;
|
||||
import sun.jvmstat.monitor.VmIdentifier;
|
||||
|
||||
/**
|
||||
*
|
||||
* @test
|
||||
* @bug 6672135
|
||||
* @summary setInterval() for local MonitoredHost and local MonitoredVm
|
||||
* @author Tomas Hurka
|
||||
*/
|
||||
public class CR6672135 {
|
||||
|
||||
private static final int INTERVAL = 2000;
|
||||
|
||||
public static void main(String[] args) {
|
||||
int vmInterval;
|
||||
int hostInterval;
|
||||
|
||||
try {
|
||||
MonitoredHost localHost = MonitoredHost.getMonitoredHost("localhost");
|
||||
Set vms = localHost.activeVms();
|
||||
Integer vmInt = (Integer) vms.iterator().next();
|
||||
String uriString = "//" + vmInt + "?mode=r"; // NOI18N
|
||||
VmIdentifier vmId = new VmIdentifier(uriString);
|
||||
MonitoredVm vm = localHost.getMonitoredVm(vmId);
|
||||
|
||||
vm.setInterval(INTERVAL);
|
||||
localHost.setInterval(INTERVAL);
|
||||
vmInterval = vm.getInterval();
|
||||
hostInterval = localHost.getInterval();
|
||||
} catch (Exception ex) {
|
||||
throw new Error ("Test failed",ex);
|
||||
}
|
||||
System.out.println("VM "+vmInterval);
|
||||
if (vmInterval != INTERVAL) {
|
||||
throw new Error("Test failed");
|
||||
}
|
||||
System.out.println("Host "+hostInterval);
|
||||
if (hostInterval != INTERVAL) {
|
||||
throw new Error("Test failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,3 +17,4 @@ eaf608c64fecf70f955dc9f29f94c055b183aeec jdk7-b30
|
||||
32e30988324601d08b87989f0821d99aa8534511 jdk7-b40
|
||||
ded6b40f558e8d19b3c17715b3d67ee001606645 jdk7-b41
|
||||
5e5567c2db56a931cf07768218c20903d9828b5f jdk7-b42
|
||||
e2f8f6daee9decd5721d598dacf4d0b5915651df jdk7-b43
|
||||
|
@ -66,7 +66,7 @@ javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
# set the following to -version to verify the versions of javac being used
|
||||
javac.version.opt =
|
||||
# in time, there should be no exceptions to -Xlint:all
|
||||
javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast,-rawtypes
|
||||
javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast
|
||||
|
||||
# options for the <javadoc> task for javac
|
||||
javadoc.jls3.url=http://java.sun.com/docs/books/jls/
|
||||
|
@ -74,7 +74,7 @@ public abstract class Trees {
|
||||
ClassLoader cl = arg.getClass().getClassLoader();
|
||||
Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl);
|
||||
argType = Class.forName(argType.getName(), false, cl);
|
||||
Method m = c.getMethod("instance", new Class[] { argType });
|
||||
Method m = c.getMethod("instance", new Class<?>[] { argType });
|
||||
return (Trees) m.invoke(null, new Object[] { arg });
|
||||
} catch (Throwable e) {
|
||||
throw new AssertionError(e);
|
||||
|
@ -281,7 +281,7 @@ public class Apt extends ListBuffer<Env<AttrContext>> {
|
||||
// Discovery process
|
||||
|
||||
// List of annotation processory factory instances
|
||||
java.util.Iterator providers = null;
|
||||
java.util.Iterator<AnnotationProcessorFactory> providers = null;
|
||||
{
|
||||
/*
|
||||
* If a factory is provided by the user, the
|
||||
|
@ -217,7 +217,7 @@ class AnnotationProxyMaker {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void visitEnum(Attribute.Enum e) {
|
||||
if (runtimeType.isEnum()) {
|
||||
String constName = e.value.toString();
|
||||
@ -225,7 +225,7 @@ class AnnotationProxyMaker {
|
||||
value = Enum.valueOf((Class)runtimeType, constName);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
value = new EnumConstantNotPresentExceptionProxy(
|
||||
(Class)runtimeType, constName);
|
||||
(Class<Enum<?>>)runtimeType, constName);
|
||||
}
|
||||
} else {
|
||||
value = null; // indicates a type mismatch
|
||||
|
@ -130,8 +130,8 @@ class Constants {
|
||||
append((EnumConstantDeclarationImpl) val);
|
||||
} else if (val instanceof AnnotationMirror) {
|
||||
append((AnnotationMirrorImpl) val);
|
||||
} else if (val instanceof Collection) {
|
||||
append((Collection) val);
|
||||
} else if (val instanceof Collection<?>) {
|
||||
append((Collection<?>) val);
|
||||
} else {
|
||||
appendUnquoted(val.toString());
|
||||
}
|
||||
@ -234,7 +234,7 @@ class Constants {
|
||||
* and separated by ", ". Useful for array-valued annotation
|
||||
* elements.
|
||||
*/
|
||||
void append(Collection vals) {
|
||||
void append(Collection<?> vals) {
|
||||
buf.append('{');
|
||||
boolean first = true;
|
||||
for (Object val : vals) {
|
||||
|
@ -71,7 +71,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
member.position().line() != classdoc.position().line()) {
|
||||
writer.printSrcLink(member, member.name());
|
||||
} else {
|
||||
bold(member.name());
|
||||
strong(member.name());
|
||||
}
|
||||
writeParameters(member);
|
||||
writeExceptions(member);
|
||||
@ -87,10 +87,10 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
|
||||
ExecutableMemberDoc emd = (ExecutableMemberDoc)member;
|
||||
String name = emd.name();
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
writer.printDocLink(context, cd, (MemberDoc) emd,
|
||||
name, false);
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
writer.displayLength = name.length();
|
||||
writeParameters(emd, false);
|
||||
}
|
||||
|
@ -78,12 +78,12 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the text "Index" in bold format in the navigation bar.
|
||||
* Print the text "Index" in strong format in the navigation bar.
|
||||
*/
|
||||
protected void navLinkIndex() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.Index");
|
||||
strongText("doclet.Index");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
@ -95,14 +95,14 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
* @param unicode Unicode for which member list information to be generated.
|
||||
* @param memberlist List of members for the unicode character.
|
||||
*/
|
||||
protected void generateContents(Character unicode, List memberlist) {
|
||||
protected void generateContents(Character unicode, List<? extends Doc> memberlist) {
|
||||
anchor("_" + unicode + "_");
|
||||
h2();
|
||||
bold(unicode.toString());
|
||||
strong(unicode.toString());
|
||||
h2End();
|
||||
dl();
|
||||
for (int i = 0; i < memberlist.size(); i++) {
|
||||
Doc element = (Doc)memberlist.get(i);
|
||||
Doc element = memberlist.get(i);
|
||||
if (element instanceof MemberDoc) {
|
||||
printDescription((MemberDoc)element);
|
||||
} else if (element instanceof ClassDoc) {
|
||||
@ -195,14 +195,14 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
|
||||
protected void printComment(ProgramElementDoc element) {
|
||||
Tag[] tags;
|
||||
if (Util.isDeprecated(element)) {
|
||||
boldText("doclet.Deprecated"); space();
|
||||
strongText("doclet.Deprecated"); space();
|
||||
if ((tags = element.tags("deprecated")).length > 0)
|
||||
printInlineDeprecatedComment(element, tags[0]);
|
||||
} else {
|
||||
ClassDoc cont = element.containingClass();
|
||||
while (cont != null) {
|
||||
if (Util.isDeprecated(cont)) {
|
||||
boldText("doclet.Deprecated"); space();
|
||||
strongText("doclet.Deprecated"); space();
|
||||
break;
|
||||
}
|
||||
cont = cont.containingClass();
|
||||
|
@ -98,8 +98,8 @@ public abstract class AbstractMemberWriter {
|
||||
writer.displayLength++;
|
||||
}
|
||||
|
||||
protected void bold(String str) {
|
||||
writer.bold(str);
|
||||
protected void strong(String str) {
|
||||
writer.strong(str);
|
||||
writer.displayLength += str.length();
|
||||
}
|
||||
|
||||
@ -317,11 +317,11 @@ public abstract class AbstractMemberWriter {
|
||||
* format for listing the API. Call methods from the sub-class to complete
|
||||
* the generation.
|
||||
*/
|
||||
protected void printDeprecatedAPI(List deprmembers, String headingKey) {
|
||||
protected void printDeprecatedAPI(List<Doc> deprmembers, String headingKey) {
|
||||
if (deprmembers.size() > 0) {
|
||||
writer.tableIndexSummary();
|
||||
writer.tableHeaderStart("#CCCCFF");
|
||||
writer.boldText(headingKey);
|
||||
writer.strongText(headingKey);
|
||||
writer.tableHeaderEnd();
|
||||
for (int i = 0; i < deprmembers.size(); i++) {
|
||||
ProgramElementDoc member =(ProgramElementDoc)deprmembers.get(i);
|
||||
@ -363,7 +363,7 @@ public abstract class AbstractMemberWriter {
|
||||
if (cd != null && !(pgmdoc instanceof ConstructorDoc)
|
||||
&& !(pgmdoc instanceof ClassDoc)) {
|
||||
// Add class context
|
||||
writer.bold(cd.name() + ".");
|
||||
writer.strong(cd.name() + ".");
|
||||
}
|
||||
writeSummaryLink(
|
||||
pgmdoc instanceof ClassDoc ?
|
||||
@ -377,12 +377,12 @@ public abstract class AbstractMemberWriter {
|
||||
}
|
||||
}
|
||||
|
||||
protected void navDetailLink(List members) {
|
||||
protected void navDetailLink(List<?> members) {
|
||||
printNavDetailLink(members.size() > 0? true: false);
|
||||
}
|
||||
|
||||
|
||||
protected void navSummaryLink(List members,
|
||||
protected void navSummaryLink(List<?> members,
|
||||
VisibleMemberMap visibleMemberMap) {
|
||||
if (members.size() > 0) {
|
||||
printNavSummaryLink(null, true);
|
||||
@ -390,7 +390,7 @@ public abstract class AbstractMemberWriter {
|
||||
} else {
|
||||
ClassDoc icd = classdoc.superclass();
|
||||
while (icd != null) {
|
||||
List inhmembers = visibleMemberMap.getMembersFor(icd);
|
||||
List<?> inhmembers = visibleMemberMap.getMembersFor(icd);
|
||||
if (inhmembers.size() > 0) {
|
||||
printNavSummaryLink(icd, true);
|
||||
return;
|
||||
|
@ -137,13 +137,13 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Highlight "Overview" in the bold format, in the navigation bar as this
|
||||
* Highlight "Overview" in the strong format, in the navigation bar as this
|
||||
* is the overview page.
|
||||
*/
|
||||
protected void navLinkContents() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.Overview");
|
||||
strongText("doclet.Overview");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
|
@ -96,12 +96,12 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
* @param list list of the sub-classes at this level.
|
||||
* @param isEnum true if we are generating a tree for enums.
|
||||
*/
|
||||
protected void generateLevelInfo(ClassDoc parent, List list,
|
||||
protected void generateLevelInfo(ClassDoc parent, List<ClassDoc> list,
|
||||
boolean isEnum) {
|
||||
if (list.size() > 0) {
|
||||
ul();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ClassDoc local = (ClassDoc)list.get(i);
|
||||
ClassDoc local = list.get(i);
|
||||
printPartialInfo(local);
|
||||
printExtendsImplements(parent, local);
|
||||
generateLevelInfo(local, classtree.subs(local, isEnum),
|
||||
@ -119,9 +119,9 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
* other classes in this run will derive from these classes.
|
||||
* @param heading Heading for the tree.
|
||||
*/
|
||||
protected void generateTree(List list, String heading) {
|
||||
protected void generateTree(List<ClassDoc> list, String heading) {
|
||||
if (list.size() > 0) {
|
||||
ClassDoc firstClassDoc = (ClassDoc)list.get(0);
|
||||
ClassDoc firstClassDoc = list.get(0);
|
||||
printTreeHeading(heading);
|
||||
generateLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
|
||||
list,
|
||||
@ -173,7 +173,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
*/
|
||||
protected void printPartialInfo(ClassDoc cd) {
|
||||
li("circle");
|
||||
printPreQualifiedBoldClassLink(LinkInfoImpl.CONTEXT_TREE, cd);
|
||||
printPreQualifiedStrongClassLink(LinkInfoImpl.CONTEXT_TREE, cd);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -193,7 +193,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
|
||||
protected void navLinkTree() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.Tree");
|
||||
strongText("doclet.Tree");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
|
||||
* @param classlist Sorted list of classes.
|
||||
* @param wantFrames True if we want frames.
|
||||
*/
|
||||
protected void generateContents(List classlist, boolean wantFrames) {
|
||||
protected void generateContents(List<Doc> classlist, boolean wantFrames) {
|
||||
for (int i = 0; i < classlist.size(); i++) {
|
||||
ClassDoc cd = (ClassDoc)(classlist.get(i));
|
||||
ClassDoc cd = (ClassDoc)classlist.get(i);
|
||||
if (!Util.isCoreClass(cd)) {
|
||||
continue;
|
||||
}
|
||||
@ -160,7 +160,7 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
|
||||
*/
|
||||
protected void printAllClassesTableHeader() {
|
||||
fontSizeStyle("+1", "FrameHeadingFont");
|
||||
boldText("doclet.All_Classes");
|
||||
strongText("doclet.All_Classes");
|
||||
fontEnd();
|
||||
br();
|
||||
table();
|
||||
|
@ -65,7 +65,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
|
||||
public void writeDefaultValueInfo(MemberDoc member) {
|
||||
writer.dl();
|
||||
writer.dt();
|
||||
writer.bold(ConfigurationImpl.getInstance().
|
||||
writer.strong(ConfigurationImpl.getInstance().
|
||||
getText("doclet.Default"));
|
||||
writer.dd();
|
||||
writer.print(((AnnotationTypeElementDoc) member).defaultValue());
|
||||
@ -84,7 +84,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printSummaryLabel(ClassDoc cd) {
|
||||
writer.boldText("doclet.Annotation_Type_Optional_Member_Summary");
|
||||
writer.strongText("doclet.Annotation_Type_Optional_Member_Summary");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,7 +131,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
if (configuration().linksource) {
|
||||
writer.printSrcLink(member, member.name());
|
||||
} else {
|
||||
bold(member.name());
|
||||
strong(member.name());
|
||||
}
|
||||
writer.preEnd();
|
||||
writer.dl();
|
||||
@ -183,7 +183,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void printSummaryLabel(ClassDoc cd) {
|
||||
writer.boldText("doclet.Annotation_Type_Required_Member_Summary");
|
||||
writer.strongText("doclet.Annotation_Type_Required_Member_Summary");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,9 +210,9 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
writer.printDocLink(context, (MemberDoc) member, member.name(), false);
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,7 +84,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
protected void navLinkClass() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.Class");
|
||||
strongText("doclet.Class");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
@ -176,7 +176,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
if (configuration().linksource) {
|
||||
printSrcLink(annotationType, name);
|
||||
} else {
|
||||
bold(name);
|
||||
strong(name);
|
||||
}
|
||||
dlEnd();
|
||||
preEnd();
|
||||
@ -220,7 +220,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
hr();
|
||||
Tag[] deprs = annotationType.tags("deprecated");
|
||||
if (Util.isDeprecated(annotationType)) {
|
||||
boldText("doclet.Deprecated");
|
||||
strongText("doclet.Deprecated");
|
||||
if (deprs.length > 0) {
|
||||
Tag[] commentTags = deprs[0].inlineTags();
|
||||
if (commentTags.length > 0) {
|
||||
@ -330,9 +330,9 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
dl();
|
||||
dt();
|
||||
if (annotationType.isInterface()) {
|
||||
boldText("doclet.Enclosing_Interface");
|
||||
strongText("doclet.Enclosing_Interface");
|
||||
} else {
|
||||
boldText("doclet.Enclosing_Class");
|
||||
strongText("doclet.Enclosing_Class");
|
||||
}
|
||||
dd();
|
||||
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass,
|
||||
|
@ -38,7 +38,7 @@ import java.util.*;
|
||||
public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
|
||||
final ClassDoc classdoc;
|
||||
Set pkgToPackageAnnotations = null;
|
||||
Set<PackageDoc> pkgToPackageAnnotations = null;
|
||||
final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter;
|
||||
final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations;
|
||||
final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter;
|
||||
@ -220,8 +220,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
false)));
|
||||
tableHeaderEnd();
|
||||
|
||||
for (Iterator it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = (PackageDoc)it.next();
|
||||
for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = it.next();
|
||||
generatePackageUse(pkg);
|
||||
}
|
||||
tableEnd();
|
||||
@ -240,8 +240,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
|
||||
false)));
|
||||
tableHeaderEnd();
|
||||
for (Iterator it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = (PackageDoc)it.next();
|
||||
for (Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = it.next();
|
||||
trBgcolorStyle("white", "TableRowColor");
|
||||
summaryRow(0);
|
||||
//Just want an anchor here.
|
||||
@ -259,8 +259,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
}
|
||||
|
||||
protected void generateClassList() throws IOException {
|
||||
for (Iterator it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = (PackageDoc)it.next();
|
||||
for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
|
||||
PackageDoc pkg = it.next();
|
||||
anchor(pkg.name());
|
||||
tableIndexSummary();
|
||||
tableHeaderStart("#CCCCFF");
|
||||
@ -394,7 +394,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
hr();
|
||||
center();
|
||||
h2();
|
||||
boldText("doclet.ClassUse_Title", cltype, clname);
|
||||
strongText("doclet.ClassUse_Title", cltype, clname);
|
||||
h2End();
|
||||
centerEnd();
|
||||
}
|
||||
@ -436,7 +436,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
|
||||
protected void navLinkClassUse() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.navClassUse");
|
||||
strongText("doclet.navClassUse");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
protected void navLinkClass() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.Class");
|
||||
strongText("doclet.Class");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
@ -185,7 +185,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
if (configuration().linksource) {
|
||||
printSrcLink(classDoc, name);
|
||||
} else {
|
||||
bold(name);
|
||||
strong(name);
|
||||
}
|
||||
if (!isInterface) {
|
||||
Type superclass = Util.getFirstVisibleSuperClass(classDoc,
|
||||
@ -258,7 +258,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
hr();
|
||||
Tag[] deprs = classDoc.tags("deprecated");
|
||||
if (Util.isDeprecated(classDoc)) {
|
||||
boldText("doclet.Deprecated");
|
||||
strongText("doclet.Deprecated");
|
||||
if (deprs.length > 0) {
|
||||
Tag[] commentTags = deprs[0].inlineTags();
|
||||
if (commentTags.length > 0) {
|
||||
@ -307,9 +307,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
classDoc, false));
|
||||
if (configuration.shouldExcludeQualifier(
|
||||
classDoc.containingPackage().name())) {
|
||||
bold(type.asClassDoc().name() + typeParameters);
|
||||
strong(type.asClassDoc().name() + typeParameters);
|
||||
} else {
|
||||
bold(type.asClassDoc().qualifiedName() + typeParameters);
|
||||
strong(type.asClassDoc().qualifiedName() + typeParameters);
|
||||
}
|
||||
} else {
|
||||
print(getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_TREE_PARENT,
|
||||
@ -355,11 +355,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
classDoc.qualifiedName().equals("org.omg.CORBA.Object")) {
|
||||
return; // Don't generate the list, too huge
|
||||
}
|
||||
List subclasses = classtree.subs(classDoc, false);
|
||||
List<ClassDoc> subclasses = classtree.subs(classDoc, false);
|
||||
if (subclasses.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
boldText("doclet.Subclasses");
|
||||
strongText("doclet.Subclasses");
|
||||
writeClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES,
|
||||
subclasses);
|
||||
}
|
||||
@ -371,11 +371,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
*/
|
||||
public void writeSubInterfacesInfo() {
|
||||
if (classDoc.isInterface()) {
|
||||
List subInterfaces = classtree.allSubs(classDoc, false);
|
||||
List<ClassDoc> subInterfaces = classtree.allSubs(classDoc, false);
|
||||
if (subInterfaces.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
boldText("doclet.Subinterfaces");
|
||||
strongText("doclet.Subinterfaces");
|
||||
writeClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES,
|
||||
subInterfaces);
|
||||
}
|
||||
@ -393,11 +393,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
classDoc.qualifiedName().equals("java.io.Serializable")) {
|
||||
return; // Don't generate the list, too big
|
||||
}
|
||||
List implcl = classtree.implementingclasses(classDoc);
|
||||
List<ClassDoc> implcl = classtree.implementingclasses(classDoc);
|
||||
if (implcl.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
boldText("doclet.Implementing_Classes");
|
||||
strongText("doclet.Implementing_Classes");
|
||||
writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES,
|
||||
implcl);
|
||||
}
|
||||
@ -409,11 +409,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
public void writeImplementedInterfacesInfo() {
|
||||
//NOTE: we really should be using ClassDoc.interfaceTypes() here, but
|
||||
// it doesn't walk up the tree like we want it to.
|
||||
List interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
if (classDoc.isClass() && interfaceArray.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
boldText("doclet.All_Implemented_Interfaces");
|
||||
strongText("doclet.All_Implemented_Interfaces");
|
||||
writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES,
|
||||
interfaceArray);
|
||||
}
|
||||
@ -425,11 +425,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
public void writeSuperInterfacesInfo() {
|
||||
//NOTE: we really should be using ClassDoc.interfaceTypes() here, but
|
||||
// it doesn't walk up the tree like we want it to.
|
||||
List interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
|
||||
if (classDoc.isInterface() && interfaceArray.size() > 0) {
|
||||
dl();
|
||||
dt();
|
||||
boldText("doclet.All_Superinterfaces");
|
||||
strongText("doclet.All_Superinterfaces");
|
||||
writeClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES,
|
||||
interfaceArray);
|
||||
}
|
||||
@ -438,7 +438,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
/**
|
||||
* Generate links to the given classes.
|
||||
*/
|
||||
private void writeClassLinks(int context, List list) {
|
||||
private void writeClassLinks(int context, List<?> list) {
|
||||
Object[] typeList = list.toArray();
|
||||
//Sort the list to be printed.
|
||||
print(' ');
|
||||
@ -570,9 +570,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter
|
||||
dl();
|
||||
dt();
|
||||
if (outerClass.isInterface()) {
|
||||
boldText("doclet.Enclosing_Interface");
|
||||
strongText("doclet.Enclosing_Interface");
|
||||
} else {
|
||||
boldText("doclet.Enclosing_Class");
|
||||
strongText("doclet.Enclosing_Class");
|
||||
}
|
||||
dd();
|
||||
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass,
|
||||
|
@ -92,7 +92,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void writeContentsHeader() {
|
||||
bold(configuration.getText("doclet.Contents"));
|
||||
strong(configuration.getText("doclet.Contents"));
|
||||
ul();
|
||||
}
|
||||
|
||||
@ -194,10 +194,10 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void writeConstantMembers(ClassDoc cd, List fields) {
|
||||
public void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields) {
|
||||
currentClassDoc = cd;
|
||||
for (int i = 0; i < fields.size(); ++i) {
|
||||
writeConstantMember((FieldDoc)(fields.get(i)));
|
||||
writeConstantMember(fields.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
if (configuration().linksource) {
|
||||
writer.printSrcLink(constructor, constructor.name());
|
||||
} else {
|
||||
bold(constructor.name());
|
||||
strong(constructor.name());
|
||||
}
|
||||
writeParameters(constructor);
|
||||
writeExceptions(constructor);
|
||||
@ -220,7 +220,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
}
|
||||
|
||||
public void printSummaryLabel(ClassDoc cd) {
|
||||
writer.boldText("doclet.Constructor_Summary");
|
||||
writer.strongText("doclet.Constructor_Summary");
|
||||
}
|
||||
|
||||
public void printSummaryAnchor(ClassDoc cd) {
|
||||
@ -238,7 +238,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
|
||||
return VisibleMemberMap.CONSTRUCTORS;
|
||||
}
|
||||
|
||||
protected void navSummaryLink(List members) {
|
||||
protected void navSummaryLink(List<?> members) {
|
||||
printNavSummaryLink(classdoc,
|
||||
members.size() > 0? true: false);
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
throws IOException {
|
||||
writeHeader();
|
||||
|
||||
bold(configuration.getText("doclet.Contents"));
|
||||
strong(configuration.getText("doclet.Contents"));
|
||||
ul();
|
||||
for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) {
|
||||
writeIndexLink(deprapi, i);
|
||||
@ -156,7 +156,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
hr();
|
||||
center();
|
||||
h2();
|
||||
boldText("doclet.Deprecated_API");
|
||||
strongText("doclet.Deprecated_API");
|
||||
h2End();
|
||||
centerEnd();
|
||||
|
||||
@ -180,7 +180,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
|
||||
protected void navLinkDeprecated() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.navDeprecated");
|
||||
strongText("doclet.navDeprecated");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
if (configuration().linksource) {
|
||||
writer.printSrcLink(enumConstant, enumConstant.name());
|
||||
} else {
|
||||
bold(enumConstant.name());
|
||||
strong(enumConstant.name());
|
||||
}
|
||||
writer.preEnd();
|
||||
writer.dl();
|
||||
@ -201,7 +201,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
}
|
||||
|
||||
public void printSummaryLabel(ClassDoc cd) {
|
||||
writer.boldText("doclet.Enum_Constant_Summary");
|
||||
writer.strongText("doclet.Enum_Constant_Summary");
|
||||
}
|
||||
|
||||
public void printSummaryAnchor(ClassDoc cd) {
|
||||
@ -216,9 +216,9 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
|
||||
}
|
||||
|
||||
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
writer.printDocLink(context, (MemberDoc) member, member.name(), false);
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
}
|
||||
|
||||
protected void writeInheritedSummaryLink(ClassDoc cd,
|
||||
|
@ -153,7 +153,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
if (configuration().linksource) {
|
||||
writer.printSrcLink(field, field.name());
|
||||
} else {
|
||||
bold(field.name());
|
||||
strong(field.name());
|
||||
}
|
||||
writer.preEnd();
|
||||
writer.dl();
|
||||
@ -190,7 +190,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
holder.typeName() : holder.qualifiedTypeName(),
|
||||
false));
|
||||
writer.dd();
|
||||
writer.bold(configuration().getText(holder.isClass()?
|
||||
writer.strong(configuration().getText(holder.isClass()?
|
||||
"doclet.Description_From_Class" :
|
||||
"doclet.Description_From_Interface", classlink));
|
||||
writer.ddEnd();
|
||||
@ -237,7 +237,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
}
|
||||
|
||||
public void printSummaryLabel(ClassDoc cd) {
|
||||
writer.boldText("doclet.Field_Summary");
|
||||
writer.strongText("doclet.Field_Summary");
|
||||
}
|
||||
|
||||
public void printSummaryAnchor(ClassDoc cd) {
|
||||
@ -251,18 +251,18 @@ public class FieldWriterImpl extends AbstractMemberWriter
|
||||
public void printInheritedSummaryLabel(ClassDoc cd) {
|
||||
String classlink = writer.getPreQualifiedClassLink(
|
||||
LinkInfoImpl.CONTEXT_MEMBER, cd, false);
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
String key = cd.isClass()?
|
||||
"doclet.Fields_Inherited_From_Class" :
|
||||
"doclet.Fields_Inherited_From_Interface";
|
||||
writer.printText(key, classlink);
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
}
|
||||
|
||||
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
writer.printDocLink(context, cd , (MemberDoc) member, member.name(), false);
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
}
|
||||
|
||||
protected void writeInheritedSummaryLink(ClassDoc cd,
|
||||
|
@ -223,7 +223,7 @@ public class HelpWriter extends HtmlDocletWriter {
|
||||
protected void navLinkHelp() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.Help");
|
||||
strongText("doclet.Help");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
|
@ -183,21 +183,21 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* @param where Position in the file
|
||||
* @param target Name of the target frame.
|
||||
* @param label Tag for the link.
|
||||
* @param bold Whether the label should be bold or not?
|
||||
* @param strong Whether the label should be strong or not?
|
||||
*/
|
||||
public void printNoFramesTargetHyperLink(String link, String where,
|
||||
String target, String label,
|
||||
boolean bold) {
|
||||
boolean strong) {
|
||||
script();
|
||||
println(" <!--");
|
||||
println(" if(window==top) {");
|
||||
println(" document.writeln('"
|
||||
+ getHyperLink(link, where, label, bold, "", "", target) + "');");
|
||||
+ getHyperLink(link, where, label, strong, "", "", target) + "');");
|
||||
println(" }");
|
||||
println(" //-->");
|
||||
scriptEnd();
|
||||
noScript();
|
||||
println(" " + getHyperLink(link, where, label, bold, "", "", target));
|
||||
println(" " + getHyperLink(link, where, label, strong, "", "", target));
|
||||
noScriptEnd();
|
||||
println(DocletConstants.NL);
|
||||
}
|
||||
@ -958,10 +958,10 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
*
|
||||
* @param pkg the package to link to.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the label should be bold.
|
||||
* @param isStrong true if the label should be strong.
|
||||
*/
|
||||
public void printPackageLink(PackageDoc pkg, String label, boolean isBold) {
|
||||
print(getPackageLink(pkg, label, isBold));
|
||||
public void printPackageLink(PackageDoc pkg, String label, boolean isStrong) {
|
||||
print(getPackageLink(pkg, label, isStrong));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -969,12 +969,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
*
|
||||
* @param pkg the package to link to.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the label should be bold.
|
||||
* @param isStrong true if the label should be strong.
|
||||
* @param style the font of the package link label.
|
||||
*/
|
||||
public void printPackageLink(PackageDoc pkg, String label, boolean isBold,
|
||||
public void printPackageLink(PackageDoc pkg, String label, boolean isStrong,
|
||||
String style) {
|
||||
print(getPackageLink(pkg, label, isBold, style));
|
||||
print(getPackageLink(pkg, label, isStrong, style));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -982,12 +982,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
*
|
||||
* @param pkg the package to link to.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the label should be bold.
|
||||
* @param isStrong true if the label should be strong.
|
||||
* @return the link to the given package.
|
||||
*/
|
||||
public String getPackageLink(PackageDoc pkg, String label,
|
||||
boolean isBold) {
|
||||
return getPackageLink(pkg, label, isBold, "");
|
||||
boolean isStrong) {
|
||||
return getPackageLink(pkg, label, isStrong, "");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -995,11 +995,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
*
|
||||
* @param pkg the package to link to.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the label should be bold.
|
||||
* @param isStrong true if the label should be strong.
|
||||
* @param style the font of the package link label.
|
||||
* @return the link to the given package.
|
||||
*/
|
||||
public String getPackageLink(PackageDoc pkg, String label, boolean isBold,
|
||||
public String getPackageLink(PackageDoc pkg, String label, boolean isStrong,
|
||||
String style) {
|
||||
boolean included = pkg != null && pkg.isIncluded();
|
||||
if (! included) {
|
||||
@ -1013,11 +1013,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
}
|
||||
if (included || pkg == null) {
|
||||
return getHyperLink(pathString(pkg, "package-summary.html"),
|
||||
"", label, isBold, style);
|
||||
"", label, isStrong, style);
|
||||
} else {
|
||||
String crossPkgLink = getCrossPackageLink(Util.getPackageName(pkg));
|
||||
if (crossPkgLink != null) {
|
||||
return getHyperLink(crossPkgLink, "", label, isBold, style);
|
||||
return getHyperLink(crossPkgLink, "", label, isStrong, style);
|
||||
} else {
|
||||
return label;
|
||||
}
|
||||
@ -1087,12 +1087,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* @param refMemName the name of the member being referenced. This should
|
||||
* be null or empty string if no member is being referenced.
|
||||
* @param label the label for the external link.
|
||||
* @param bold true if the link should be bold.
|
||||
* @param strong true if the link should be strong.
|
||||
* @param style the style of the link.
|
||||
* @param code true if the label should be code font.
|
||||
*/
|
||||
public String getCrossClassLink(String qualifiedClassName, String refMemName,
|
||||
String label, boolean bold, String style,
|
||||
String label, boolean strong, String style,
|
||||
boolean code) {
|
||||
String className = "",
|
||||
packageName = qualifiedClassName == null ? "" : qualifiedClassName;
|
||||
@ -1113,7 +1113,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
className + ".html?is-external=true"),
|
||||
refMemName == null ? "" : refMemName,
|
||||
label == null || label.length() == 0 ? defaultLabel : label,
|
||||
bold, style,
|
||||
strong, style,
|
||||
configuration.getText("doclet.Href_Class_Or_Interface_Title", packageName),
|
||||
"");
|
||||
}
|
||||
@ -1152,26 +1152,26 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* link label.
|
||||
*
|
||||
* @param cd the class to link to.
|
||||
* @param isBold true if the link should be bold.
|
||||
* @param isStrong true if the link should be strong.
|
||||
* @return the link with the package portion of the label in plain text.
|
||||
*/
|
||||
public String getPreQualifiedClassLink(int context,
|
||||
ClassDoc cd, boolean isBold) {
|
||||
ClassDoc cd, boolean isStrong) {
|
||||
String classlink = "";
|
||||
PackageDoc pd = cd.containingPackage();
|
||||
if(pd != null && ! configuration.shouldExcludeQualifier(pd.name())) {
|
||||
classlink = getPkgName(cd);
|
||||
}
|
||||
classlink += getLink(new LinkInfoImpl(context, cd, cd.name(), isBold));
|
||||
classlink += getLink(new LinkInfoImpl(context, cd, cd.name(), isStrong));
|
||||
return classlink;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print Class link, with only class name as the bold link and prefixing
|
||||
* Print Class link, with only class name as the strong link and prefixing
|
||||
* plain package name.
|
||||
*/
|
||||
public void printPreQualifiedBoldClassLink(int context, ClassDoc cd) {
|
||||
public void printPreQualifiedStrongClassLink(int context, ClassDoc cd) {
|
||||
print(getPreQualifiedClassLink(context, cd, true));
|
||||
}
|
||||
|
||||
@ -1187,16 +1187,16 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
print(configuration.getText(key, a1, a2));
|
||||
}
|
||||
|
||||
public void boldText(String key) {
|
||||
bold(configuration.getText(key));
|
||||
public void strongText(String key) {
|
||||
strong(configuration.getText(key));
|
||||
}
|
||||
|
||||
public void boldText(String key, String a1) {
|
||||
bold(configuration.getText(key, a1));
|
||||
public void strongText(String key, String a1) {
|
||||
strong(configuration.getText(key, a1));
|
||||
}
|
||||
|
||||
public void boldText(String key, String a1, String a2) {
|
||||
bold(configuration.getText(key, a1, a2));
|
||||
public void strongText(String key, String a1, String a2) {
|
||||
strong(configuration.getText(key, a1, a2));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1205,11 +1205,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* @param context the id of the context where the link will be printed.
|
||||
* @param doc the member being linked to.
|
||||
* @param label the label for the link.
|
||||
* @param bold true if the link should be bold.
|
||||
* @param strong true if the link should be strong.
|
||||
*/
|
||||
public void printDocLink(int context, MemberDoc doc, String label,
|
||||
boolean bold) {
|
||||
print(getDocLink(context, doc, label, bold));
|
||||
boolean strong) {
|
||||
print(getDocLink(context, doc, label, strong));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1221,11 +1221,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* inheriting comments.
|
||||
* @param doc the member being linked to.
|
||||
* @param label the label for the link.
|
||||
* @param bold true if the link should be bold.
|
||||
* @param strong true if the link should be strong.
|
||||
*/
|
||||
public void printDocLink(int context, ClassDoc classDoc, MemberDoc doc,
|
||||
String label, boolean bold) {
|
||||
print(getDocLink(context, classDoc, doc, label, bold));
|
||||
String label, boolean strong) {
|
||||
print(getDocLink(context, classDoc, doc, label, strong));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1234,12 +1234,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* @param context the id of the context where the link will be printed.
|
||||
* @param doc the member being linked to.
|
||||
* @param label the label for the link.
|
||||
* @param bold true if the link should be bold.
|
||||
* @param strong true if the link should be strong.
|
||||
* @return the link for the given member.
|
||||
*/
|
||||
public String getDocLink(int context, MemberDoc doc, String label,
|
||||
boolean bold) {
|
||||
return getDocLink(context, doc.containingClass(), doc, label, bold);
|
||||
boolean strong) {
|
||||
return getDocLink(context, doc.containingClass(), doc, label, strong);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1251,21 +1251,21 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* inheriting comments.
|
||||
* @param doc the member being linked to.
|
||||
* @param label the label for the link.
|
||||
* @param bold true if the link should be bold.
|
||||
* @param strong true if the link should be strong.
|
||||
* @return the link for the given member.
|
||||
*/
|
||||
public String getDocLink(int context, ClassDoc classDoc, MemberDoc doc,
|
||||
String label, boolean bold) {
|
||||
String label, boolean strong) {
|
||||
if (! (doc.isIncluded() ||
|
||||
Util.isLinkable(classDoc, configuration()))) {
|
||||
return label;
|
||||
} else if (doc instanceof ExecutableMemberDoc) {
|
||||
ExecutableMemberDoc emd = (ExecutableMemberDoc)doc;
|
||||
return getLink(new LinkInfoImpl(context, classDoc,
|
||||
getAnchor(emd), label, bold));
|
||||
getAnchor(emd), label, strong));
|
||||
} else if (doc instanceof MemberDoc) {
|
||||
return getLink(new LinkInfoImpl(context, classDoc,
|
||||
doc.name(), label, bold));
|
||||
doc.name(), label, strong));
|
||||
} else {
|
||||
return label;
|
||||
}
|
||||
@ -1728,13 +1728,13 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
* @param descList the array of {@link AnnotationDesc}.
|
||||
*/
|
||||
private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) {
|
||||
List annotations = getAnnotations(indent, descList, lineBreak);
|
||||
List<String> annotations = getAnnotations(indent, descList, lineBreak);
|
||||
if (annotations.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
fontNoNewLine("-1");
|
||||
for (Iterator iter = annotations.iterator(); iter.hasNext();) {
|
||||
print((String) iter.next());
|
||||
for (Iterator<String> iter = annotations.iterator(); iter.hasNext();) {
|
||||
print(iter.next());
|
||||
}
|
||||
fontEnd();
|
||||
return true;
|
||||
@ -1792,8 +1792,8 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
annotationTypeValues.add(annotationValue);
|
||||
}
|
||||
annotation.append(annotationTypeValues.size() == 1 ? "" : "{");
|
||||
for (Iterator iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
|
||||
annotation.append(annotationValueToString((AnnotationValue) iter.next()));
|
||||
for (Iterator<AnnotationValue> iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
|
||||
annotation.append(annotationValueToString(iter.next()));
|
||||
annotation.append(iter.hasNext() ? "," : "");
|
||||
}
|
||||
annotation.append(annotationTypeValues.size() == 1 ? "" : "}");
|
||||
@ -1820,11 +1820,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
|
||||
return type.typeName() + type.dimension() + ".class";
|
||||
}
|
||||
} else if (annotationValue.value() instanceof AnnotationDesc) {
|
||||
List list = getAnnotations(0,
|
||||
List<String> list = getAnnotations(0,
|
||||
new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
|
||||
false);
|
||||
StringBuffer buf = new StringBuffer();
|
||||
for (Iterator iter = list.iterator(); iter.hasNext(); ) {
|
||||
for (Iterator<String> iter = list.iterator(); iter.hasNext(); ) {
|
||||
buf.append(iter.next());
|
||||
}
|
||||
return buf.toString();
|
||||
|
@ -51,7 +51,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
|
||||
super(writer, classdoc);
|
||||
}
|
||||
|
||||
public List members(ClassDoc cd) {
|
||||
public List<FieldDoc> members(ClassDoc cd) {
|
||||
return Util.asList(cd.serializableFields());
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
|
||||
fieldType));
|
||||
}
|
||||
print(fieldDimensions + ' ');
|
||||
bold(fieldName);
|
||||
strong(fieldName);
|
||||
writer.preEnd();
|
||||
writer.dl();
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class LinkFactoryImpl extends LinkFactory {
|
||||
!(linkInfo.classDoc.name() + ".html").equals(m_writer.filename)) {
|
||||
linkOutput.append(m_writer.getHyperLink(filename,
|
||||
classLinkInfo.where, label.toString(),
|
||||
classLinkInfo.isBold, classLinkInfo.styleName,
|
||||
classLinkInfo.isStrong, classLinkInfo.styleName,
|
||||
title, classLinkInfo.target));
|
||||
if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
|
||||
linkOutput.append(getTypeParameterLinks(linkInfo).toString());
|
||||
@ -92,7 +92,7 @@ public class LinkFactoryImpl extends LinkFactory {
|
||||
} else {
|
||||
String crossLink = m_writer.getCrossClassLink(
|
||||
classDoc.qualifiedName(), classLinkInfo.where,
|
||||
label.toString(), classLinkInfo.isBold, classLinkInfo.styleName,
|
||||
label.toString(), classLinkInfo.isStrong, classLinkInfo.styleName,
|
||||
true);
|
||||
if (crossLink != null) {
|
||||
linkOutput.append(crossLink);
|
||||
|
@ -235,15 +235,15 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
* @param classDoc the class to link to.
|
||||
* @param where the value of the marker #.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the link should be bold.
|
||||
* @param isStrong true if the link should be strong.
|
||||
* @param styleName String style of text defined in style sheet.
|
||||
*/
|
||||
public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label,
|
||||
boolean isBold, String styleName){
|
||||
boolean isStrong, String styleName){
|
||||
this.classDoc = classDoc;
|
||||
this.where = where;
|
||||
this.label = label;
|
||||
this.isBold = isBold;
|
||||
this.isStrong = isStrong;
|
||||
this.styleName = styleName;
|
||||
setContext(context);
|
||||
}
|
||||
@ -255,14 +255,14 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
* @param classDoc the class to link to.
|
||||
* @param where the value of the marker #.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the link should be bold.
|
||||
* @param isStrong true if the link should be strong.
|
||||
*/
|
||||
public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label,
|
||||
boolean isBold){
|
||||
boolean isStrong){
|
||||
this.classDoc = classDoc;
|
||||
this.where = where;
|
||||
this.label = label;
|
||||
this.isBold = isBold;
|
||||
this.isStrong = isStrong;
|
||||
setContext(context);
|
||||
}
|
||||
|
||||
@ -283,12 +283,12 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
*
|
||||
* @param context the context of the link.
|
||||
* @param executableMemberDoc the member to link to.
|
||||
* @param isBold true if the link should be bold.
|
||||
* @param isStrong true if the link should be strong.
|
||||
*/
|
||||
public LinkInfoImpl (int context, ExecutableMemberDoc executableMemberDoc,
|
||||
boolean isBold){
|
||||
boolean isStrong){
|
||||
this.executableMemberDoc = executableMemberDoc;
|
||||
this.isBold = isBold;
|
||||
this.isStrong = isStrong;
|
||||
setContext(context);
|
||||
}
|
||||
|
||||
@ -297,11 +297,11 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
*
|
||||
* @param context the context of the link.
|
||||
* @param classDoc the class to link to.
|
||||
* @param isBold true if the link should be bold.
|
||||
* @param isStrong true if the link should be strong.
|
||||
*/
|
||||
public LinkInfoImpl (int context, ClassDoc classDoc, boolean isBold){
|
||||
public LinkInfoImpl (int context, ClassDoc classDoc, boolean isStrong){
|
||||
this.classDoc = classDoc;
|
||||
this.isBold = isBold;
|
||||
this.isStrong = isStrong;
|
||||
setContext(context);
|
||||
}
|
||||
|
||||
@ -335,13 +335,13 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
* @param context the context of the link.
|
||||
* @param type the class to link to.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the link should be bold.
|
||||
* @param isStrong true if the link should be strong.
|
||||
*/
|
||||
public LinkInfoImpl (int context, Type type, String label,
|
||||
boolean isBold){
|
||||
boolean isStrong){
|
||||
this.type = type;
|
||||
this.label = label;
|
||||
this.isBold = isBold;
|
||||
this.isStrong = isStrong;
|
||||
setContext(context);
|
||||
}
|
||||
|
||||
@ -351,13 +351,13 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
* @param context the context of the link.
|
||||
* @param classDoc the class to link to.
|
||||
* @param label the label for the link.
|
||||
* @param isBold true if the link should be bold.
|
||||
* @param isStrong true if the link should be strong.
|
||||
*/
|
||||
public LinkInfoImpl (int context, ClassDoc classDoc, String label,
|
||||
boolean isBold){
|
||||
boolean isStrong){
|
||||
this.classDoc = classDoc;
|
||||
this.label = label;
|
||||
this.isBold = isBold;
|
||||
this.isStrong = isStrong;
|
||||
setContext(context);
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
if (configuration().linksource) {
|
||||
writer.printSrcLink(method, method.name());
|
||||
} else {
|
||||
bold(method.name());
|
||||
strong(method.name());
|
||||
}
|
||||
writeParameters(method);
|
||||
writeExceptions(method);
|
||||
@ -210,7 +210,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
holder.typeName() : holder.qualifiedTypeName(),
|
||||
false));
|
||||
writer.dd();
|
||||
writer.boldText(holder.asClassDoc().isClass()?
|
||||
writer.strongText(holder.asClassDoc().isClass()?
|
||||
"doclet.Description_From_Class":
|
||||
"doclet.Description_From_Interface",
|
||||
classlink);
|
||||
@ -259,7 +259,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
}
|
||||
|
||||
public void printSummaryLabel(ClassDoc cd) {
|
||||
writer.boldText("doclet.Method_Summary");
|
||||
writer.strongText("doclet.Method_Summary");
|
||||
}
|
||||
|
||||
public void printSummaryAnchor(ClassDoc cd) {
|
||||
@ -274,12 +274,12 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
public void printInheritedSummaryLabel(ClassDoc cd) {
|
||||
String classlink = writer.getPreQualifiedClassLink(
|
||||
LinkInfoImpl.CONTEXT_MEMBER, cd, false);
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
String key = cd.isClass()?
|
||||
"doclet.Methods_Inherited_From_Class" :
|
||||
"doclet.Methods_Inherited_From_Interface";
|
||||
writer.printText(key, classlink);
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
}
|
||||
|
||||
protected void printSummaryType(ProgramElementDoc member) {
|
||||
@ -317,7 +317,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
writer.getLink(new LinkInfoImpl(context, overriddenType)));
|
||||
String name = method.name();
|
||||
writer.dt();
|
||||
writer.boldText(label);
|
||||
writer.strongText(label);
|
||||
writer.dd();
|
||||
String methLink = writer.codeText(
|
||||
writer.getLink(
|
||||
@ -363,7 +363,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
|
||||
writer.getLink(new LinkInfoImpl(
|
||||
LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac)));
|
||||
writer.dt();
|
||||
writer.boldText("doclet.Specified_By");
|
||||
writer.strongText("doclet.Specified_By");
|
||||
writer.dd();
|
||||
methlink = writer.codeText(writer.getDocLink(
|
||||
LinkInfoImpl.CONTEXT_MEMBER, implementedMeth,
|
||||
|
@ -149,7 +149,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
}
|
||||
|
||||
public void printSummaryLabel(ClassDoc cd) {
|
||||
writer.boldText("doclet.Nested_Class_Summary");
|
||||
writer.strongText("doclet.Nested_Class_Summary");
|
||||
}
|
||||
|
||||
public void printSummaryAnchor(ClassDoc cd) {
|
||||
@ -164,18 +164,18 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
|
||||
public void printInheritedSummaryLabel(ClassDoc cd) {
|
||||
String clslink = writer.getPreQualifiedClassLink(
|
||||
LinkInfoImpl.CONTEXT_MEMBER, cd, false);
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
writer.printText(cd.isInterface() ?
|
||||
"doclet.Nested_Classes_Interface_Inherited_From_Interface" :
|
||||
"doclet.Nested_Classes_Interfaces_Inherited_From_Class",
|
||||
clslink);
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
}
|
||||
|
||||
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
|
||||
writer.bold();
|
||||
writer.strong();
|
||||
writer.printLink(new LinkInfoImpl(context, (ClassDoc)member, false));
|
||||
writer.boldEnd();
|
||||
writer.strongEnd();
|
||||
}
|
||||
|
||||
protected void writeInheritedSummaryLink(ClassDoc cd,
|
||||
|
@ -49,7 +49,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
|
||||
* The classes to be documented. Use this to filter out classes
|
||||
* that will not be documented.
|
||||
*/
|
||||
private Set documentedClasses;
|
||||
private Set<ClassDoc> documentedClasses;
|
||||
|
||||
/**
|
||||
* The name of the output file.
|
||||
|
@ -87,7 +87,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the "-packagesheader" string in bold format, at top of the page,
|
||||
* Print the "-packagesheader" string in strong format, at top of the page,
|
||||
* if it is not the empty string. Otherwise print the "-header" string.
|
||||
* Despite the name, there is actually no navigation bar for this page.
|
||||
*/
|
||||
@ -95,9 +95,9 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
||||
printTableHeader(true);
|
||||
fontSizeStyle("+1", "FrameTitleFont");
|
||||
if (configuration.packagesheader.length() > 0) {
|
||||
bold(replaceDocRootDir(configuration.packagesheader));
|
||||
strong(replaceDocRootDir(configuration.packagesheader));
|
||||
} else {
|
||||
bold(replaceDocRootDir(configuration.header));
|
||||
strong(replaceDocRootDir(configuration.header));
|
||||
}
|
||||
fontEnd();
|
||||
printTableFooter(true);
|
||||
|
@ -54,7 +54,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
/**
|
||||
* List to store the order groups as specified on the command line.
|
||||
*/
|
||||
private List groupList;
|
||||
private List<String> groupList;
|
||||
|
||||
/**
|
||||
* Construct the PackageIndexWriter. Also constructs the grouping
|
||||
@ -102,9 +102,9 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
if(pkg != null && pkg.name().length() > 0) {
|
||||
trBgcolorStyle("white", "TableRowColor");
|
||||
summaryRow(20);
|
||||
bold();
|
||||
strong();
|
||||
printPackageLink(pkg, Util.getPackageName(pkg), false);
|
||||
boldEnd();
|
||||
strongEnd();
|
||||
summaryRowEnd();
|
||||
summaryRow(0);
|
||||
printSummaryComment(pkg);
|
||||
@ -137,7 +137,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
if (root.inlineTags().length > 0) {
|
||||
printSummaryComment(root);
|
||||
p();
|
||||
bold(configuration.getText("doclet.See"));
|
||||
strong(configuration.getText("doclet.See"));
|
||||
br();
|
||||
printNbsps();
|
||||
printHyperLink("", "overview_description",
|
||||
@ -152,7 +152,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
protected void printIndexHeader(String text) {
|
||||
tableIndexSummary();
|
||||
tableHeaderStart("#CCCCFF");
|
||||
bold(text);
|
||||
strong(text);
|
||||
tableHeaderEnd();
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ public class PackageTreeWriter extends AbstractTreeWriter {
|
||||
protected void printLinkToMainTree() {
|
||||
dl();
|
||||
dt();
|
||||
boldText("doclet.Package_Hierarchies");
|
||||
strongText("doclet.Package_Hierarchies");
|
||||
dd();
|
||||
navLinkMainTree(configuration.getText("doclet.All_Packages"));
|
||||
dlEnd();
|
||||
|
@ -63,8 +63,8 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
ClassDoc usedClass = content[i];
|
||||
Set<ClassDoc> usingClasses = mapper.classToClass.get(usedClass.qualifiedName());
|
||||
if (usingClasses != null) {
|
||||
for (Iterator it = usingClasses.iterator(); it.hasNext(); ) {
|
||||
ClassDoc usingClass = (ClassDoc)it.next();
|
||||
for (Iterator<ClassDoc> it = usingClasses.iterator(); it.hasNext(); ) {
|
||||
ClassDoc usingClass = it.next();
|
||||
PackageDoc usingPackage = usingClass.containingPackage();
|
||||
Set<ClassDoc> usedClasses = usingPackageToUsedClasses
|
||||
.get(usingPackage.name());
|
||||
@ -136,9 +136,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
printText("doclet.ClassUse_Packages.that.use.0",
|
||||
getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false));
|
||||
tableHeaderEnd();
|
||||
Iterator it = usingPackageToUsedClasses.keySet().iterator();
|
||||
Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
PackageDoc pkg = configuration.root.packageNamed((String)it.next());
|
||||
PackageDoc pkg = configuration.root.packageNamed(it.next());
|
||||
generatePackageUse(pkg);
|
||||
}
|
||||
tableEnd();
|
||||
@ -147,9 +147,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
}
|
||||
|
||||
protected void generateClassList() throws IOException {
|
||||
Iterator itp = usingPackageToUsedClasses.keySet().iterator();
|
||||
Iterator<String> itp = usingPackageToUsedClasses.keySet().iterator();
|
||||
while (itp.hasNext()) {
|
||||
String packageName = (String)itp.next();
|
||||
String packageName = itp.next();
|
||||
PackageDoc usingPackage = configuration.root.packageNamed(packageName);
|
||||
if (usingPackage != null) {
|
||||
anchor(usingPackage.name());
|
||||
@ -160,11 +160,10 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false),
|
||||
getPackageLink(usingPackage,Util.getPackageName(usingPackage), false));
|
||||
tableHeaderEnd();
|
||||
Iterator itc =
|
||||
((Collection)usingPackageToUsedClasses.get(packageName))
|
||||
.iterator();
|
||||
Iterator<ClassDoc> itc =
|
||||
usingPackageToUsedClasses.get(packageName).iterator();
|
||||
while (itc.hasNext()) {
|
||||
printClassRow((ClassDoc)itc.next(), packageName);
|
||||
printClassRow(itc.next(), packageName);
|
||||
}
|
||||
tableEnd();
|
||||
space();
|
||||
@ -178,9 +177,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
|
||||
trBgcolorStyle("white", "TableRowColor");
|
||||
summaryRow(0);
|
||||
bold();
|
||||
strong();
|
||||
printHyperLink(path, packageName, usedClass.name(), true);
|
||||
boldEnd();
|
||||
strongEnd();
|
||||
println(); br();
|
||||
printNbsps();
|
||||
printIndexComment(usedClass);
|
||||
@ -219,7 +218,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
hr();
|
||||
center();
|
||||
h2();
|
||||
boldText("doclet.ClassUse_Title", packageLabel, name);
|
||||
strongText("doclet.ClassUse_Title", packageLabel, name);
|
||||
h2End();
|
||||
centerEnd();
|
||||
}
|
||||
@ -251,7 +250,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
protected void navLinkClassUse() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.navClassUse");
|
||||
strongText("doclet.navClassUse");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
|
@ -123,14 +123,14 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
}
|
||||
trBgcolorStyle("white", "TableRowColor");
|
||||
summaryRow(15);
|
||||
bold();
|
||||
strong();
|
||||
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_PACKAGE,
|
||||
classes[i], false));
|
||||
boldEnd();
|
||||
strongEnd();
|
||||
summaryRowEnd();
|
||||
summaryRow(0);
|
||||
if (Util.isDeprecated(classes[i])) {
|
||||
boldText("doclet.Deprecated");
|
||||
strongText("doclet.Deprecated");
|
||||
if (classes[i].tags("deprecated").length > 0) {
|
||||
space();
|
||||
printSummaryDeprecatedComment(classes[i],
|
||||
@ -155,7 +155,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
*/
|
||||
protected void printFirstRow(String label) {
|
||||
tableHeaderStart("#CCCCFF");
|
||||
bold(label);
|
||||
strong(label);
|
||||
tableHeaderEnd();
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) {
|
||||
printSummaryComment(packageDoc);
|
||||
p();
|
||||
bold(configuration.getText("doclet.See"));
|
||||
strong(configuration.getText("doclet.See"));
|
||||
br();
|
||||
printNbsps();
|
||||
printHyperLink("", "package_description",
|
||||
@ -268,7 +268,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
|
||||
protected void navLinkPackage() {
|
||||
navCellRevStart();
|
||||
fontStyle("NavBarFont1Rev");
|
||||
boldText("doclet.Package");
|
||||
strongText("doclet.Package");
|
||||
fontEnd();
|
||||
navCellEnd();
|
||||
}
|
||||
|
@ -73,9 +73,9 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
tableHeader();
|
||||
thAlign("center");
|
||||
font("+2");
|
||||
boldText("doclet.Package");
|
||||
strongText("doclet.Package");
|
||||
print(' ');
|
||||
bold(packageName);
|
||||
strong(packageName);
|
||||
tableFooter();
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
* @param serialUID the serial UID to print.
|
||||
*/
|
||||
public void writeSerialUIDInfo(String header, String serialUID) {
|
||||
bold(header + " ");
|
||||
strong(header + " ");
|
||||
println(serialUID);
|
||||
p();
|
||||
}
|
||||
@ -131,7 +131,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
|
||||
tableHeader();
|
||||
thAlignColspan("left", 2);
|
||||
font("+2");
|
||||
bold(className);
|
||||
strong(className);
|
||||
tableFooter();
|
||||
p();
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
public void printTableHeadingBackground(String str) {
|
||||
tableIndexDetail();
|
||||
tableHeaderStart("#CCCCFF", 1);
|
||||
bold(str);
|
||||
strong(str);
|
||||
tableHeaderEnd();
|
||||
tableEnd();
|
||||
}
|
||||
@ -117,7 +117,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
protected void printIndexComment(Doc member, Tag[] firstSentenceTags) {
|
||||
Tag[] deprs = member.tags("deprecated");
|
||||
if (Util.isDeprecated((ProgramElementDoc) member)) {
|
||||
boldText("doclet.Deprecated");
|
||||
strongText("doclet.Deprecated");
|
||||
space();
|
||||
if (deprs.length > 0) {
|
||||
printInlineDeprecatedComment(member, deprs[0]);
|
||||
@ -126,7 +126,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
} else {
|
||||
ClassDoc cd = ((ProgramElementDoc)member).containingClass();
|
||||
if (cd != null && Util.isDeprecated(cd)) {
|
||||
boldText("doclet.Deprecated"); space();
|
||||
strongText("doclet.Deprecated"); space();
|
||||
}
|
||||
}
|
||||
printSummaryComment(member, firstSentenceTags);
|
||||
|
@ -69,9 +69,9 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
Tag[] deprs = doc.tags("deprecated");
|
||||
if (doc instanceof ClassDoc) {
|
||||
if (Util.isDeprecated((ProgramElementDoc) doc)) {
|
||||
output.append("<B>" +
|
||||
output.append("<STRONG>" +
|
||||
ConfigurationImpl.getInstance().
|
||||
getText("doclet.Deprecated") + "</B> ");
|
||||
getText("doclet.Deprecated") + "</STRONG> ");
|
||||
if (deprs.length > 0) {
|
||||
Tag[] commentTags = deprs[0].inlineTags();
|
||||
if (commentTags.length > 0) {
|
||||
@ -86,9 +86,9 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
} else {
|
||||
MemberDoc member = (MemberDoc) doc;
|
||||
if (Util.isDeprecated((ProgramElementDoc) doc)) {
|
||||
output.append("<DD><B>" +
|
||||
output.append("<DD><STRONG>" +
|
||||
ConfigurationImpl.getInstance().
|
||||
getText("doclet.Deprecated") + "</B> ");
|
||||
getText("doclet.Deprecated") + "</STRONG> ");
|
||||
if (deprs.length > 0) {
|
||||
output.append("<I>");
|
||||
output.append(commentTagsToOutput(null, doc,
|
||||
@ -101,9 +101,9 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
}
|
||||
} else {
|
||||
if (Util.isDeprecated(member.containingClass())) {
|
||||
output.append("<DD><B>" +
|
||||
output.append("<DD><STRONG>" +
|
||||
ConfigurationImpl.getInstance().
|
||||
getText("doclet.Deprecated") + "</B> ");
|
||||
getText("doclet.Deprecated") + "</STRONG> ");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
public TagletOutput getParamHeader(String header) {
|
||||
StringBuffer result = new StringBuffer();
|
||||
result.append("<DT>");
|
||||
result.append("<B>" + header + "</B>");
|
||||
result.append("<STRONG>" + header + "</STRONG>");
|
||||
return new TagletOutputImpl(result.toString());
|
||||
}
|
||||
|
||||
@ -141,8 +141,8 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
*/
|
||||
public TagletOutput returnTagOutput(Tag returnTag) {
|
||||
TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<DT>" +
|
||||
"<B>" + htmlWriter.configuration.getText("doclet.Returns") +
|
||||
"</B>" + "<DD>" +
|
||||
"<STRONG>" + htmlWriter.configuration.getText("doclet.Returns") +
|
||||
"</STRONG>" + "<DD>" +
|
||||
htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(),
|
||||
false));
|
||||
return result;
|
||||
@ -189,7 +189,7 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
if (result != null && result.length() > 0) {
|
||||
return result + ", " + DocletConstants.NL;
|
||||
} else {
|
||||
return "<DT><B>" + htmlWriter.configuration().getText("doclet.See_Also") + "</B><DD>";
|
||||
return "<DT><STRONG>" + htmlWriter.configuration().getText("doclet.See_Also") + "</STRONG><DD>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) {
|
||||
String result = "<DT><B>" + header + "</B></DT>" + DocletConstants.NL +
|
||||
String result = "<DT><STRONG>" + header + "</STRONG></DT>" + DocletConstants.NL +
|
||||
" <DD>";
|
||||
for (int i = 0; i < simpleTags.length; i++) {
|
||||
if (i > 0) {
|
||||
@ -212,7 +212,7 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public TagletOutput simpleTagOutput(Tag simpleTag, String header) {
|
||||
return new TagletOutputImpl("<DT><B>" + header + "</B></DT>" + " <DD>"
|
||||
return new TagletOutputImpl("<DT><STRONG>" + header + "</STRONG></DT>" + " <DD>"
|
||||
+ htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false)
|
||||
+ "</DD>" + DocletConstants.NL);
|
||||
}
|
||||
@ -221,8 +221,8 @@ public class TagletWriterImpl extends TagletWriter {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public TagletOutput getThrowsHeader() {
|
||||
return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<B>" +
|
||||
htmlWriter.configuration().getText("doclet.Throws") + "</B>");
|
||||
return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<STRONG>" +
|
||||
htmlWriter.configuration().getText("doclet.Throws") + "</STRONG>");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,7 +119,7 @@ public class TreeWriter extends AbstractTreeWriter {
|
||||
if (!classesonly) {
|
||||
dl();
|
||||
dt();
|
||||
boldText("doclet.Package_Hierarchies");
|
||||
strongText("doclet.Package_Hierarchies");
|
||||
dd();
|
||||
for (int i = 0; i < packages.length; i++) {
|
||||
if (packages[i].name().length() == 0) {
|
||||
|
@ -83,11 +83,11 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
* @param where Position of the link in the file. Character '#' is not
|
||||
* needed.
|
||||
* @param label Tag for the link.
|
||||
* @param bold Boolean that sets label to bold.
|
||||
* @param strong Boolean that sets label to strong.
|
||||
*/
|
||||
public void printHyperLink(String link, String where,
|
||||
String label, boolean bold) {
|
||||
print(getHyperLink(link, where, label, bold, "", "", ""));
|
||||
String label, boolean strong) {
|
||||
print(getHyperLink(link, where, label, strong, "", "", ""));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -109,13 +109,13 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
* @param where Position of the link in the file. Character '#' is not
|
||||
* needed.
|
||||
* @param label Tag for the link.
|
||||
* @param bold Boolean that sets label to bold.
|
||||
* @param strong Boolean that sets label to strong.
|
||||
* @param stylename String style of text defined in style sheet.
|
||||
*/
|
||||
public void printHyperLink(String link, String where,
|
||||
String label, boolean bold,
|
||||
String label, boolean strong,
|
||||
String stylename) {
|
||||
print(getHyperLink(link, where, label, bold, stylename, "", ""));
|
||||
print(getHyperLink(link, where, label, strong, stylename, "", ""));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -125,12 +125,12 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
* @param where Position of the link in the file. Character '#' is not
|
||||
* needed.
|
||||
* @param label Tag for the link.
|
||||
* @param bold Boolean that sets label to bold.
|
||||
* @param strong Boolean that sets label to strong.
|
||||
* @return String Hyper Link.
|
||||
*/
|
||||
public String getHyperLink(String link, String where,
|
||||
String label, boolean bold) {
|
||||
return getHyperLink(link, where, label, bold, "", "", "");
|
||||
String label, boolean strong) {
|
||||
return getHyperLink(link, where, label, strong, "", "", "");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -140,14 +140,14 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
* @param where Position of the link in the file. Character '#' is not
|
||||
* needed.
|
||||
* @param label Tag for the link.
|
||||
* @param bold Boolean that sets label to bold.
|
||||
* @param strong Boolean that sets label to strong.
|
||||
* @param stylename String style of text defined in style sheet.
|
||||
* @return String Hyper Link.
|
||||
*/
|
||||
public String getHyperLink(String link, String where,
|
||||
String label, boolean bold,
|
||||
String label, boolean strong,
|
||||
String stylename) {
|
||||
return getHyperLink(link, where, label, bold, stylename, "", "");
|
||||
return getHyperLink(link, where, label, strong, stylename, "", "");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -157,14 +157,14 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
* @param where Position of the link in the file. Character '#' is not
|
||||
* needed.
|
||||
* @param label Tag for the link.
|
||||
* @param bold Boolean that sets label to bold.
|
||||
* @param strong Boolean that sets label to strong.
|
||||
* @param stylename String style of text defined in style sheet.
|
||||
* @param title String that describes the link's content for accessibility.
|
||||
* @param target Target frame.
|
||||
* @return String Hyper Link.
|
||||
*/
|
||||
public String getHyperLink(String link, String where,
|
||||
String label, boolean bold,
|
||||
String label, boolean strong,
|
||||
String stylename, String title, String target) {
|
||||
StringBuffer retlink = new StringBuffer();
|
||||
retlink.append("<A HREF=\"");
|
||||
@ -186,12 +186,12 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
retlink.append(stylename);
|
||||
retlink.append("\">");
|
||||
}
|
||||
if (bold) {
|
||||
retlink.append("<B>");
|
||||
if (strong) {
|
||||
retlink.append("<STRONG>");
|
||||
}
|
||||
retlink.append(label);
|
||||
if (bold) {
|
||||
retlink.append("</B>");
|
||||
if (strong) {
|
||||
retlink.append("</STRONG>");
|
||||
}
|
||||
if (stylename != null && stylename.length() != 0) {
|
||||
retlink.append("</FONT>");
|
||||
|
@ -433,46 +433,46 @@ public class HtmlWriter extends PrintWriter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the "<B>" string.
|
||||
* Get the "<STRONG>" string.
|
||||
*
|
||||
* @return String Return String "<B>";
|
||||
* @return String Return String "<STRONG>";
|
||||
*/
|
||||
public String getBold() {
|
||||
return "<B>";
|
||||
public String getStrong() {
|
||||
return "<STRONG>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the "</B>" string.
|
||||
* Get the "</STRONG>" string.
|
||||
*
|
||||
* @return String Return String "</B>";
|
||||
* @return String Return String "</STRONG>";
|
||||
*/
|
||||
public String getBoldEnd() {
|
||||
return "</B>";
|
||||
public String getStrongEnd() {
|
||||
return "</STRONG>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Print <B> tag.
|
||||
* Print <STRONG> tag.
|
||||
*/
|
||||
public void bold() {
|
||||
print("<B>");
|
||||
public void strong() {
|
||||
print("<STRONG>");
|
||||
}
|
||||
|
||||
/**
|
||||
* Print </B> tag.
|
||||
* Print </STRONG> tag.
|
||||
*/
|
||||
public void boldEnd() {
|
||||
print("</B>");
|
||||
public void strongEnd() {
|
||||
print("</STRONG>");
|
||||
}
|
||||
|
||||
/**
|
||||
* Print text passed, in bold format using <B> and </B> tags.
|
||||
* Print text passed, in strong format using <STRONG> and </STRONG> tags.
|
||||
*
|
||||
* @param text String to be printed in between <B> and </B> tags.
|
||||
* @param text String to be printed in between <STRONG> and </STRONG> tags.
|
||||
*/
|
||||
public void bold(String text) {
|
||||
bold();
|
||||
public void strong(String text) {
|
||||
strong();
|
||||
print(text);
|
||||
boldEnd();
|
||||
strongEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -441,13 +441,13 @@ public abstract class Configuration {
|
||||
* @param customTagStrs the set two dimentional arrays of strings. These arrays contain
|
||||
* either -tag or -taglet arguments.
|
||||
*/
|
||||
private void initTagletManager(Set customTagStrs) {
|
||||
private void initTagletManager(Set<String[]> customTagStrs) {
|
||||
tagletManager = tagletManager == null ?
|
||||
new TagletManager(nosince, showversion, showauthor, message) :
|
||||
tagletManager;
|
||||
String[] args;
|
||||
for (Iterator it = customTagStrs.iterator(); it.hasNext(); ) {
|
||||
args = (String[]) it.next();
|
||||
for (Iterator<String[]> it = customTagStrs.iterator(); it.hasNext(); ) {
|
||||
args = it.next();
|
||||
if (args[0].equals("-taglet")) {
|
||||
tagletManager.addCustomTag(args[1], tagletpath);
|
||||
continue;
|
||||
|
@ -103,7 +103,7 @@ public interface ConstantsSummaryWriter {
|
||||
* @param cd the class whose constants are being documented.
|
||||
* @param fields the constants being documented.
|
||||
*/
|
||||
public abstract void writeConstantMembers(ClassDoc cd, List fields);
|
||||
public abstract void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields);
|
||||
|
||||
/**
|
||||
* Document the given constants.
|
||||
|
@ -97,22 +97,22 @@ public abstract class AbstractBuilder {
|
||||
* @param elements the XML elements that specify which components to
|
||||
* document.
|
||||
*/
|
||||
protected void build(List elements) {
|
||||
protected void build(List<?> elements) {
|
||||
for (int i = 0; i < elements.size(); i++ ) {
|
||||
Object element = elements.get(i);
|
||||
String component = (String)
|
||||
((element instanceof String) ?
|
||||
element :
|
||||
((List) element).get(0));
|
||||
((List<?>) element).get(0));
|
||||
try {
|
||||
invokeMethod("build" + component,
|
||||
element instanceof String ?
|
||||
new Class[] {} :
|
||||
new Class[] {List.class},
|
||||
new Class<?>[] {} :
|
||||
new Class<?>[] {List.class},
|
||||
element instanceof String ?
|
||||
new Object[] {} :
|
||||
new Object[] {((List) element).subList(1,
|
||||
((List) element).size())});
|
||||
new Object[] {((List<?>) element).subList(1,
|
||||
((List<?>) element).size())});
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
configuration.root.printError("Unknown element: " + component);
|
||||
@ -138,7 +138,7 @@ public abstract class AbstractBuilder {
|
||||
* @param paramClasses the types for each parameter.
|
||||
* @param params the parameters of the method.
|
||||
*/
|
||||
protected abstract void invokeMethod(String methodName, Class[] paramClasses,
|
||||
protected abstract void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public abstract class AbstractMemberBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements {@inheritDoc}
|
||||
*/
|
||||
public void build(List elements) {
|
||||
public void build(List<?> elements) {
|
||||
if (hasMembersToDocument()) {
|
||||
super.build(elements);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -122,7 +122,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how to document a class.
|
||||
*/
|
||||
public void buildAnnotationTypeDoc(List elements) throws Exception {
|
||||
public void buildAnnotationTypeDoc(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
copyDocFiles();
|
||||
@ -197,7 +197,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a member summary is
|
||||
* documented.
|
||||
*/
|
||||
public void buildMemberSummary(List elements) throws Exception {
|
||||
public void buildMemberSummary(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getMemberSummaryBuilder(writer).build(elements);
|
||||
writer.completeMemberSummaryBuild();
|
||||
@ -209,7 +209,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a annotation type
|
||||
* members are documented.
|
||||
*/
|
||||
public void buildAnnotationTypeOptionalMemberDetails(List elements)
|
||||
public void buildAnnotationTypeOptionalMemberDetails(List<?> elements)
|
||||
throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getAnnotationTypeOptionalMemberBuilder(writer).build(elements);
|
||||
@ -221,7 +221,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a annotation type
|
||||
* members are documented.
|
||||
*/
|
||||
public void buildAnnotationTypeRequiredMemberDetails(List elements)
|
||||
public void buildAnnotationTypeRequiredMemberDetails(List<?> elements)
|
||||
throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getAnnotationTypeRequiredMemberBuilder(writer).build(elements);
|
||||
|
@ -95,7 +95,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildAnnotationTypeOptionalMember(List elements) {
|
||||
public void buildAnnotationTypeOptionalMember(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
@ -108,7 +108,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
|
@ -116,7 +116,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -135,7 +135,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of members that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildAnnotationTypeRequiredMember(List elements) {
|
||||
public void buildAnnotationTypeRequiredMember(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -138,7 +138,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how to document a class.
|
||||
*/
|
||||
public void buildClassDoc(List elements) throws Exception {
|
||||
public void buildClassDoc(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
copyDocFiles();
|
||||
@ -293,7 +293,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a member summary is
|
||||
* documented.
|
||||
*/
|
||||
public void buildMemberSummary(List elements) throws Exception {
|
||||
public void buildMemberSummary(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getMemberSummaryBuilder(writer).build(elements);
|
||||
writer.completeMemberSummaryBuild();
|
||||
@ -305,7 +305,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how a enum constants are
|
||||
* documented.
|
||||
*/
|
||||
public void buildEnumConstantsDetails(List elements) throws Exception {
|
||||
public void buildEnumConstantsDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getEnumConstantsBuilder(writer).build(elements);
|
||||
}
|
||||
@ -315,7 +315,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how a field is documented.
|
||||
*/
|
||||
public void buildFieldDetails(List elements) throws Exception {
|
||||
public void buildFieldDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getFieldBuilder(writer).build(elements);
|
||||
}
|
||||
@ -326,7 +326,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that specify how to document a
|
||||
* constructor.
|
||||
*/
|
||||
public void buildConstructorDetails(List elements) throws Exception {
|
||||
public void buildConstructorDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getConstructorBuilder(writer).build(elements);
|
||||
}
|
||||
@ -336,7 +336,7 @@ public class ClassBuilder extends AbstractBuilder {
|
||||
*
|
||||
* @param elements the XML elements that specify how a method is documented.
|
||||
*/
|
||||
public void buildMethodDetails(List elements) throws Exception {
|
||||
public void buildMethodDetails(List<?> elements) throws Exception {
|
||||
configuration.getBuilderFactory().
|
||||
getMethodBuilder(writer).build(elements);
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -144,7 +144,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the list of elements describing constant summary
|
||||
* documentation.
|
||||
*/
|
||||
public void buildConstantSummary(List elements) throws Exception {
|
||||
public void buildConstantSummary(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
}
|
||||
@ -186,7 +186,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the XML elements that represent the components
|
||||
* of documentation for each package.
|
||||
*/
|
||||
public void buildConstantSummaries(List elements) {
|
||||
public void buildConstantSummaries(List<?> elements) {
|
||||
PackageDoc[] packages = configuration.packages;
|
||||
printedPackageHeaders = new HashSet<String>();
|
||||
for (int i = 0; i < packages.length; i++) {
|
||||
@ -204,7 +204,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the list of XML elements that make up package
|
||||
* documentation.
|
||||
*/
|
||||
public void buildPackageConstantSummary(List elements) {
|
||||
public void buildPackageConstantSummary(List<?> elements) {
|
||||
build(elements);
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
* @param elements the list of XML elements that make up the class
|
||||
* constant summary.
|
||||
*/
|
||||
public void buildClassConstantSummary(List elements) {
|
||||
public void buildClassConstantSummary(List<?> elements) {
|
||||
ClassDoc[] classes = currentPackage.name().length() > 0 ?
|
||||
currentPackage.allClasses() :
|
||||
configuration.classDocCatalog.allClasses(
|
||||
@ -297,8 +297,8 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
|
||||
private boolean hasConstantField (ClassDoc classDoc) {
|
||||
VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc,
|
||||
VisibleMemberMap.FIELDS, configuration.nodeprecated);
|
||||
List fields = visibleMemberMapFields.getLeafClassMembers(configuration);
|
||||
for (Iterator iter = fields.iterator(); iter.hasNext(); ) {
|
||||
List<?> fields = visibleMemberMapFields.getLeafClassMembers(configuration);
|
||||
for (Iterator<?> iter = fields.iterator(); iter.hasNext(); ) {
|
||||
FieldDoc field = (FieldDoc) iter.next();
|
||||
if (field.constantValueExpression() != null) {
|
||||
classDocsWithConstFields.add(classDoc);
|
||||
|
@ -138,7 +138,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -156,7 +156,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
*
|
||||
* @return a list of constructors that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildConstructorDoc(List elements) {
|
||||
public void buildConstructorDoc(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -139,7 +139,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of enum constants that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildEnumConstant(List elements) {
|
||||
public void buildEnumConstant(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -140,7 +140,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of fields that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
|
||||
* @param elements the XML elements that specify how to construct this
|
||||
* documentation.
|
||||
*/
|
||||
public void buildFieldDoc(List elements) {
|
||||
public void buildFieldDoc(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -78,9 +78,9 @@ public class LayoutParser extends DefaultHandler {
|
||||
*
|
||||
* @return List the list of XML elements parsed.
|
||||
*/
|
||||
public List parseXML(String root) {
|
||||
public List<?> parseXML(String root) {
|
||||
if (xmlElementsMap.containsKey(root)) {
|
||||
return (List) xmlElementsMap.get(root);
|
||||
return xmlElementsMap.get(root);
|
||||
}
|
||||
try {
|
||||
List<Object> xmlElements = new ArrayList<Object>();
|
||||
|
@ -170,7 +170,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
* @return a list of methods that will be documented.
|
||||
* @see VisibleMemberMap
|
||||
*/
|
||||
public List members(int type) {
|
||||
public List<ProgramElementDoc> members(int type) {
|
||||
return visibleMemberMaps[type].getLeafClassMembers(configuration);
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -339,9 +339,9 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
private void buildInheritedSummary(MemberSummaryWriter writer,
|
||||
VisibleMemberMap visibleMemberMap) {
|
||||
for (Iterator iter = visibleMemberMap.getVisibleClassesList().iterator();
|
||||
for (Iterator<ClassDoc> iter = visibleMemberMap.getVisibleClassesList().iterator();
|
||||
iter.hasNext();) {
|
||||
ClassDoc inhclass = (ClassDoc) (iter.next());
|
||||
ClassDoc inhclass = iter.next();
|
||||
if (! (inhclass.isPublic() ||
|
||||
Util.isLinkable(inhclass, configuration))) {
|
||||
continue;
|
||||
|
@ -116,7 +116,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -135,7 +135,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
* @param classDoc the {@link ClassDoc} we want to check.
|
||||
* @return a list of methods that will be documented.
|
||||
*/
|
||||
public List members(ClassDoc classDoc) {
|
||||
public List<ProgramElementDoc> members(ClassDoc classDoc) {
|
||||
return visibleMemberMap.getMembersFor(classDoc);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
|
||||
/**
|
||||
* Build the method documentation.
|
||||
*/
|
||||
public void buildMethodDoc(List elements) {
|
||||
public void buildMethodDoc(List<?> elements) {
|
||||
if (writer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
||||
*/
|
||||
public void invokeMethod(
|
||||
String methodName,
|
||||
Class[] paramClasses,
|
||||
Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -120,7 +120,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the package documentation.
|
||||
*/
|
||||
public void buildPackageDoc(List elements) throws Exception {
|
||||
public void buildPackageDoc(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
packageWriter.close();
|
||||
Util.copyDocFiles(
|
||||
@ -162,7 +162,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the package summary.
|
||||
*/
|
||||
public void buildSummary(List elements) {
|
||||
public void buildSummary(List<?> elements) {
|
||||
build(elements);
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the serialized form.
|
||||
*/
|
||||
public void buildSerializedForm(List elements) throws Exception {
|
||||
public void buildSerializedForm(List<?> elements) throws Exception {
|
||||
build(elements);
|
||||
writer.close();
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void invokeMethod(String methodName, Class[] paramClasses,
|
||||
public void invokeMethod(String methodName, Class<?>[] paramClasses,
|
||||
Object[] params)
|
||||
throws Exception {
|
||||
if (DEBUG) {
|
||||
@ -159,7 +159,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the contents.
|
||||
*/
|
||||
public void buildSerializedFormSummaries(List elements) {
|
||||
public void buildSerializedFormSummaries(List<?> elements) {
|
||||
PackageDoc[] packages = configuration.packages;
|
||||
for (int i = 0; i < packages.length; i++) {
|
||||
currentPackage = packages[i];
|
||||
@ -170,7 +170,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* Build the package serialized for for the current package being processed.
|
||||
*/
|
||||
public void buildPackageSerializedForm(List elements) {
|
||||
public void buildPackageSerializedForm(List<?> elements) {
|
||||
String foo = currentPackage.name();
|
||||
ClassDoc[] classes = currentPackage.allClasses(false);
|
||||
if (classes == null || classes.length == 0) {
|
||||
@ -189,7 +189,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
writer.writePackageHeader(Util.getPackageName(currentPackage));
|
||||
}
|
||||
|
||||
public void buildClassSerializedForm(List elements) {
|
||||
public void buildClassSerializedForm(List<?> elements) {
|
||||
ClassDoc[] classes = currentPackage.allClasses(false);
|
||||
Arrays.sort(classes);
|
||||
for (int j = 0; j < classes.length; j++) {
|
||||
@ -368,7 +368,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
/**
|
||||
* build the information for the method.
|
||||
*/
|
||||
public void buildMethodInfo(List elements) {
|
||||
public void buildMethodInfo(List<?> elements) {
|
||||
if(configuration.nocomment){
|
||||
return;
|
||||
}
|
||||
@ -478,7 +478,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
* Build the summaries for the methods that belong to the given
|
||||
* class.
|
||||
*/
|
||||
public void buildSerializableMethods(List elements) {
|
||||
public void buildSerializableMethods(List<?> elements) {
|
||||
MemberDoc[] members = currentClass.serializationMethods();
|
||||
if (members.length > 0) {
|
||||
for (int i = 0; i < members.length; i++) {
|
||||
@ -492,7 +492,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
|
||||
* Build the summaries for the fields that belong to the given
|
||||
* class.
|
||||
*/
|
||||
public void buildSerializableFields(List elements) {
|
||||
public void buildSerializableFields(List<?> elements) {
|
||||
MemberDoc[] members = currentClass.serializableFields();
|
||||
if (members.length > 0) {
|
||||
for (int i = 0; i < members.length; i++) {
|
||||
|
@ -100,7 +100,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
}
|
||||
ParamTag[] tags = input.isTypeVariableParamTag ?
|
||||
input.method.typeParamTags() : input.method.paramTags();
|
||||
Map rankMap = getRankMap(input.isTypeVariableParamTag ?
|
||||
Map<String, String> rankMap = getRankMap(input.isTypeVariableParamTag ?
|
||||
(Object[]) input.method.typeParameters() :
|
||||
(Object[]) input.method.parameters());
|
||||
for (int i = 0; i < tags.length; i++) {
|
||||
@ -262,7 +262,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
* @return the TagletOutput representation of this <code>Tag</code>.
|
||||
*/
|
||||
private TagletOutput processParamTags(boolean isNonTypeParams,
|
||||
ParamTag[] paramTags, Map rankMap, TagletWriter writer,
|
||||
ParamTag[] paramTags, Map<String, String> rankMap, TagletWriter writer,
|
||||
Set<String> alreadyDocumented) {
|
||||
TagletOutput result = writer.getOutputInstance();
|
||||
if (paramTags.length > 0) {
|
||||
@ -277,7 +277,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
"doclet.Type_Parameters_warn",
|
||||
paramName);
|
||||
}
|
||||
String rank = (String) rankMap.get(pt.parameterName());
|
||||
String rank = rankMap.get(pt.parameterName());
|
||||
if (rank != null && alreadyDocumented.contains(rank)) {
|
||||
writer.getMsgRetriever().warning(pt.position(),
|
||||
isNonTypeParams ?
|
||||
|
@ -212,7 +212,7 @@ public class TagletManager {
|
||||
URLClassLoader appClassLoader = new URLClassLoader(pathToURLs(cpString));
|
||||
customTagClass = appClassLoader.loadClass(classname);
|
||||
Method meth = customTagClass.getMethod("register",
|
||||
new Class[] {Class.forName("java.util.Map")});
|
||||
new Class<?>[] {java.util.Map.class});
|
||||
Object[] list = customTags.values().toArray();
|
||||
Taglet lastTag = (list != null && list.length > 0)
|
||||
? (Taglet) list[list.length-1] : null;
|
||||
@ -705,9 +705,9 @@ public class TagletManager {
|
||||
* Initialize lowercase version of standard Javadoc tags.
|
||||
*/
|
||||
private void initStandardTagsLowercase() {
|
||||
Iterator it = standardTags.iterator();
|
||||
Iterator<String> it = standardTags.iterator();
|
||||
while (it.hasNext()) {
|
||||
standardTagsLowercase.add(((String)it.next()).toLowerCase());
|
||||
standardTagsLowercase.add(it.next().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,9 +177,9 @@ public class ClassTree {
|
||||
bases.add(cd);
|
||||
}
|
||||
}
|
||||
List intfacs = Util.getAllInterfaces(cd, configuration);
|
||||
for (Iterator iter = intfacs.iterator(); iter.hasNext();) {
|
||||
add(implementingclasses, ((Type) iter.next()).asClassDoc(), cd);
|
||||
List<Type> intfacs = Util.getAllInterfaces(cd, configuration);
|
||||
for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext();) {
|
||||
add(implementingclasses, iter.next().asClassDoc(), cd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,13 +278,13 @@ public class ClassTree {
|
||||
|
||||
//If class x implements a subinterface of cd, then it follows
|
||||
//that class x implements cd.
|
||||
Iterator implementingClassesIter, subInterfacesIter = subinterfaces.listIterator();
|
||||
Iterator<ClassDoc> implementingClassesIter, subInterfacesIter = subinterfaces.listIterator();
|
||||
ClassDoc c;
|
||||
while(subInterfacesIter.hasNext()){
|
||||
implementingClassesIter = implementingclasses((ClassDoc)
|
||||
implementingClassesIter = implementingclasses(
|
||||
subInterfacesIter.next()).listIterator();
|
||||
while(implementingClassesIter.hasNext()){
|
||||
c = (ClassDoc)implementingClassesIter.next();
|
||||
c = implementingClassesIter.next();
|
||||
if(! result.contains(c)){
|
||||
result.add(c);
|
||||
}
|
||||
@ -328,9 +328,9 @@ public class ClassTree {
|
||||
List<ClassDoc> list = subs(cd, isEnum);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
cd = list.get(i);
|
||||
List tlist = subs(cd, isEnum);
|
||||
List<ClassDoc> tlist = subs(cd, isEnum);
|
||||
for (int j = 0; j < tlist.size(); j++) {
|
||||
ClassDoc tcd = (ClassDoc)tlist.get(j);
|
||||
ClassDoc tcd = tlist.get(j);
|
||||
if (!list.contains(tcd)) {
|
||||
list.add(tcd);
|
||||
}
|
||||
@ -345,7 +345,7 @@ public class ClassTree {
|
||||
* thw classdoc for java.lang.Object, since this is the base class for all
|
||||
* classes.
|
||||
*/
|
||||
public List baseclasses() {
|
||||
public List<ClassDoc> baseclasses() {
|
||||
return baseclasses;
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ public class ClassTree {
|
||||
* Return the list of base interfaces. This is the list of interfaces
|
||||
* which do not have super-interface.
|
||||
*/
|
||||
public List baseinterfaces() {
|
||||
public List<ClassDoc> baseinterfaces() {
|
||||
return baseinterfaces;
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ public class ClassTree {
|
||||
* Return the list of base enums. This is the list of enums
|
||||
* which do not have super-enums.
|
||||
*/
|
||||
public List baseEnums() {
|
||||
public List<ClassDoc> baseEnums() {
|
||||
return baseEnums;
|
||||
}
|
||||
|
||||
@ -369,7 +369,7 @@ public class ClassTree {
|
||||
* Return the list of base annotation types. This is the list of
|
||||
* annotation types which do not have super-annotation types.
|
||||
*/
|
||||
public List baseAnnotationTypes() {
|
||||
public List<ClassDoc> baseAnnotationTypes() {
|
||||
return baseAnnotationTypes;
|
||||
}
|
||||
}
|
||||
|
@ -184,12 +184,12 @@ public class ClassUseMapper {
|
||||
this.classtree = classtree;
|
||||
|
||||
// Map subclassing, subinterfacing implementing, ...
|
||||
for (Iterator it = classtree.baseclasses().iterator(); it.hasNext();) {
|
||||
subclasses((ClassDoc)it.next());
|
||||
for (Iterator<ClassDoc> it = classtree.baseclasses().iterator(); it.hasNext();) {
|
||||
subclasses(it.next());
|
||||
}
|
||||
for (Iterator it = classtree.baseinterfaces().iterator(); it.hasNext();) {
|
||||
for (Iterator<ClassDoc> it = classtree.baseinterfaces().iterator(); it.hasNext();) {
|
||||
// does subinterfacing as side-effect
|
||||
implementingClasses((ClassDoc)it.next());
|
||||
implementingClasses(it.next());
|
||||
}
|
||||
// Map methods, fields, constructors using a class.
|
||||
ClassDoc[] classes = root.classes();
|
||||
@ -279,12 +279,12 @@ public class ClassUseMapper {
|
||||
List<ClassDoc> impl = classtree.implementingclasses(cd);
|
||||
if (impl != null) {
|
||||
ret.addAll(impl);
|
||||
for (Iterator it = impl.iterator(); it.hasNext();) {
|
||||
ret.addAll(subclasses((ClassDoc)it.next()));
|
||||
for (Iterator<ClassDoc> it = impl.iterator(); it.hasNext();) {
|
||||
ret.addAll(subclasses(it.next()));
|
||||
}
|
||||
}
|
||||
for (Iterator it = subinterfaces(cd).iterator(); it.hasNext();) {
|
||||
ret.addAll(implementingClasses((ClassDoc)it.next()));
|
||||
for (Iterator<ClassDoc> it = subinterfaces(cd).iterator(); it.hasNext();) {
|
||||
ret.addAll(implementingClasses(it.next()));
|
||||
}
|
||||
addAll(classToImplementingClass, cd, ret);
|
||||
}
|
||||
@ -328,8 +328,7 @@ public class ClassUseMapper {
|
||||
private <T> List<T> refList(Map<String,List<T>> map, ClassDoc cd) {
|
||||
List<T> list = map.get(cd.qualifiedName());
|
||||
if (list == null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<T> l = new ArrayList();
|
||||
List<T> l = new ArrayList<T>();
|
||||
list = l;
|
||||
map.put(cd.qualifiedName(), list);
|
||||
}
|
||||
@ -348,8 +347,7 @@ public class ClassUseMapper {
|
||||
private Set<ClassDoc> classSet(ClassDoc cd) {
|
||||
Set<ClassDoc> clsSet = classToClass.get(cd.qualifiedName());
|
||||
if (clsSet == null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<ClassDoc> s = new TreeSet();
|
||||
Set<ClassDoc> s = new TreeSet<ClassDoc>();
|
||||
clsSet = s;
|
||||
classToClass.put(cd.qualifiedName(), clsSet);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class Group {
|
||||
*
|
||||
* @return true if package name format found in the map, else false.
|
||||
*/
|
||||
boolean foundGroupFormat(Map map, String pkgFormat) {
|
||||
boolean foundGroupFormat(Map<String,?> map, String pkgFormat) {
|
||||
if (map.containsKey(pkgFormat)) {
|
||||
configuration.message.error("doclet.Same_package_name_used", pkgFormat);
|
||||
return true;
|
||||
@ -239,7 +239,7 @@ public class Group {
|
||||
* Return the list of groups, in the same order as specified
|
||||
* on the command line.
|
||||
*/
|
||||
public List getGroupList() {
|
||||
public List<String> getGroupList() {
|
||||
return groupList;
|
||||
}
|
||||
}
|
||||
|
@ -86,9 +86,9 @@ public class ImplementedMethods {
|
||||
* from the array passed.
|
||||
*/
|
||||
private void buildImplementedMethodList(boolean sort) {
|
||||
List intfacs = Util.getAllInterfaces(classdoc, configuration, sort);
|
||||
for (Iterator iter = intfacs.iterator(); iter.hasNext(); ) {
|
||||
Type interfaceType = (Type) iter.next();
|
||||
List<Type> intfacs = Util.getAllInterfaces(classdoc, configuration, sort);
|
||||
for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext(); ) {
|
||||
Type interfaceType = iter.next();
|
||||
MethodDoc found = Util.findMethod(interfaceType.asClassDoc(), method);
|
||||
if (found != null) {
|
||||
removeOverriddenMethod(found);
|
||||
|
@ -114,7 +114,7 @@ public class IndexBuilder {
|
||||
this.noDeprecated = noDeprecated;
|
||||
this.classesOnly = classesOnly;
|
||||
buildIndexMap(configuration.root);
|
||||
Set set = indexmap.keySet();
|
||||
Set<Character> set = indexmap.keySet();
|
||||
elements = set.toArray();
|
||||
Arrays.sort(elements);
|
||||
}
|
||||
@ -215,7 +215,7 @@ public class IndexBuilder {
|
||||
*
|
||||
* @return Map index map.
|
||||
*/
|
||||
public Map getIndexMap() {
|
||||
public Map<Character,List<Doc>> getIndexMap() {
|
||||
return indexmap;
|
||||
}
|
||||
|
||||
@ -225,8 +225,8 @@ public class IndexBuilder {
|
||||
* @param index index Unicode character.
|
||||
* @return List member list for specific Unicode character.
|
||||
*/
|
||||
public List getMemberList(Character index) {
|
||||
return (List)indexmap.get(index);
|
||||
public List<Doc> getMemberList(Character index) {
|
||||
return indexmap.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,10 +88,10 @@ public class Util {
|
||||
/**
|
||||
* Return the list of ProgramElementDoc objects as Array.
|
||||
*/
|
||||
public static ProgramElementDoc[] toProgramElementDocArray(List list) {
|
||||
public static ProgramElementDoc[] toProgramElementDocArray(List<ProgramElementDoc> list) {
|
||||
ProgramElementDoc[] pgmarr = new ProgramElementDoc[list.size()];
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
pgmarr[i] = (ProgramElementDoc)(list.get(i));
|
||||
pgmarr[i] = list.get(i);
|
||||
}
|
||||
return pgmarr;
|
||||
}
|
||||
@ -416,9 +416,9 @@ public class Util {
|
||||
continue;
|
||||
}
|
||||
results.put(interfaceClassDoc, interfaceType);
|
||||
List superInterfaces = getAllInterfaces(interfaceType, configuration, sort);
|
||||
for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type t = (Type) iter.next();
|
||||
List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration, sort);
|
||||
for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type t = iter.next();
|
||||
results.put(t.asClassDoc(), t);
|
||||
}
|
||||
}
|
||||
@ -438,7 +438,7 @@ public class Util {
|
||||
return resultsList;
|
||||
}
|
||||
|
||||
public static List getAllInterfaces(Type type, Configuration configuration) {
|
||||
public static List<Type> getAllInterfaces(Type type, Configuration configuration) {
|
||||
return getAllInterfaces(type, configuration, true);
|
||||
}
|
||||
|
||||
@ -480,9 +480,9 @@ public class Util {
|
||||
if (raw)
|
||||
interfaceType = interfaceType.asClassDoc();
|
||||
results.put(interfaceClassDoc, interfaceType);
|
||||
List superInterfaces = getAllInterfaces(interfaceType, configuration);
|
||||
for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type superInterface = (Type) iter.next();
|
||||
List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration);
|
||||
for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
|
||||
Type superInterface = iter.next();
|
||||
results.put(superInterface.asClassDoc(), superInterface);
|
||||
}
|
||||
}
|
||||
@ -495,8 +495,8 @@ public class Util {
|
||||
}
|
||||
|
||||
|
||||
public static List<ProgramElementDoc> asList(ProgramElementDoc[] members) {
|
||||
List<ProgramElementDoc> list = new ArrayList<ProgramElementDoc>();
|
||||
public static <T extends ProgramElementDoc> List<T> asList(T[] members) {
|
||||
List<T> list = new ArrayList<T>();
|
||||
for (int i = 0; i < members.length; i++) {
|
||||
list.add(members[i]);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ public class VisibleMemberMap {
|
||||
*
|
||||
* @return the list of visible classes in this map.
|
||||
*/
|
||||
public List getVisibleClassesList() {
|
||||
public List<ClassDoc> getVisibleClassesList() {
|
||||
sort(visibleClasses);
|
||||
return visibleClasses;
|
||||
}
|
||||
@ -130,8 +130,8 @@ public class VisibleMemberMap {
|
||||
*/
|
||||
private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration) {
|
||||
List<ProgramElementDoc> results = new ArrayList<ProgramElementDoc>();
|
||||
for (Iterator iter = visibleClasses.iterator(); iter.hasNext(); ) {
|
||||
ClassDoc currentClass = (ClassDoc) iter.next();
|
||||
for (Iterator<ClassDoc> iter = visibleClasses.iterator(); iter.hasNext(); ) {
|
||||
ClassDoc currentClass = iter.next();
|
||||
if (currentClass != classdoc &&
|
||||
currentClass.isPackagePrivate() &&
|
||||
!Util.isLinkable(currentClass, configuration)) {
|
||||
@ -203,10 +203,10 @@ public class VisibleMemberMap {
|
||||
}
|
||||
}
|
||||
|
||||
private void purgeMemberLevelMap(List list, String level) {
|
||||
private void purgeMemberLevelMap(List<ProgramElementDoc> list, String level) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Object key = getMemberKey((ProgramElementDoc)list.get(i));
|
||||
Map memberLevelMap = (Map) memberNameMap.get(key);
|
||||
Object key = getMemberKey(list.get(i));
|
||||
Map<ProgramElementDoc, String> memberLevelMap = memberNameMap.get(key);
|
||||
if (level.equals(memberLevelMap.get(list.get(i))))
|
||||
memberLevelMap.remove(list.get(i));
|
||||
}
|
||||
@ -230,7 +230,7 @@ public class VisibleMemberMap {
|
||||
}
|
||||
|
||||
public boolean isEqual(MethodDoc member) {
|
||||
for (Iterator iter = members.iterator(); iter.hasNext(); ) {
|
||||
for (Iterator<ProgramElementDoc> iter = members.iterator(); iter.hasNext(); ) {
|
||||
MethodDoc member2 = (MethodDoc) iter.next();
|
||||
if (Util.executableMembersEqual(member, member2)) {
|
||||
members.add(member);
|
||||
@ -438,9 +438,9 @@ public class VisibleMemberMap {
|
||||
return targetMembers.toArray(new AnnotationTypeElementDoc[]{});
|
||||
}
|
||||
|
||||
private boolean found(List list, ProgramElementDoc elem) {
|
||||
private boolean found(List<ProgramElementDoc> list, ProgramElementDoc elem) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ProgramElementDoc pgmelem = (ProgramElementDoc)list.get(i);
|
||||
ProgramElementDoc pgmelem = list.get(i);
|
||||
if (Util.matches(pgmelem, elem)) {
|
||||
return true;
|
||||
}
|
||||
@ -455,13 +455,13 @@ public class VisibleMemberMap {
|
||||
* level "111".
|
||||
*/
|
||||
private boolean isOverridden(ProgramElementDoc pgmdoc, String level) {
|
||||
Map memberLevelMap = (Map) memberNameMap.get(getMemberKey(pgmdoc));
|
||||
Map<?,String> memberLevelMap = (Map<?,String>) memberNameMap.get(getMemberKey(pgmdoc));
|
||||
if (memberLevelMap == null)
|
||||
return false;
|
||||
String mappedlevel = null;
|
||||
Iterator iterator = memberLevelMap.values().iterator();
|
||||
Iterator<String> iterator = memberLevelMap.values().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
mappedlevel = (String)(iterator.next());
|
||||
mappedlevel = iterator.next();
|
||||
if (mappedlevel.equals(STARTLEVEL) ||
|
||||
(level.startsWith(mappedlevel) &&
|
||||
!level.equals(mappedlevel))) {
|
||||
@ -482,7 +482,7 @@ public class VisibleMemberMap {
|
||||
}
|
||||
|
||||
private ClassMember getClassMember(MethodDoc member) {
|
||||
for (Iterator iter = memberNameMap.keySet().iterator(); iter.hasNext();) {
|
||||
for (Iterator<?> iter = memberNameMap.keySet().iterator(); iter.hasNext();) {
|
||||
Object key = iter.next();
|
||||
if (key instanceof String) {
|
||||
continue;
|
||||
|
@ -69,9 +69,9 @@ public abstract class LinkInfo {
|
||||
public String label;
|
||||
|
||||
/**
|
||||
* True if the link should be bolded.
|
||||
* True if the link should be strong.
|
||||
*/
|
||||
public boolean isBold = false;
|
||||
public boolean isStrong = false;
|
||||
|
||||
/**
|
||||
* True if we should include the type in the link label. False otherwise.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user