From 5bb6643b25a11e4ed4f19b5a52101f0f6c54e3ce Mon Sep 17 00:00:00 2001 From: Carlos Amengual Date: Thu, 20 Jun 2024 18:23:40 +0200 Subject: [PATCH] Remove a few redundant interface usages --- .../java/io/sf/carte/echosvg/anim/dom/AbstractElement.java | 3 +-- .../sf/carte/echosvg/anim/dom/AbstractSVGAnimatedLength.java | 3 +-- .../main/java/io/sf/carte/echosvg/dom/svg/SVGPathSegItem.java | 2 +- .../java/io/sf/carte/echosvg/svggen/DefaultImageHandler.java | 4 +--- .../main/java/io/sf/carte/echosvg/svggen/SVGGraphics2D.java | 2 +- .../main/java/io/sf/carte/echosvg/svggen/font/SVGFont.java | 3 +-- .../echosvg/ext/awt/image/codec/util/ImageEncodeParam.java | 4 +--- 7 files changed, 7 insertions(+), 14 deletions(-) diff --git a/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractElement.java b/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractElement.java index 173bf011f..e37f5e86d 100644 --- a/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractElement.java +++ b/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractElement.java @@ -27,7 +27,6 @@ import io.sf.carte.echosvg.css.engine.CSSNavigableNode; import io.sf.carte.echosvg.dom.AbstractAttr; import io.sf.carte.echosvg.dom.AbstractDocument; -import io.sf.carte.echosvg.dom.events.NodeEventTarget; import io.sf.carte.echosvg.dom.svg.LiveAttributeValue; import io.sf.carte.echosvg.util.DoublyIndexedTable; import io.sf.carte.echosvg.util.SVGConstants; @@ -41,7 +40,7 @@ * @version $Id$ */ public abstract class AbstractElement extends io.sf.carte.echosvg.dom.AbstractElement - implements NodeEventTarget, CSSNavigableNode, SVGConstants { + implements CSSNavigableNode, SVGConstants { private static final long serialVersionUID = 1L; diff --git a/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractSVGAnimatedLength.java b/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractSVGAnimatedLength.java index 69a6f5d35..f41ef084d 100644 --- a/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractSVGAnimatedLength.java +++ b/echosvg-anim/src/main/java/io/sf/carte/echosvg/anim/dom/AbstractSVGAnimatedLength.java @@ -26,7 +26,6 @@ import io.sf.carte.echosvg.anim.values.AnimatableLengthValue; import io.sf.carte.echosvg.anim.values.AnimatableValue; import io.sf.carte.echosvg.dom.svg.LiveAttributeException; -import io.sf.carte.echosvg.dom.svg.LiveAttributeValue; import io.sf.carte.echosvg.parser.UnitProcessor; /** @@ -38,7 +37,7 @@ * @version $Id$ */ public abstract class AbstractSVGAnimatedLength extends AbstractSVGAnimatedValue - implements SVGAnimatedLength, LiveAttributeValue { + implements SVGAnimatedLength { /** * This constant represents horizontal lengths. diff --git a/echosvg-svg-dom/src/main/java/io/sf/carte/echosvg/dom/svg/SVGPathSegItem.java b/echosvg-svg-dom/src/main/java/io/sf/carte/echosvg/dom/svg/SVGPathSegItem.java index b3a6aa459..d3bf3d848 100644 --- a/echosvg-svg-dom/src/main/java/io/sf/carte/echosvg/dom/svg/SVGPathSegItem.java +++ b/echosvg-svg-dom/src/main/java/io/sf/carte/echosvg/dom/svg/SVGPathSegItem.java @@ -24,7 +24,7 @@ /** * Internal representation of the item SVGPathSeg. */ -public class SVGPathSegItem extends AbstractSVGItem implements SVGPathSeg, SVGPathSegClosePath { +public class SVGPathSegItem extends AbstractSVGItem implements SVGPathSegClosePath { protected short type; diff --git a/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/DefaultImageHandler.java b/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/DefaultImageHandler.java index 24321fbdf..9e8353eea 100644 --- a/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/DefaultImageHandler.java +++ b/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/DefaultImageHandler.java @@ -24,8 +24,6 @@ import org.w3c.dom.Element; -import io.sf.carte.echosvg.constants.XMLConstants; - /** * This class provides a default implementation of the ImageHandler interface * simply puts a place holder in the xlink:href attribute and sets the width and @@ -36,7 +34,7 @@ * @version $Id$ * @see io.sf.carte.echosvg.svggen.SVGGraphics2D */ -public class DefaultImageHandler implements ImageHandler, ErrorConstants, XMLConstants { +public class DefaultImageHandler implements ImageHandler, ErrorConstants { /** * Build a DefaultImageHandler. diff --git a/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/SVGGraphics2D.java b/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/SVGGraphics2D.java index dc5faff7a..ce27597c6 100644 --- a/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/SVGGraphics2D.java +++ b/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/SVGGraphics2D.java @@ -88,7 +88,7 @@ * @see io.sf.carte.echosvg.svggen.ExtensionHandler * @see org.w3c.dom.Document */ -public class SVGGraphics2D extends AbstractGraphics2D implements Cloneable, SVGSyntax, ErrorConstants { +public class SVGGraphics2D extends AbstractGraphics2D implements SVGSyntax, ErrorConstants { /* * Constants definitions diff --git a/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/font/SVGFont.java b/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/font/SVGFont.java index f444c4428..86a0247ed 100644 --- a/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/font/SVGFont.java +++ b/echosvg-svggen/src/main/java/io/sf/carte/echosvg/svggen/font/SVGFont.java @@ -24,7 +24,6 @@ import java.util.HashSet; import java.util.Set; -import io.sf.carte.echosvg.constants.XMLConstants; import io.sf.carte.echosvg.svggen.font.table.CmapFormat; import io.sf.carte.echosvg.svggen.font.table.Feature; import io.sf.carte.echosvg.svggen.font.table.FeatureTags; @@ -47,7 +46,7 @@ * @version $Id$ * @author David Schweinsberg */ -public class SVGFont implements XMLConstants, SVGConstants, ScriptTags, FeatureTags { +public class SVGFont implements SVGConstants, ScriptTags, FeatureTags { static final String EOL; static final String PROPERTY_LINE_SEPARATOR = "line.separator"; diff --git a/echosvg-transcoder/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/util/ImageEncodeParam.java b/echosvg-transcoder/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/util/ImageEncodeParam.java index 0c85b9b2f..e21353250 100644 --- a/echosvg-transcoder/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/util/ImageEncodeParam.java +++ b/echosvg-transcoder/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/util/ImageEncodeParam.java @@ -18,8 +18,6 @@ */ package io.sf.carte.echosvg.ext.awt.image.codec.util; -import java.io.Serializable; - /** * An empty (marker) interface to be implemented by all image encoder parameter * classes. @@ -31,5 +29,5 @@ * @author For later modifications, see Git history. * @version $Id$ */ -public interface ImageEncodeParam extends ImageDecodeParam, Cloneable, Serializable { +public interface ImageEncodeParam extends ImageDecodeParam { }