Java 类com.facebook.proguard.annotations.DoNotStrip 实例源码

项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
@DoNotStrip
@Override
public <T> Future<T> callOnQueue(final Callable<T> callable) {
  final SimpleSettableFuture<T> future = new SimpleSettableFuture<>();
  runOnQueue(
      new Runnable() {
        @Override
        public void run() {
          try {
            future.set(callable.call());
          } catch (Exception e) {
            future.setException(e);
          }
        }
      });
  return future;
}
项目:RNLearn_Project1    文件:JavaModuleWrapper.java   
@DoNotStrip
public NativeArray getConstants() {
  BaseJavaModule baseJavaModule = getModule();
  ReactMarker.logMarker(GET_CONSTANTS_START, getName());
  SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "Map constants")
    .arg("moduleName", getName())
    .flush();
  Map<String, Object> map = baseJavaModule.getConstants();
  Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);

  SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "WritableNativeMap constants")
    .arg("moduleName", getName())
    .flush();
  ReactMarker.logMarker(CONVERT_CONSTANTS_START, getName());
  WritableNativeMap writableNativeMap;
  try {
    writableNativeMap = Arguments.makeNativeMap(map);
  } finally {
    Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
  }
  WritableNativeArray array = new WritableNativeArray();
  array.pushMap(writableNativeMap);
  ReactMarker.logMarker(CONVERT_CONSTANTS_END);
  ReactMarker.logMarker(GET_CONSTANTS_END);
  return array;
}
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
@DoNotStrip
@Override
public <T> Future<T> callOnQueue(final Callable<T> callable) {
  final SimpleSettableFuture<T> future = new SimpleSettableFuture<>();
  runOnQueue(
      new Runnable() {
        @Override
        public void run() {
          try {
            future.set(callable.call());
          } catch (Exception e) {
            future.setException(e);
          }
        }
      });
  return future;
}
项目:RNLearn_Project1    文件:JavaModuleWrapper.java   
@DoNotStrip
public List<MethodDescriptor> getMethodDescriptors() {
  ArrayList<MethodDescriptor> descs = new ArrayList<>();
  for (Map.Entry<String, NativeModule.NativeMethod> entry :
        getModule().getMethods().entrySet()) {
    MethodDescriptor md = new MethodDescriptor();
    md.name = entry.getKey();
    md.type = entry.getValue().getType();

    BaseJavaModule.JavaMethod method = (BaseJavaModule.JavaMethod) entry.getValue();
    if (md.type == BaseJavaModule.METHOD_TYPE_SYNC) {
      md.signature = method.getSignature();
      md.method = method.getMethod();
    }
    mMethods.add(method);

    descs.add(md);
  }
  return descs;
}
项目:RNLearn_Project1    文件:MapIteratorHelper.java   
/**
 * Moves the helper to the next entry in the map, if any.  Returns true iff
 * there is an entry to read.
 */
@DoNotStrip
boolean hasNext() {
  if (mIterator.hasNext()) {
    Map.Entry entry = mIterator.next();
    mKey = entry.getKey();
    mValue = entry.getValue();
    return true;
  } else {
    mKey = null;
    mValue = null;
    return false;
  }
}
项目:RNLearn_Project1    文件:YogaMeasureFunction.java   
/**
 * Return a value created by YogaMeasureOutput.make(width, height);
 */
@DoNotStrip
long measure(
    YogaNode node,
    float width,
    YogaMeasureMode widthMode,
    float height,
    YogaMeasureMode heightMode);
项目:RNLearn_Project1    文件:YogaNode.java   
@DoNotStrip
public final long measure(float width, int widthMode, float height, int heightMode) {
  if (!isMeasureDefined()) {
    throw new RuntimeException("Measure function isn't defined!");
  }

  return mMeasureFunction.measure(
        this,
        width,
        YogaMeasureMode.fromInt(widthMode),
        height,
        YogaMeasureMode.fromInt(heightMode));
}
项目:RNLearn_Project1    文件:MessageQueueThreadRegistry.java   
/**
 * @return the MessageQueueThread that owns the current Thread.
 */
@DoNotStrip
public static MessageQueueThread myMessageQueueThread() {
  return Assertions.assertNotNull(
      sMyMessageQueueThread.get(),
      "This thread doesn't have a MessageQueueThread registered to it!");
}
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
/**
 * Runs the given Runnable on this Thread. It will be submitted to the end of the event queue even
 * if it is being submitted from the same queue Thread.
 */
@DoNotStrip
@Override
public void runOnQueue(Runnable runnable) {
  if (mIsFinished) {
    FLog.w(
        ReactConstants.TAG,
        "Tried to enqueue runnable on already finished thread: '" + getName() +
            "... dropping Runnable.");
  }
  mHandler.post(runnable);
}
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
/**
 * Runs the given Runnable on this Thread. It will be submitted to the end of the event queue even
 * if it is being submitted from the same queue Thread.
 */
