From: Daniel Kirschten Date: Sun, 30 Jun 2019 15:44:21 +0000 (+0200) Subject: Replaced static factory method with constructor X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=9cacd4cb7224e737acd1c6fde1342e254f900570;hp=e11f5b071bf577e92c125e1b6b45ee09f80de861;p=Mograsim.git Replaced static factory method with constructor --- diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java index 6062aff4..339d4f57 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java @@ -41,6 +41,6 @@ public class TextComponent extends GUIComponent static { - ViewLogicModelAdapter.addComponentAdapter(NoLogicAdapter.forClass(TextComponent.class)); + ViewLogicModelAdapter.addComponentAdapter(new NoLogicAdapter<>(TextComponent.class)); } } diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/modeladapter/componentadapters/NoLogicAdapter.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/modeladapter/componentadapters/NoLogicAdapter.java index 92742d31..d922c61e 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/modeladapter/componentadapters/NoLogicAdapter.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/modeladapter/componentadapters/NoLogicAdapter.java @@ -33,14 +33,4 @@ public class NoLogicAdapter implements ComponentAdapter< { // do nothing } - - /** - * Creates a new {@link NoLogicAdapter} for the given GUIComponent class. - * - * @author Christian Femers - */ - public static NoLogicAdapter forClass(Class guiComponentClass) - { - return new NoLogicAdapter<>(guiComponentClass); - } }