Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2010-02-17 17:37:23 +0000
committerAndrew Gvozdev2010-02-17 17:37:23 +0000
commite9c9d7353aa46b3622ca02dbcfd424d5d7d7b86a (patch)
treec08c92fa1ece8a58261f09d58196945b7ea51cf5 /build/org.eclipse.cdt.managedbuilder.core
parente59e5d549dd74ccfb3d68e98c98a6fd5713b5172 (diff)
downloadorg.eclipse.cdt-e9c9d7353aa46b3622ca02dbcfd424d5d7d7b86a.tar.gz
org.eclipse.cdt-e9c9d7353aa46b3622ca02dbcfd424d5d7d7b86a.tar.xz
org.eclipse.cdt-e9c9d7353aa46b3622ca02dbcfd424d5d7d7b86a.zip
cleanup: JavaDoc warnings and casts
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java37
1 files changed, 27 insertions, 10 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
index b5c3665e3ee..c2c0e6f54c6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
@@ -115,11 +115,11 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
* This constructor is called to create an Option whose attributes and children will be
* added by separate calls.
*
- * @param IHoldsOptions The parent of the option, if any
- * @param Option The superClass, if any
- * @param String The id for the new option
- * @param String The name for the new option
- * @param boolean Indicates whether this is an extension element or a managed project element
+ * @param parent - the parent of the option, if any
+ * @param superClass - the superClass, if any
+ * @param Id - the id for the new option
+ * @param name - the name for the new option
+ * @param isExtensionElement - indicates whether this is an extension element or a managed project element
*/
public Option(IHoldsOptions parent, IOption superClass, String Id, String name, boolean isExtensionElement) {
this.holder = parent;
@@ -253,10 +253,14 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
case UNDEF_LIBRARY_FILES:
case UNDEF_MACRO_FILES:
if (option.value != null) {
- value = new ArrayList<OptionStringValue>((ArrayList<OptionStringValue>)option.value);
+ @SuppressWarnings("unchecked")
+ ArrayList<OptionStringValue> list = new ArrayList<OptionStringValue>((ArrayList<OptionStringValue>)option.value);
+ value = list;
}
if (option.defaultValue != null) {
- defaultValue = new ArrayList<OptionStringValue>((ArrayList<OptionStringValue>)option.defaultValue);
+ @SuppressWarnings("unchecked")
+ ArrayList<OptionStringValue> list = new ArrayList<OptionStringValue>((ArrayList<OptionStringValue>)option.defaultValue);
+ defaultValue = list;
}
break;
}
@@ -682,10 +686,10 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
}
/**
- * Persist the option to the project file.
+ * Persist the option to the {@link ICStorageElement}.
*
- * @param doc
- * @param element
+ * @param element - storage element to persist the option
+ * @throws BuildException
*/
public void serialize(ICStorageElement element) throws BuildException {
if (superClass != null)
@@ -754,6 +758,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
case UNDEF_LIBRARY_FILES:
case UNDEF_MACRO_FILES:
if (value != null) {
+ @SuppressWarnings("unchecked")
ArrayList<OptionStringValue> stringList = (ArrayList<OptionStringValue>)value;
for (OptionStringValue optValue : stringList) {
ICStorageElement valueElement = element.createChild(LIST_VALUE);
@@ -1178,6 +1183,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (getValueType() != PREPROCESSOR_SYMBOLS) {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
ArrayList<String> v = (ArrayList<String>)getValue();
if (v == null) {
return EMPTY_STRING_ARRAY;
@@ -1312,6 +1318,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (getValueType() != INCLUDE_PATH) {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
ArrayList<String> v = (ArrayList<String>)getValue();
if (v == null) {
return EMPTY_STRING_ARRAY;
@@ -1328,6 +1335,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (getValueType() != LIBRARIES) {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
ArrayList<String> v = (ArrayList<String>)getValue();
if (v == null) {
return EMPTY_STRING_ARRAY;
@@ -1345,6 +1353,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (getValueType() != LIBRARY_FILES) {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
ArrayList<String> v = (ArrayList<String>)getValue();
if (v == null) {
return EMPTY_STRING_ARRAY;
@@ -1371,6 +1380,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (getValueType() != STRING_LIST) {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
ArrayList<String> v = (ArrayList<String>)getValue();
if (v == null) {
return EMPTY_STRING_ARRAY;
@@ -1398,6 +1408,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
// This is the right puppy, so return its list value
+ @SuppressWarnings("unchecked")
ArrayList<String> v = (ArrayList<String>)getValue();
if (v == null) {
return EMPTY_STRING_ARRAY;
@@ -1550,6 +1561,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
public Object getRawValue() {
Object ev = getExactRawValue();
if(ev instanceof List<?>) {
+ @SuppressWarnings("unchecked")
List<String> evList = listValueListToValueList((List<OptionStringValue>)ev);
return evList;
}
@@ -1597,6 +1609,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
public Object getDefaultValue() {
Object ev = getExactDefaultValue();
if(ev instanceof List<?>) {
+ @SuppressWarnings("unchecked")
List<String> evList = listValueListToValueList((List<OptionStringValue>)ev);
return evList;
}
@@ -1618,6 +1631,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
*/
public void setDefaultValue(Object v) {
if(v instanceof List<?>) {
+ @SuppressWarnings("unchecked")
List<OptionStringValue> vList = valueListToListValueList((List<String>)v, false);
defaultValue = vList;
} else {
@@ -1849,6 +1863,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
*/
public void setValue(Object v) {
if(v instanceof List<?>) {
+ @SuppressWarnings("unchecked")
List<OptionStringValue> vList = valueListToListValueList((List<String>)v, false);
value = vList;
} else {
@@ -2359,6 +2374,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (getBasicValueType() != STRING_LIST) {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
ArrayList<String> v = (ArrayList<String>)getValue();
if (v == null) {
return EMPTY_STRING_ARRAY;
@@ -2371,6 +2387,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if (getBasicValueType() != STRING_LIST) {
throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ @SuppressWarnings("unchecked")
ArrayList<OptionStringValue> v = (ArrayList<OptionStringValue>)getExactValue();
if (v == null) {
return EMPTY_LV_ARRAY;

Back to the top