mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3b31e69e28
Summary: Changelog: [General] [Fixed] - License header cleanup Reviewed By: yungsters Differential Revision: D17952694 fbshipit-source-id: 17c87de7ebb271fa2ac8d00af72a4d1addef8bd0
65 lines
1.3 KiB
Java
65 lines
1.3 KiB
Java
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
package com.facebook.systrace;
|
|
|
|
/** Systrace stub. */
|
|
public final class SystraceMessage {
|
|
|
|
private static final Builder NOOP_BUILDER = new NoopBuilder();
|
|
|
|
public static Builder beginSection(long tag, String sectionName) {
|
|
return NOOP_BUILDER;
|
|
}
|
|
|
|
public static Builder endSection(long tag) {
|
|
return NOOP_BUILDER;
|
|
}
|
|
|
|
public abstract static class Builder {
|
|
|
|
public abstract void flush();
|
|
|
|
public abstract Builder arg(String key, Object value);
|
|
|
|
public abstract Builder arg(String key, int value);
|
|
|
|
public abstract Builder arg(String key, long value);
|
|
|
|
public abstract Builder arg(String key, double value);
|
|
}
|
|
|
|
private interface Flusher {
|
|
void flush(StringBuilder builder);
|
|
}
|
|
|
|
private static class NoopBuilder extends Builder {
|
|
@Override
|
|
public void flush() {}
|
|
|
|
@Override
|
|
public Builder arg(String key, Object value) {
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public Builder arg(String key, int value) {
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public Builder arg(String key, long value) {
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public Builder arg(String key, double value) {
|
|
return this;
|
|
}
|
|
}
|
|
}
|