aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-04-27 10:46:08 -0400
committerLars Vogel2018-04-27 10:54:37 -0400
commita48a14fbe18cf79d168def0b2b60591ccd89c6e7 (patch)
treee5c83cce52cfbd191bea41db94905970b492957d
parent1af1b06682bf672ec52ba53dec1475413f8f1e26 (diff)
downloadeclipse.platform.runtime-a48a14fbe18cf79d168def0b2b60591ccd89c6e7.zip
eclipse.platform.runtime-a48a14fbe18cf79d168def0b2b60591ccd89c6e7.tar.gz
eclipse.platform.runtime-a48a14fbe18cf79d168def0b2b60591ccd89c6e7.tar.xz
Remove redundant modifiers from org.eclipse.e4.core.di
Includes activation of the save action Change-Id: Iefca07dee52449787fa293ba2e3aa11c60e9701c Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.e4.core.di/.settings/org.eclipse.jdt.ui.prefs1
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IBinding.java6
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java24
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/InjectionException.java2
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/ExtendedObjectSupplier.java2
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IObjectDescriptor.java10
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IRequestor.java16
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/PrimaryObjectSupplier.java2
8 files changed, 32 insertions, 31 deletions
diff --git a/bundles/org.eclipse.e4.core.di/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.e4.core.di/.settings/org.eclipse.jdt.ui.prefs
index 6e7d37a..5166f6a 100644
--- a/bundles/org.eclipse.e4.core.di/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.e4.core.di/.settings/org.eclipse.jdt.ui.prefs
@@ -100,6 +100,7 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=true
sp_cleanup.remove_redundant_type_arguments=false
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IBinding.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IBinding.java
index 4bf6796..33d4d04 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IBinding.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IBinding.java
@@ -13,7 +13,7 @@ package org.eclipse.e4.core.di;
/**
* Describes binding between object description and its implementation to be
* used by the dependency injection.
- *
+ *
* @see IInjector#addBinding(Class)
* @see IInjector#addBinding(IBinding)
* @noimplement This interface is not intended to be implemented by clients.
@@ -27,12 +27,12 @@ public interface IBinding {
* @param name name for this binding
* @return binding for the specified name
*/
- public IBinding named(String name);
+ IBinding named(String name);
/**
* Creates a binding for the specified class
* @param clazz class for this binding
* @return binding for the specified class
*/
- public IBinding implementedBy(Class<?> clazz);
+ IBinding implementedBy(Class<?> clazz);
}
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java
index daeb60c..a049cff 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java
@@ -60,7 +60,7 @@ public interface IInjector {
* Methods may return this to indicate that the requested object was not found
* wherever <code>null</code> can be a valid return value.
*/
- final public static Object NOT_A_VALUE = new Object();
+ Object NOT_A_VALUE = new Object();
/**
* Injects data from the supplier into a domain object. See the class comment for details on
@@ -69,7 +69,7 @@ public interface IInjector {
* @param objectSupplier primary object supplier for the injection
* @throws InjectionException if an exception occurred while performing this operation
*/
- public void inject(Object object, PrimaryObjectSupplier objectSupplier) throws InjectionException;
+ void inject(Object object, PrimaryObjectSupplier objectSupplier) throws InjectionException;
/**
* Injects data from the supplier into a domain object. See the class comment
@@ -92,7 +92,7 @@ public interface IInjector {
* if an exception occurred while performing this operation
* @since 1.7
*/
- public void inject(Object object, PrimaryObjectSupplier objectSupplier, PrimaryObjectSupplier staticSupplier)
+ void inject(Object object, PrimaryObjectSupplier objectSupplier, PrimaryObjectSupplier staticSupplier)
throws InjectionException;
/**
@@ -101,7 +101,7 @@ public interface IInjector {
* @param objectSupplier primary object supplier for the injection
* @throws InjectionException if an exception occurred while performing this operation
*/
- public void uninject(Object object, PrimaryObjectSupplier objectSupplier) throws InjectionException;
+ void uninject(Object object, PrimaryObjectSupplier objectSupplier) throws InjectionException;
/**
* Call the annotated method on an object, injecting the parameters from the supplier.
@@ -115,7 +115,7 @@ public interface IInjector {
* @return the return value of the method call, might be <code>null</code>
* @throws InjectionException if an exception occurred while performing this operation
*/
- public Object invoke(Object object, Class<? extends Annotation> qualifier, PrimaryObjectSupplier objectSupplier) throws InjectionException;
+ Object invoke(Object object, Class<? extends Annotation> qualifier, PrimaryObjectSupplier objectSupplier) throws InjectionException;
/**
* Call the annotated method on an object, injecting the parameters from the supplier.
@@ -129,7 +129,7 @@ public interface IInjector {
* @return the return value of the method call, might be <code>null</code>
* @throws InjectionException if an exception occurred while performing this operation
*/
- public Object invoke(Object object, Class<? extends Annotation> qualifier, Object defaultValue, PrimaryObjectSupplier objectSupplier) throws InjectionException;
+ Object invoke(Object object, Class<? extends Annotation> qualifier, Object defaultValue, PrimaryObjectSupplier objectSupplier) throws InjectionException;
/**
* Call the annotated method on an object, injecting the parameters from the suppliers.
@@ -144,7 +144,7 @@ public interface IInjector {
* @return the return value of the method call, might be <code>null</code>
* @throws InjectionException if an exception occurred while performing this operation
*/
- public Object invoke(Object object, Class<? extends Annotation> qualifier, Object defaultValue, PrimaryObjectSupplier objectSupplier, PrimaryObjectSupplier localSupplier) throws InjectionException;
+ Object invoke(Object object, Class<? extends Annotation> qualifier, Object defaultValue, PrimaryObjectSupplier objectSupplier, PrimaryObjectSupplier localSupplier) throws InjectionException;
/**
* Obtain an instance of the specified class and inject it with the data from the supplier.
@@ -156,7 +156,7 @@ public interface IInjector {
* @see Scope
* @see Singleton
*/
- public <T> T make(Class<T> clazz, PrimaryObjectSupplier objectSupplier) throws InjectionException;
+ <T> T make(Class<T> clazz, PrimaryObjectSupplier objectSupplier) throws InjectionException;
/**
* Obtain an instance of the specified class and inject it with the data from the supplier.
@@ -174,21 +174,21 @@ public interface IInjector {
* @see Scope
* @see Singleton
*/
- public <T> T make(Class<T> clazz, PrimaryObjectSupplier objectSupplier, PrimaryObjectSupplier staticSupplier) throws InjectionException;
+ <T> T make(Class<T> clazz, PrimaryObjectSupplier objectSupplier, PrimaryObjectSupplier staticSupplier) throws InjectionException;
/**
* Creates a binding for the specified class and adds it to the injector.
* @param clazz the class that the injector should be aware of
* @return binding for the specified class
*/
- public IBinding addBinding(Class<?> clazz);
+ IBinding addBinding(Class<?> clazz);
/**
* Adds binding to the injector.
* @param binding the binding to add to the injector
* @return the binding added to the injector
*/
- public IBinding addBinding(IBinding binding);
+ IBinding addBinding(IBinding binding);
/**
* Specifies object supplier to inject internally created objects,
@@ -197,5 +197,5 @@ public interface IInjector {
* implicitly created by this injector
* @since 1.2
*/
- public void setDefaultSupplier(PrimaryObjectSupplier objectSupplier);
+ void setDefaultSupplier(PrimaryObjectSupplier objectSupplier);
}
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/InjectionException.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/InjectionException.java
index d4d0782..c00e133 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/InjectionException.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/InjectionException.java
@@ -13,7 +13,7 @@ package org.eclipse.e4.core.di;
/**
* The exception indicates a error that occurred while performing dependency
* injection. Use {@link #getCause()} to obtain underlying exception, if any.
- *
+ *
* @since 1.7
*/
public class InjectionException extends RuntimeException {
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/ExtendedObjectSupplier.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/ExtendedObjectSupplier.java
index 7d69c49..10f9f90 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/ExtendedObjectSupplier.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/ExtendedObjectSupplier.java
@@ -25,7 +25,7 @@ import org.osgi.framework.BundleContext;
* {@link IRequestor#resolveArguments(boolean)} and
* {@link IRequestor#execute()}.
* </p>
- *
+ *
* @see IRequestor#resolveArguments(boolean)
* @see IRequestor#execute()
* @since 1.7
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IObjectDescriptor.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IObjectDescriptor.java
index e213feb..68261a0 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IObjectDescriptor.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IObjectDescriptor.java
@@ -20,7 +20,7 @@ import javax.inject.Qualifier;
* From the view point of the injector, objects are described by a type with a
* set of optional qualifiers.
* </p>
- *
+ *
* @see Qualifier
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
@@ -32,7 +32,7 @@ public interface IObjectDescriptor {
* The formal type that the objects should be assignable to.
* @return the expected object's type
*/
- public Type getDesiredType();
+ Type getDesiredType();
/**
* Use this method to find out if the object descriptor has a qualifier.
@@ -40,7 +40,7 @@ public interface IObjectDescriptor {
* @return <code>true</code> if the object descriptor has the qualifier;
* <code>false</code>otherwise
*/
- public boolean hasQualifier(Class<? extends Annotation> clazz);
+ boolean hasQualifier(Class<? extends Annotation> clazz);
/**
* Returns an instance of the qualifier, if it is present in this descriptor,
@@ -49,13 +49,13 @@ public interface IObjectDescriptor {
* @param clazz the qualifier's class
* @return the qualifier instance, if present, or <code>null</code>
*/
- public <T extends Annotation> T getQualifier(Class<T> clazz);
+ <T extends Annotation> T getQualifier(Class<T> clazz);
/**
* Returns qualifiers specified for this object descriptor, or <code>null</code>.
* @return qualifiers for this descriptor, or <code>null</code> if there are
* no qualifiers specified
*/
- public Annotation[] getQualifiers();
+ Annotation[] getQualifiers();
}
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IRequestor.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IRequestor.java
index ac41e0b..0f4418a 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IRequestor.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/IRequestor.java
@@ -24,7 +24,7 @@ import org.eclipse.e4.core.di.InjectionException;
* expected to execute requestor again when it detects change in the injected
* value).
* </p>
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
* @since 1.7
@@ -36,7 +36,7 @@ public interface IRequestor {
* @param initial <code>true</code> if this is the initial attempt to resolve arguments
* @throws InjectionException if an exception occurred while performing this task
*/
- public void resolveArguments(boolean initial) throws InjectionException;
+ void resolveArguments(boolean initial) throws InjectionException;
/**
* Call this method to perform requestor's task. This method should be called
@@ -45,33 +45,33 @@ public interface IRequestor {
* @return result of the task
* @throws InjectionException if an exception occurred while performing this task
*/
- public Object execute() throws InjectionException;
+ Object execute() throws InjectionException;
/**
* The injected object that initiated this request
* @return the object that initiated this request, may return <code>null</code>
*/
- public Object getRequestingObject();
+ Object getRequestingObject();
/**
* Class of the injected object
* @return class of the injected object, may return <code>null</code>
*/
- public Class<?> getRequestingObjectClass();
+ Class<?> getRequestingObjectClass();
/**
* Determines if this requestor is still valid. Once requestor becomes invalid, it
* stays invalid. Invalid requestors can be safely removed from computations.
* @return <code>true</code> if this requestor is valid, <code>false</code> otherwise
*/
- public boolean isValid();
+ boolean isValid();
/**
* Notifies the requestor that an object supplier has been disposed of.
* @param objectSupplier the object supplier being disposed of
* @throws InjectionException if an exception occurred while performing this task
*/
- public void disposed(PrimaryObjectSupplier objectSupplier) throws InjectionException;
+ void disposed(PrimaryObjectSupplier objectSupplier) throws InjectionException;
/**
* Notifies the requestor that an object should be un-injected.
@@ -80,5 +80,5 @@ public interface IRequestor {
* @throws InjectionException if an exception occurred while performing this task
* @return <code>true</code> if the object was uninjected, <code>false</code> otherwise
*/
- public boolean uninject(Object object, PrimaryObjectSupplier objectSupplier) throws InjectionException;
+ boolean uninject(Object object, PrimaryObjectSupplier objectSupplier) throws InjectionException;
}
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/PrimaryObjectSupplier.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/PrimaryObjectSupplier.java
index 2b2a4e8..9d715cb 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/PrimaryObjectSupplier.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/suppliers/PrimaryObjectSupplier.java
@@ -23,7 +23,7 @@ import java.lang.ref.WeakReference;
* {@link IRequestor#resolveArguments(boolean)} and
* {@link IRequestor#execute()}.
* </p>
- *
+ *
* @see IRequestor#resolveArguments(boolean)
* @see IRequestor#execute()
* @since 1.7