@DoNotStrip
@Override
public void runOnQueue(Runnable runnable) {
  if (mIsFinished) {
    FLog.w(
        ReactConstants.TAG,
        "Tried to enqueue runnable on already finished thread: '" + getName() +
            "... dropping Runnable.");
  }
  mHandler.post(runnable);
}
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
/**
 * Asserts {@link #isOnThread()}, throwing a {@link AssertionException} (NOT an
 * {@link AssertionError}) if the assertion fails.
 */
@DoNotStrip
@Override
public void assertIsOnThread(String message) {
  SoftAssertions.assertCondition(
    isOnThread(),
    new StringBuilder().append(mAssertionErrorMessage).append(" ").append(message).toString());
}
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
/**
 * Quits this queue's Looper. If that Looper was running on a different Thread than the current
 * Thread, also waits for the last message being processed to finish and the Thread to die.
 */
@DoNotStrip
@Override
public void quitSynchronous() {
  mIsFinished = true;
  mLooper.quit();
  if (mLooper.getThread() != Thread.currentThread()) {
    try {
      mLooper.getThread().join();
    } catch (InterruptedException e) {
      throw new RuntimeException("Got interrupted waiting to join thread " + mName);
    }
  }
}
项目:RNLearn_Project1    文件:JavaModuleWrapper.java   
@DoNotStrip
private void findMethods() {
  Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "findMethods");
  Set<String> methodNames = new HashSet<>();

  Method[] targetMethods = mModuleClass.getDeclaredMethods();
  for (Method targetMethod : targetMethods) {
    ReactMethod annotation = targetMethod.getAnnotation(ReactMethod.class);
    if (annotation != null) {
      String methodName = targetMethod.getName();
      if (methodNames.contains(methodName)) {
        // We do not support method overloading since js sees a function as an object regardless
        // of number of params.
        throw new IllegalArgumentException(
          "Java Module " + getName() + " method name already registered: " + methodName);
      }
      MethodDescriptor md = new MethodDescriptor();
      JavaMethodWrapper method = new JavaMethodWrapper(this, targetMethod, annotation.isBlockingSynchronousMethod());
      md.name = methodName;
      md.type = method.getType();
      if (md.type == BaseJavaModule.METHOD_TYPE_SYNC) {
        md.signature = method.getSignature();
        md.method = targetMethod;
      }
      mMethods.add(method);
      mDescs.add(md);
    }
  }
  Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
}
项目:RNLearn_Project1    文件:JavaModuleWrapper.java   
@DoNotStrip
public @Nullable NativeArray getConstants() {
  if (!mModuleHolder.getHasConstants()) {
    return null;
  }
  BaseJavaModule baseJavaModule = getModule();
  ReactMarker.logMarker(GET_CONSTANTS_START, getName());
  SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "Map constants")
    .arg("moduleName", getName())
    .flush();
  Map<String, Object> map = baseJavaModule.getConstants();
  Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);

  SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "WritableNativeMap constants")
    .arg("moduleName", getName())
    .flush();
  ReactMarker.logMarker(CONVERT_CONSTANTS_START, getName());
  WritableNativeMap writableNativeMap;
  try {
    writableNativeMap = Arguments.makeNativeMap(map);
  } finally {
    Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
  }
  WritableNativeArray array = new WritableNativeArray();
  array.pushMap(writableNativeMap);
  ReactMarker.logMarker(CONVERT_CONSTANTS_END);
  ReactMarker.logMarker(GET_CONSTANTS_END);
  return array;
}
项目:RNLearn_Project1    文件:JavaModuleWrapper.java   
@DoNotStrip
public void invoke(ExecutorToken token, int methodId, ReadableNativeArray parameters) {
  if (mMethods == null || methodId >= mMethods.size()) {
    return;
  }

  mMethods.get(methodId).invoke(mJSInstance, token, parameters);
}
项目:RNLearn_Project1    文件:MapIteratorHelper.java   
/**
 * Moves the helper to the next entry in the map, if any.  Returns true iff
 * there is an entry to read.
 */
@DoNotStrip
boolean hasNext() {
  if (mIterator.hasNext()) {
    Map.Entry entry = mIterator.next();
    mKey = entry.getKey();
    mValue = entry.getValue();
    return true;
  } else {
    mKey = null;
    mValue = null;
    return false;
  }
}
项目:RNLearn_Project1    文件:YogaMeasureFunction.java   
/**
 * Return a value created by YogaMeasureOutput.make(width, height);
 */
@DoNotStrip
long measure(
    YogaNodeAPI node,
    float width,
    YogaMeasureMode widthMode,
    float height,
    YogaMeasureMode heightMode);
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
/**
 * Quits this queue's Looper. If that Looper was running on a different Thread than the current
 * Thread, also waits for the last message being processed to finish and the Thread to die.
 */
