Tabnine Logo
com.lody.virtual.helper.utils
Code IndexAdd Tabnine to your IDE (free)

How to use com.lody.virtual.helper.utils

Best Java code snippets using com.lody.virtual.helper.utils (Showing top 20 results out of 315)

origin: android-hacker/VirtualXposed

/**
 * @param name name
 * @param <T>  type
 * @return object
 * @throws ReflectException
 */
public <T> T get(String name) throws ReflectException {
  return field(name).get();
}
origin: android-hacker/VirtualXposed

public static <T> T getFirstParam(Object[] args, Class<T> tClass) {
  if (args == null) {
    return null;
  }
  int index = ArrayUtils.indexOfFirst(args, tClass);
  if (index != -1) {
    return (T) args[index];
  }
  return null;
}
origin: android-hacker/VirtualXposed

public static FileLock getInstance() {
  if (singleton == null) {
    singleton = new FileLock();
  }
  return singleton;
}
origin: android-hacker/VirtualXposed

private static Reflect on(Constructor<?> constructor, Object... args) throws ReflectException {
  try {
    return on(accessible(constructor).newInstance(args));
  } catch (Exception e) {
    throw new ReflectException(e);
  }
}
origin: android-hacker/VirtualXposed

/**
 * 根据指定的类名构建反射工具类
 *
 * @param name 类的全名
 * @return 反射工具类
 * @throws ReflectException 如果反射出现意外
 * @see #on(Class)
 */
public static Reflect on(String name) throws ReflectException {
  return on(forName(name));
}
origin: android-hacker/VirtualXposed

private void cleanUpResidualFiles(PackageSetting ps) {
  VLog.w(TAG, "cleanUpResidualFiles: " + ps.packageName);
  File dataAppDir = VEnvironment.getDataAppPackageDirectory(ps.packageName);
  FileUtils.deleteDir(dataAppDir);
  // We shouldn't remove user data here!!! Just remove the package.
  // for (int userId : VUserManagerService.get().getUserIds()) {
  //     FileUtils.deleteDir(VEnvironment.getDataUserPackageDirectory(userId, ps.packageName));
  // }
}
origin: android-hacker/VirtualXposed

public XmlSerializer text(char[] buf, int start, int len) throws IOException,
    IllegalArgumentException, IllegalStateException {
  if (mInTag) {
    append(">");
    mInTag = false;
  }
  escapeAndAppendString(buf, start, len);
  if (mIndent) {
    mLineStart = buf[start+len-1] == '\n';
  }
  return this;
}
origin: android-hacker/VirtualXposed

/**
 * 取得内部维护的对象.
 */
private static Object unwrap(Object object) {
  if (object instanceof Reflect) {
    return ((Reflect) object).get();
  }
  return object;
}
origin: android-hacker/VirtualXposed

/**
 * 调用指定的无参数方法
 *
 * @param name
 * @return
 * @throws ReflectException
 */
public Reflect call(String name) throws ReflectException {
  return call(name, new Object[0]);
}
origin: android-hacker/VirtualXposed

/**
 * Wrap an object.
 * <p>
 * Use this when you want to access instance fields and methods on any
 * {@link Object}
 *
 * @param object The object to be wrapped
 * @return A wrapped object, to be used for further reflection.
 */
public static Reflect on(Object object) {
  return new Reflect(object);
}
origin: android-hacker/VirtualXposed

private void append(char c) throws IOException {
  int pos = mPos;
  if (pos >= (BUFFER_LEN-1)) {
    flush();
    pos = mPos;
  }
  mText[pos] = c;
  mPos = pos+1;
}
origin: android-hacker/VirtualXposed

/**
 * 创建一个实例通过默认构造器
 *
 * @return Reflect
 * @throws ReflectException
 */
public Reflect create() throws ReflectException {
  return create(new Object[0]);
}
origin: android-hacker/VirtualXposed

public boolean exists(int userId) {
  synchronized (mPackagesLock) {
    return ArrayUtils.contains(mUserIds, userId);
  }
}
origin: android-hacker/VirtualXposed

  public final T get() {
    synchronized (this) {
      if (mInstance == null) {
        mInstance = create();
      }
      return mInstance;
    }
  }
}
origin: android-hacker/VirtualXposed

public static <T> boolean contains(T[] array, T value) {
  return indexOf(array, value) != -1;
}
public static boolean contains(int[] array, int value) {
origin: android-hacker/VirtualXposed

private static String bufferToHex(byte bytes[]) {
  return bufferToHex(bytes, 0, bytes.length);
}
private static String bufferToHex(byte bytes[], int m, int n) {
origin: android-hacker/VirtualXposed

@Override
public String getMethodName() {
  // return "setComponentEnabledSetting";
  // anti-virus, fuck ESET-NOD32: a variant of Android/AdDisplay.AdLock.AL potentially unwanted
  return EncodeUtils.decode("c2V0Q29tcG9uZW50RW5hYmxlZFNldHRpbmc=");
}
origin: android-hacker/VirtualXposed

/**
 * 从指定的类加载起寻找类,并构建反射工具类
 *
 * @param name        类的全名
 * @param classLoader 需要构建工具类的类的类加载器 loaded.
 * @return 反射工具类
 * @throws ReflectException 如果反射出现意外
 * @see #on(Class)
 */
public static Reflect on(String name, ClassLoader classLoader) throws ReflectException {
  return on(forName(name, classLoader));
}
origin: android-hacker/VirtualXposed

@SuppressWarnings("unchecked")
public static <T> T getFirst(Object[] args, Class<?> clazz) {
  int index = indexOfFirst(args, clazz);
  if (index != -1) {
    return (T) args[index];
  }
  return null;
}
origin: android-hacker/VirtualXposed

/**
 * 根据指定的类构建反射工具类
 * <p>
 * 当你需要访问静态字段的时候本方法适合你, 你还可以通过调用 {@link #create(Object...)} 创建一个对象.
 *
 * @param clazz 需要构建反射工具类的类
 * @return 反射工具类
 */
public static Reflect on(Class<?> clazz) {
  return new Reflect(clazz);
}
com.lody.virtual.helper.utils

Most used classes

  • Reflect
    一个拥有流畅特性(Fluent-API)的反射工具类, 使用起来就像直接调用一样流畅易懂.
  • VLog
  • FileUtils
  • ArrayUtils
  • AtomicFile
    Static library support version of the framework's android.util.AtomicFile, a helper class for perfor
  • ClassUtils,
  • ComponentUtils,
  • DeviceUtil,
  • DrawableUtils,
  • FastXmlSerializer,
  • FileUtils$FileLock$FileLockCount,
  • FileUtils$FileLock,
  • MD5Utils,
  • OSUtils,
  • ReflectException,
  • SchedulerTask,
  • Singleton,
  • FakeDeviceMark,
  • FakeLocMark
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now