diff options
author | Henri Sara <hesara@vaadin.com> | 2012-06-20 16:27:32 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-06-20 17:11:22 +0300 |
commit | 0f8f9d32e0584743c858afeec12e57dedf0a5f71 (patch) | |
tree | a8b48262f3caefdbd775f2f0156ef70d8d9a886b /src/com/vaadin/event | |
parent | 7d35229b0020bedb854db7eeca548f543dbadb63 (diff) | |
download | vaadin-framework-0f8f9d32e0584743c858afeec12e57dedf0a5f71.tar.gz vaadin-framework-0f8f9d32e0584743c858afeec12e57dedf0a5f71.zip |
Eliminate scanning for accept criteria by reversed annotation (#8641)
The new annotation is called AcceptCriterion and is on the client side
class, pointing to the server side implementation.
This change also addresses #5956 (avoid loading classes when scanning -
no more scanning for criteria) and #6750 (logging).
Diffstat (limited to 'src/com/vaadin/event')
10 files changed, 0 insertions, 46 deletions
diff --git a/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java b/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java index 87193e8b3e..52ffab9263 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java +++ b/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java @@ -7,7 +7,6 @@ package com.vaadin.event.dd.acceptcriteria; import com.vaadin.event.dd.DragAndDropEvent; -import com.vaadin.terminal.gwt.client.ui.dd.VAcceptAll; /** * Criterion that accepts all drops anywhere on the component. @@ -18,7 +17,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VAcceptAll; * @since 6.3 * */ -@ClientCriterion(VAcceptAll.class) public final class AcceptAll extends ClientSideCriterion { private static final long serialVersionUID = 7406683402153141461L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/And.java b/src/com/vaadin/event/dd/acceptcriteria/And.java index 89c8cb377b..a0340a9cdb 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/And.java +++ b/src/com/vaadin/event/dd/acceptcriteria/And.java @@ -19,7 +19,6 @@ import com.vaadin.terminal.PaintTarget; * @since 6.3 * */ -@ClientCriterion(com.vaadin.terminal.gwt.client.ui.dd.VAnd.class) public class And extends ClientSideCriterion { private static final long serialVersionUID = -5242574480825471748L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/ClientCriterion.java b/src/com/vaadin/event/dd/acceptcriteria/ClientCriterion.java deleted file mode 100644 index 8b64106be7..0000000000 --- a/src/com/vaadin/event/dd/acceptcriteria/ClientCriterion.java +++ /dev/null @@ -1,29 +0,0 @@ -/* -@VaadinApache2LicenseForJavaFiles@ - */ -package com.vaadin.event.dd.acceptcriteria; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterion; - -/** - * An annotation type used to point the client side counterpart for server side - * a {@link AcceptCriterion} class. - * <p> - * Annotations are used at GWT compilation phase, so remember to rebuild your - * widgetset if you do changes for {@link ClientCriterion} mappings. - * - * @since 6.3 - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface ClientCriterion { - /** - * @return the client side counterpart for the annotated criterion - */ - Class<? extends VAcceptCriterion> value(); -} diff --git a/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java b/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java index 298a50a1d5..7eb04d9647 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java +++ b/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java @@ -10,7 +10,6 @@ import com.vaadin.event.Transferable; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VContainsDataFlavor; /** * A Criterion that checks whether {@link Transferable} contains given data @@ -19,7 +18,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VContainsDataFlavor; * * @since 6.3 */ -@ClientCriterion(VContainsDataFlavor.class) public class ContainsDataFlavor extends ClientSideCriterion { private String dataFlavorId; diff --git a/src/com/vaadin/event/dd/acceptcriteria/Not.java b/src/com/vaadin/event/dd/acceptcriteria/Not.java index 774dcc642e..85ff7e9bc9 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/Not.java +++ b/src/com/vaadin/event/dd/acceptcriteria/Not.java @@ -9,7 +9,6 @@ package com.vaadin.event.dd.acceptcriteria; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VNot; /** * Criterion that wraps another criterion and inverts its return value. @@ -17,7 +16,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VNot; * @since 6.3 * */ -@ClientCriterion(VNot.class) public class Not extends ClientSideCriterion { private static final long serialVersionUID = 1131422338558613244L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/Or.java b/src/com/vaadin/event/dd/acceptcriteria/Or.java index 2e7cdf45a3..077e9114d8 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/Or.java +++ b/src/com/vaadin/event/dd/acceptcriteria/Or.java @@ -9,7 +9,6 @@ package com.vaadin.event.dd.acceptcriteria; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VOr; /** * A compound criterion that accepts the drag if any of its criterion accepts @@ -20,7 +19,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VOr; * @since 6.3 * */ -@ClientCriterion(VOr.class) public class Or extends ClientSideCriterion { private static final long serialVersionUID = 1L; private AcceptCriterion criteria[]; diff --git a/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java b/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java index b3f4702c51..77840bc94f 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java +++ b/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java @@ -8,7 +8,6 @@ import java.io.Serializable; import com.vaadin.event.Transferable; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VServerAccept; /** * Parent class for criteria which are verified on the server side during a drag @@ -27,7 +26,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VServerAccept; * * @since 6.3 */ -@ClientCriterion(VServerAccept.class) public abstract class ServerSideCriterion implements Serializable, AcceptCriterion { diff --git a/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java b/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java index 62bf64f76c..d7c47dc915 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java +++ b/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java @@ -13,7 +13,6 @@ import com.vaadin.event.TransferableImpl; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VDragSourceIs; import com.vaadin.ui.Component; /** @@ -23,7 +22,6 @@ import com.vaadin.ui.Component; * @since 6.3 */ @SuppressWarnings("serial") -@ClientCriterion(VDragSourceIs.class) public class SourceIs extends ClientSideCriterion { private Component[] components; diff --git a/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java b/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java index 8303809140..454159b3da 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java +++ b/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java @@ -10,7 +10,6 @@ import com.vaadin.event.Transferable; import com.vaadin.event.TransferableImpl; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DropTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VSourceIsTarget; import com.vaadin.ui.Component; import com.vaadin.ui.Table; import com.vaadin.ui.Tree; @@ -26,7 +25,6 @@ import com.vaadin.ui.Tree; * @since 6.3 * */ -@ClientCriterion(VSourceIsTarget.class) public class SourceIsTarget extends ClientSideCriterion { private static final long serialVersionUID = -451399314705532584L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java b/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java index 25371938d2..641fddc3ea 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java +++ b/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java @@ -10,7 +10,6 @@ import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.TargetDetails; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VTargetDetailIs; /** * Criterion for checking if drop target details contains the specific property @@ -21,7 +20,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VTargetDetailIs; * TODO add support for other basic data types that we support in UIDL. * */ -@ClientCriterion(VTargetDetailIs.class) public class TargetDetailIs extends ClientSideCriterion { private static final long serialVersionUID = 763165450054331246L; |