From ac52feb8c7e7dbc3caa69207c1df59b841a7012d Mon Sep 17 00:00:00 2001 From: Wassim Date: Mon, 30 May 2016 14:37:49 -0400 Subject: [PATCH] ust.core: making some classes final This patch is to make some classes final in ust.core component. It should be final to improve readability and since you should never extend it. It also allows the jvm to inline methods and improve performance. Change-Id: Ifa5d1e667efb3e18f5cd4a9037082469574c16c6 Signed-off-by: Wassim Reviewed-on: https://git.eclipse.org/r/73972 Reviewed-by: Hudson CI Reviewed-by: Genevieve Bastien Reviewed-by: Matthew Khouzam Tested-by: Matthew Khouzam --- .../ust/core/analysis/debuginfo/UstDebugInfoBinaryAspect.java | 2 +- .../ust/core/analysis/debuginfo/UstDebugInfoFunctionAspect.java | 2 +- .../ust/core/analysis/debuginfo/UstDebugInfoSourceAspect.java | 2 +- .../lttng2/ust/core/trace/LttngUstEventFactory.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryAspect.java b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryAspect.java index 17e26ea3dc..00f8aedb2f 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryAspect.java +++ b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryAspect.java @@ -30,7 +30,7 @@ import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils; * @author Alexandre Montplaisir * @since 2.0 */ -public class UstDebugInfoBinaryAspect implements ITmfEventAspect { +public final class UstDebugInfoBinaryAspect implements ITmfEventAspect { /** Singleton instance */ public static final UstDebugInfoBinaryAspect INSTANCE = new UstDebugInfoBinaryAspect(); diff --git a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoFunctionAspect.java b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoFunctionAspect.java index 6c73d0072a..756a983625 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoFunctionAspect.java +++ b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoFunctionAspect.java @@ -21,7 +21,7 @@ import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect; * @author Alexandre Montplaisir * @since 2.0 */ -public class UstDebugInfoFunctionAspect implements ITmfEventAspect { +public final class UstDebugInfoFunctionAspect implements ITmfEventAspect { /** Singleton instance */ public static final UstDebugInfoFunctionAspect INSTANCE = new UstDebugInfoFunctionAspect(); diff --git a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoSourceAspect.java b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoSourceAspect.java index 98c0fd4a48..416f8d38f4 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoSourceAspect.java +++ b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoSourceAspect.java @@ -29,7 +29,7 @@ import com.google.common.collect.Iterables; * @author Alexandre Montplaisir * @since 2.0 */ -public class UstDebugInfoSourceAspect implements ITmfEventAspect { +public final class UstDebugInfoSourceAspect implements ITmfEventAspect { /** Singleton instance */ public static final UstDebugInfoSourceAspect INSTANCE = new UstDebugInfoSourceAspect(); diff --git a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/trace/LttngUstEventFactory.java b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/trace/LttngUstEventFactory.java index bfc658016e..43454a4656 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/trace/LttngUstEventFactory.java +++ b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/trace/LttngUstEventFactory.java @@ -27,7 +27,7 @@ import org.eclipse.tracecompass.tmf.ctf.core.trace.CtfTmfTrace; * @author Alexandre Montplaisir * @since 2.0 */ -public class LttngUstEventFactory extends CtfTmfEventFactory { +public final class LttngUstEventFactory extends CtfTmfEventFactory { private static final @NonNull LttngUstEventFactory INSTANCE = new LttngUstEventFactory(); -- 2.34.1