Wiki Markup |
---|
The Java compiler type checks the arguments to each varargs method to ensure that the arguments are of the same type or object reference. However, the compile-time checking is ineffective when {{Object}} or generic {{T}} parameter types are used \[[Bloch 2008|AA. Bibliography#Bloch 08]\]. Another requirement for providing strong compile-time type checking of variable argument methods is to be as specific as possible when declaring the type of the method parameter. |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="296898ebdb655708-3a977875-41ba4d95-9d1f89ff-b09edf6e9c8d166346f01635"><ac:plain-text-body><![CDATA[ | [[Bloch 2008 | AA. Bibliography#Bloch 08]] | Item 42: "Use Varargs Judiciously" | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7966af65094dda15-a9f25309-4d664497-abe98d26-8218835fd59739dc6e69782e"><ac:plain-text-body><![CDATA[ | [[Steinberg 2005 | AA. Bibliography#Steinberg 05]] | "Using the Varargs Language Feature" | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="19db09a2c1c205f4-cbb5d564-473d4788-aff488eb-c1b42758fc4ec80381934023"><ac:plain-text-body><![CDATA[ | [[Sun 2006 | AA. Bibliography#Sun 06]] | [varargs | http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html] | ]]></ac:plain-text-body></ac:structured-macro> |
...
DCL01-J. Avoid ambiguous overloading of varargs methods 01. Declarations and Initialization (DCL) VOID DCL10DCL03-J. Ensure proper initialization by declaring class and instance variables finalDo not derive a value associated with an enum from its ordinal