congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.wizzardo.tools.reflection
Code IndexAdd Tabnine to your IDE (free)

How to use com.wizzardo.tools.reflection

Best Java code snippets using com.wizzardo.tools.reflection (Showing top 20 results out of 315)

origin: com.wizzardo.tools/tools-reflection

  @Override
  public FieldInfo<FieldReflection, Generic> map(Field field, Generic generic) {
    return new FieldInfo<FieldReflection, Generic>(field, FIELD_REFLECTION_FACTORY.create(field), generic.types);
  }
};
origin: com.wizzardo.tools/tools-reflection

public F getFields() {
  if (fields != null)
    return fields;
  fields = (F) new Fields(this);
  return fields;
}
origin: com.wizzardo.tools/tools-reflection

protected void initInterfaces(Generic[] result, Type[] interfaces, Map<String, G> types, Map<Type, Generic<T, F, G>> cyclicDependencies) {
  for (int i = 0; i < interfaces.length; i++) {
    result[i] = create(interfaces[i], types, cyclicDependencies);
  }
}
origin: wizzardo/tools

private void doTestGet() throws NoSuchFieldException {
  Object test = new TestClass();
  FieldReflectionFactory factory = new FieldReflectionFactory();
  Assert.assertEquals(1, factory.create(TestClass.class, "i").getInteger(test));
  Assert.assertEquals(2l, factory.create(TestClass.class, "l").getLong(test));
  Assert.assertEquals((byte) 3, factory.create(TestClass.class, "b").getByte(test));
  Assert.assertEquals((short) 4, factory.create(TestClass.class, "s").getShort(test));
  Assert.assertEquals((char) 5, factory.create(TestClass.class, "c").getChar(test));
  Assert.assertEquals(6f, factory.create(TestClass.class, "f").getFloat(test), 0);
  Assert.assertEquals(7d, factory.create(TestClass.class, "d").getDouble(test), 0);
  Assert.assertEquals(true, factory.create(TestClass.class, "aBoolean").getBoolean(test));
  Assert.assertEquals("foo", factory.create(TestClass.class, "string").getObject(test));
}
origin: wizzardo/tools

@Override
public JsonFieldSetter create(Field field, boolean setAccessible) {
  return (JsonFieldSetter) super.create(field, setAccessible);
}
origin: wizzardo/tools

@Override
public JsonGeneric type(int i) {
  return super.type(i);
}
origin: wizzardo/http

  public static int write(String s, byte[] bytes, int offset) {
    char[] chars = StringReflection.chars(s);
    int l = chars.length + offset;
    for (int i = offset; i < l; i++) {
      bytes[i] = (byte) chars[i - offset];
    }
    return l;
  }
}
origin: com.wizzardo.tools/tools-reflection

@Override
public char[] chars(String s) {
  return (char[]) value.getObject(s);
}
origin: com.wizzardo.tools/tools-reflection

@Override
public int offset(String s) {
  return offset.getInteger(s);
}
origin: com.wizzardo.tools/tools-reflection

public static Fields<FieldInfo> getFields(Class clazz) {
  return getFields(clazz, DEFAULT_MAPPER);
}
origin: wizzardo/tools

public FieldInfo(Field field, T reflection, Map<String, G> types) {
  this.field = field;
  this.reflection = reflection;
  this.generic = createGeneric(field, types);
}
origin: com.wizzardo.tools/tools-reflection

public static int offset(String s) {
  return reflections.offset(s);
}
origin: wizzardo/tools

protected Generic(Class c, G parent, G[] typeParameters) {
  init();
  this.clazz = c;
  this.parent = parent;
  this.typeParameters = typeParameters;
}
origin: wizzardo/tools

@Override
public JsonGeneric parent() {
  return super.parent();
}
origin: wizzardo/tools

  @Override
  public FieldInfo<FieldReflection, Generic> map(Field field, Generic generic) {
    return new FieldInfo<FieldReflection, Generic>(field, FIELD_REFLECTION_FACTORY.create(field), generic.types);
  }
};
origin: wizzardo/tools

@Override
public JsonFieldSetter create(Class clazz, String name, boolean setAccessible) throws NoSuchFieldException {
  return (JsonFieldSetter) super.create(clazz, name, setAccessible);
}
origin: wizzardo/tools

public F getFields() {
  if (fields != null)
    return fields;
  fields = (F) new Fields(this);
  return fields;
}
origin: com.wizzardo.tools/tools-reflection

public G getType(String name) {
  return type(name);
}
origin: wizzardo/tools

protected void initInterfaces(Generic[] result, Type[] interfaces, Map<String, G> types, Map<Type, Generic<T, F, G>> cyclicDependencies) {
  for (int i = 0; i < interfaces.length; i++) {
    result[i] = create(interfaces[i], types, cyclicDependencies);
  }
}
origin: com.wizzardo.tools/tools-reflection

public FieldInfo(Field field, T reflection, Map<String, G> types) {
  this.field = field;
  this.reflection = reflection;
  this.generic = createGeneric(field, types);
}
com.wizzardo.tools.reflection

Most used classes

  • FieldReflection
  • FieldReflectionFactory
    Created by wizzardo on 29.07.15.
  • Fields
    Created by wizzardo on 31/05/16.
  • Generic
  • StringReflection
  • FieldInfo,
  • Fields$FieldMapper,
  • GenericMethod,
  • Misc,
  • StringReflection$StringReflections,
  • BooleanReflectionGetterSetter,
  • BooleanUnsafeGetterSetter,
  • ByteReflectionGetterSetter,
  • ByteUnsafeGetterSetter,
  • CharReflectionGetterSetter,
  • CharUnsafeGetterSetter,
  • DoubleReflectionGetterSetter,
  • DoubleUnsafeGetterSetter,
  • FloatReflectionGetterSetter
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