@DoNotStrip
@Override
public void quitSynchronous() {
  mIsFinished = true;
  mLooper.quit();
  if (mLooper.getThread() != Thread.currentThread()) {
    try {
      mLooper.getThread().join();
    } catch (InterruptedException e) {
      throw new RuntimeException("Got interrupted waiting to join thread " + mName);
    }
  }
}
项目:RNLearn_Project1    文件:YogaNode.java   
@DoNotStrip
public final long measure(float width, int widthMode, float height, int heightMode) {
  if (!isMeasureDefined()) {
    throw new RuntimeException("Measure function isn't defined!");
  }

  return mMeasureFunction.measure(
        this,
        width,
        YogaMeasureMode.fromInt(widthMode),
        height,
        YogaMeasureMode.fromInt(heightMode));
}
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
/**
 * Asserts {@link #isOnThread()}, throwing a {@link AssertionException} (NOT an
 * {@link AssertionError}) if the assertion fails.
 */
@DoNotStrip
@Override
public void assertIsOnThread(String message) {
  SoftAssertions.assertCondition(
    isOnThread(),
    new StringBuilder().append(mAssertionErrorMessage).append(" ").append(message).toString());
}
项目:RNLearn_Project1    文件:JavaModuleWrapper.java   
@DoNotStrip
public void invoke(ExecutorToken token, int methodId, ReadableNativeArray parameters) {
  if (mMethods == null || methodId >= mMethods.size()) {
    return;
  }

  mMethods.get(methodId).invoke(mJSInstance, token, parameters);
}
项目:RNLearn_Project1    文件:ModuleHolder.java   
@DoNotStrip
public synchronized NativeModule getModule() {
  if (mModule == null) {
    mModule = create();
  }
  return mModule;
}
项目:TPlayer    文件:CppSystemErrorException.java   
@DoNotStrip
public CppSystemErrorException(String message, int errorCode) {
  super(message);
  this.errorCode = errorCode;
}
项目:TPlayer    文件:UnknownCppException.java   
@DoNotStrip
public UnknownCppException() {
  super("Unknown");
}
项目:TPlayer    文件:UnknownCppException.java   
@DoNotStrip
public UnknownCppException(String message) {
  super(message);
}
项目:TPlayer    文件:CppException.java   
@DoNotStrip
public CppException(String message) {
  super(message);
}
项目:RNLearn_Project1    文件:UnknownCppException.java   
@DoNotStrip
public UnknownCppException() {
  super("Unknown");
}
项目:RNLearn_Project1    文件:IteratorHelper.java   
@DoNotStrip
public IteratorHelper(Iterator iterator) {
  mIterator = iterator;
}
项目:RNLearn_Project1    文件:IteratorHelper.java   
@DoNotStrip
public IteratorHelper(Iterable iterable) {
  mIterator = iterable.iterator();
}
项目:RNLearn_Project1    文件:JavaModuleWrapper.java   
@DoNotStrip
public boolean supportsWebWorkers() {
  return getModule().supportsWebWorkers();
}
项目:RNLearn_Project1    文件:MapIteratorHelper.java   
@DoNotStrip
public MapIteratorHelper(Map map) {
  mIterator = map.entrySet().iterator();
}
项目:RNLearn_Project1    文件:MessageQueueThreadImpl.java   
/**
 * @return whether the current Thread is also the Thread associated with this MessageQueueThread.
 */
@DoNotStrip
@Override
public boolean isOnThread() {
  return mLooper.getThread() == Thread.currentThread();
}
项目:RNLearn_Project1    文件:YogaValue.java   
@DoNotStrip
YogaValue(float value, int unit) {
  this(value, YogaUnit.fromInt(unit));
}
项目:RNLearn_Project1    文件:YogaNode.java   
@DoNotStrip
public final float baseline(float width, float height) {
  return mBaselineFunction.baseline(this, width, height);
}
项目:RNLearn_Project1    文件:Systrace.java   
@DoNotStrip
void setEnabled(boolean enabled);
项目:RNLearn_Project1    文件:CppException.java   
@DoNotStrip
public CppException(String message) {
  super(message);
}
项目:RNLearn_Project1    文件:JavaJSExecutor.java   
@DoNotStrip
void setGlobalVariable(String propertyName, String jsonEncodedValue);
项目:RNLearn_Project1    文件:UnexpectedNativeTypeException.java   
@DoNotStrip
public UnexpectedNativeTypeException(String msg) {
  super(msg);
}
项目:RNLearn_Project1    文件:ExecutorToken.java   
@DoNotStrip
private ExecutorToken(HybridData hybridData) {
  mHybridData = hybridData;
}
项目:RNLearn_Project1    文件:CatalystInstance.java   
@Override @DoNotStrip
void invokeCallback(
    ExecutorToken executorToken,
    int callbackID,
    NativeArray arguments);