diff options
author | Tor Norbye <tnorbye@google.com> | 2011-12-20 20:20:24 -0800 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2011-12-21 13:36:23 -0800 |
commit | ab36f4e7488358dea4ab6b54ee2b7bef3da0232b (patch) | |
tree | e6846336e35cd0fb29addf962c9031c68492ed30 /layoutlib_api/src/com/android/ide | |
parent | 4ae7075d188a35298d834bfcd0500b77b08a12ab (diff) | |
download | sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.zip sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.gz sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.bz2 |
Update SDK codebase to JDK 6
This changeset makes the SDK codebase compile with source=1.6 (which
means it also requires JDK 6). This means that methods implementing an
interface requires @Override's. It also means we can start using APIs
like the ArrayDeque class and methods like String#isEmpty().
This changeset looks big but the change is trivial: it's basically
adding @Override in all the places that need it, along with some other
automatic Eclipse cleanup in certain files (such as reordering imports
where they were incorrectly ordered (because older versions of Eclipse
didn't always handle inner classes right)), as well as cleaning up
trailing whitespace and removing some $NON-NLS-1$ markers on lines
where there aren't any string literals anymore.
This changeset also sets the source and target JDK level to 6 in the
Eclipse compiler .settings file, and synchronizes this file to all the
other Eclipse SDK projects.
Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
Diffstat (limited to 'layoutlib_api/src/com/android/ide')
5 files changed, 7 insertions, 0 deletions
diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/AdapterBinding.java b/layoutlib_api/src/com/android/ide/common/rendering/api/AdapterBinding.java index 9481246..ddcdbd5 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/AdapterBinding.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/AdapterBinding.java @@ -75,6 +75,7 @@ public class AdapterBinding implements Iterable<DataBindingItem> { return mFooters.get(index); } + @Override public Iterator<DataBindingItem> iterator() { return mItems.iterator(); } diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/DataBindingItem.java b/layoutlib_api/src/com/android/ide/common/rendering/api/DataBindingItem.java index 93569bd..2a93f15 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/DataBindingItem.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/DataBindingItem.java @@ -89,6 +89,7 @@ public class DataBindingItem implements Iterable<DataBindingItem> { return Collections.emptyList(); } + @Override public Iterator<DataBindingItem> iterator() { List<DataBindingItem> list = getChildren(); return list.iterator(); diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/DensityBasedResourceValue.java b/layoutlib_api/src/com/android/ide/common/rendering/api/DensityBasedResourceValue.java index f63f16f..5add715 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/DensityBasedResourceValue.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/DensityBasedResourceValue.java @@ -41,6 +41,7 @@ public class DensityBasedResourceValue extends ResourceValue implements IDensity /** Legacy method, do not call * @deprecated use {@link #getResourceDensity()} instead. */ + @Override @Deprecated public Density getDensity() { return Density.getEnum(mDensity.getDpiValue()); diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java b/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java index bb7dab4..dceb7c5 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java @@ -46,6 +46,7 @@ public class ResourceValue extends ResourceReference implements IResourceValue { * Returns the type of the resource. For instance "drawable", "color", etc... * @deprecated use {@link #getResourceType()} instead. */ + @Override @Deprecated public String getType() { return mType.getName(); @@ -54,6 +55,7 @@ public class ResourceValue extends ResourceReference implements IResourceValue { /** * Returns the value of the resource, as defined in the XML. This can be <code>null</code> */ + @Override public final String getValue() { return mValue; } diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/StyleResourceValue.java b/layoutlib_api/src/com/android/ide/common/rendering/api/StyleResourceValue.java index 9d1e65d..2daa7f9 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/StyleResourceValue.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/StyleResourceValue.java @@ -44,6 +44,7 @@ public final class StyleResourceValue extends ResourceValue implements IStyleRes /** * Returns the parent style name or <code>null</code> if unknown. */ + @Override public String getParentStyle() { return mParentStyle; } @@ -75,6 +76,7 @@ public final class StyleResourceValue extends ResourceValue implements IStyleRes * Legacy method. * @deprecated use {@link #getValue()} */ + @Override @Deprecated public IResourceValue findItem(String name) { return mItems.get(name); |