proj_name stringclasses 131
values | relative_path stringlengths 30 228 | class_name stringlengths 1 68 | func_name stringlengths 1 48 | masked_class stringlengths 78 9.82k | func_body stringlengths 46 9.61k | len_input int64 29 2.01k | len_output int64 14 1.94k | total int64 55 2.05k | relevant_context stringlengths 0 38.4k |
|---|---|---|---|---|---|---|---|---|---|
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/FieldReaderStackTrace.java | FieldReaderStackTrace | accept | class FieldReaderStackTrace
extends FieldReaderObject {
public FieldReaderStackTrace(
String fieldName,
Type fieldType,
Class fieldClass,
int ordinal,
long features,
String format,
Locale locale,
Object defaultVa... |
if (schema != null) {
schema.assertValidate(value);
}
if (value == null && (features & JSONReader.Feature.IgnoreSetNullValue.mask) != 0) {
return;
}
if (value instanceof Collection) {
Collection collection = (Collection) value;
i... | 156 | 200 | 356 | <methods>public void <init>(java.lang.String, java.lang.reflect.Type, Class#RAW, int, long, java.lang.String, java.util.Locale, java.lang.Object, com.alibaba.fastjson2.schema.JSONSchema, java.lang.reflect.Method, java.lang.reflect.Field, BiConsumer#RAW) ,public void accept(java.lang.Object, boolean) ,public void accept... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/FieldReaderStringField.java | FieldReaderStringField | readFieldValue | class FieldReaderStringField<T>
extends FieldReaderObjectField<T> {
final boolean trim;
final boolean emptyToNull;
FieldReaderStringField(String fieldName, Class fieldType, int ordinal, long features, String format, String defaultValue, JSONSchema schema, Field field) {
super(fieldName, fie... |
String fieldValue = jsonReader.readString();
if (trim && fieldValue != null) {
fieldValue = fieldValue.trim();
}
if (schema != null) {
schema.assertValidate(fieldValue);
}
UNSAFE.putObject(object, fieldOffset, fieldValue);
| 560 | 85 | 645 | <methods>public void accept(T, boolean) ,public void accept(T, byte) ,public void accept(T, short) ,public void accept(T, int) ,public void accept(T, long) ,public void accept(T, float) ,public void accept(T, double) ,public void accept(T, char) ,public void accept(T, java.lang.Object) <variables> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/FieldReaderStringFunc.java | FieldReaderStringFunc | accept | class FieldReaderStringFunc<T, V>
extends FieldReader<T> {
final BiConsumer<T, V> function;
final String format;
final boolean trim;
FieldReaderStringFunc(
String fieldName,
Class<V> fieldClass,
int ordinal,
long features,
String form... |
String fieldValue;
if (value instanceof String || value == null) {
fieldValue = (String) value;
} else {
fieldValue = value.toString();
}
if (trim && fieldValue != null) {
fieldValue = fieldValue.trim();
}
if (schema != null)... | 479 | 152 | 631 | <methods>public void <init>(java.lang.String, java.lang.reflect.Type, Class#RAW, int, long, java.lang.String, java.util.Locale, java.lang.Object, com.alibaba.fastjson2.schema.JSONSchema, java.lang.reflect.Method, java.lang.reflect.Field) ,public void accept(T, boolean) ,public void accept(T, byte) ,public void accept(T... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/FieldReaderStringMethod.java | FieldReaderStringMethod | readFieldValue | class FieldReaderStringMethod<T>
extends FieldReaderObject<T> {
final boolean trim;
FieldReaderStringMethod(
String fieldName,
Type fieldType,
Class fieldClass,
int ordinal,
long features,
String format,
Locale locale,
... |
String fieldValue = jsonReader.readString();
if (trim && fieldValue != null) {
fieldValue = fieldValue.trim();
}
if (schema != null) {
schema.assertValidate(fieldValue);
}
try {
method.invoke(object, fieldValue);
} catch (Exc... | 450 | 117 | 567 | <methods>public void <init>(java.lang.String, java.lang.reflect.Type, Class#RAW, int, long, java.lang.String, java.util.Locale, java.lang.Object, com.alibaba.fastjson2.schema.JSONSchema, java.lang.reflect.Method, java.lang.reflect.Field, BiConsumer#RAW) ,public void accept(T, boolean) ,public void accept(T, byte) ,publ... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/FieldReaderZonedDateTime.java | FieldReaderZonedDateTime | readFieldValue | class FieldReaderZonedDateTime<T>
extends FieldReaderDateTimeCodec<T> {
final BiConsumer<T, ZonedDateTime> function;
FieldReaderZonedDateTime(
String fieldName,
Type fieldType,
Class fieldClass,
int ordinal,
long features,
String f... |
ZonedDateTime date = (ZonedDateTime) dateReader.readObject(jsonReader, fieldType, fieldName, features);
accept(object, date);
| 1,086 | 40 | 1,126 | <methods>public void <init>(java.lang.String, java.lang.reflect.Type, Class#RAW, int, long, java.lang.String, java.util.Locale, java.lang.Object, com.alibaba.fastjson2.schema.JSONSchema, java.lang.reflect.Method, java.lang.reflect.Field, ObjectReader#RAW) ,public void accept(T, java.lang.Object) ,public final ObjectRea... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectArrayReader.java | ObjectArrayReader | readObject | class ObjectArrayReader
extends ObjectReaderPrimitive {
public static final ObjectArrayReader INSTANCE = new ObjectArrayReader();
public static final long TYPE_HASH_CODE = Fnv.hashCode64("[O");
public ObjectArrayReader() {
super(Object[].class);
}
@Override
public Object[] crea... |
if (jsonReader.nextIfNullOrEmptyString()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
Object[] values = new Object[16];
int size = 0;
while (!jsonReader.nextIfArrayEnd()) {
int minCapacity = size + 1;
if ... | 687 | 647 | 1,334 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectArrayReaderMultiType.java | ObjectArrayReaderMultiType | readObject | class ObjectArrayReaderMultiType
implements ObjectReader {
final Type[] types;
final ObjectReader[] readers;
ObjectArrayReaderMultiType(MultiType multiType) {
Type[] types = new Type[multiType.size()];
for (int i = 0; i < multiType.size(); i++) {
types[i] = multiType.get... |
if (jsonReader.jsonb) {
return readJSONBObject(jsonReader, fieldType, fieldName, 0);
}
if (jsonReader.nextIfNullOrEmptyString()) {
return null;
}
Object[] values = new Object[types.length];
if (jsonReader.nextIfArrayStart()) {
for (i... | 521 | 306 | 827 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectArrayTypedReader.java | ObjectArrayTypedReader | createInstance | class ObjectArrayTypedReader
extends ObjectReaderPrimitive {
final Class componentType;
final Class componentClass;
final long componentClassHash;
final String typeName;
final long typeNameHashCode;
ObjectArrayTypedReader(Class objectClass) {
super(objectClass);
this.com... |
Object[] values = (Object[]) Array.newInstance(componentClass, collection.size());
int index = 0;
for (Object item : collection) {
if (item != null) {
Class<?> valueClass = item.getClass();
if (valueClass != componentType) {
Object... | 1,223 | 427 | 1,650 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader10.java | ObjectReader10 | getFieldReaderLCase | class ObjectReader10<T>
extends ObjectReaderAdapter<T> {
protected final FieldReader fieldReader0;
protected final FieldReader fieldReader1;
protected final FieldReader fieldReader2;
protected final FieldReader fieldReader3;
protected final FieldReader fieldReader4;
protected final Field... |
if (hashCode == hashCode0LCase) {
return fieldReader0;
}
if (hashCode == hashCode1LCase) {
return fieldReader1;
}
if (hashCode == hashCode2LCase) {
return fieldReader2;
}
if (hashCode == hashCode3LCase) {
return ... | 1,373 | 258 | 1,631 | <methods>public transient void <init>(Class#RAW, Supplier<T>, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.String, long, com.alibaba.fastjson2.schema.JSONSchema, Supplier<T>, Function#RAW, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader11.java | ObjectReader11 | getFieldReader | class ObjectReader11<T>
extends ObjectReaderAdapter<T> {
protected final FieldReader fieldReader0;
protected final FieldReader fieldReader1;
protected final FieldReader fieldReader2;
protected final FieldReader fieldReader3;
protected final FieldReader fieldReader4;
protected final Field... |
if (hashCode == hashCode0) {
return fieldReader0;
}
if (hashCode == hashCode1) {
return fieldReader1;
}
if (hashCode == hashCode2) {
return fieldReader2;
}
if (hashCode == hashCode3) {
return fieldReader3;
... | 1,517 | 263 | 1,780 | <methods>public transient void <init>(Class#RAW, Supplier<T>, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.String, long, com.alibaba.fastjson2.schema.JSONSchema, Supplier<T>, Function#RAW, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader12.java | ObjectReader12 | getFieldReaderLCase | class ObjectReader12<T>
extends ObjectReaderAdapter<T> {
protected final FieldReader fieldReader0;
protected final FieldReader fieldReader1;
protected final FieldReader fieldReader2;
protected final FieldReader fieldReader3;
protected final FieldReader fieldReader4;
protected final Field... |
if (hashCode == hashCode0LCase) {
return fieldReader0;
}
if (hashCode == hashCode1LCase) {
return fieldReader1;
}
if (hashCode == hashCode2LCase) {
return fieldReader2;
}
if (hashCode == hashCode3LCase) {
return ... | 1,617 | 312 | 1,929 | <methods>public transient void <init>(Class#RAW, Supplier<T>, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.String, long, com.alibaba.fastjson2.schema.JSONSchema, Supplier<T>, Function#RAW, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader7.java | ObjectReader7 | getFieldReader | class ObjectReader7<T>
extends ObjectReaderAdapter<T> {
protected final FieldReader fieldReader0;
protected final FieldReader fieldReader1;
protected final FieldReader fieldReader2;
protected final FieldReader fieldReader3;
protected final FieldReader fieldReader4;
protected final FieldR... |
if (hashCode == hashCode0) {
return fieldReader0;
}
if (hashCode == hashCode1) {
return fieldReader1;
}
if (hashCode == hashCode2) {
return fieldReader2;
}
if (hashCode == hashCode3) {
return fieldReader3;
... | 1,053 | 169 | 1,222 | <methods>public transient void <init>(Class#RAW, Supplier<T>, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.String, long, com.alibaba.fastjson2.schema.JSONSchema, Supplier<T>, Function#RAW, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader8.java | ObjectReader8 | getFieldReaderLCase | class ObjectReader8<T>
extends ObjectReaderAdapter<T> {
protected final FieldReader fieldReader0;
protected final FieldReader fieldReader1;
protected final FieldReader fieldReader2;
protected final FieldReader fieldReader3;
protected final FieldReader fieldReader4;
protected final FieldR... |
if (hashCode == hashCode0LCase) {
return fieldReader0;
}
if (hashCode == hashCode1LCase) {
return fieldReader1;
}
if (hashCode == hashCode2LCase) {
return fieldReader2;
}
if (hashCode == hashCode3LCase) {
return ... | 1,149 | 208 | 1,357 | <methods>public transient void <init>(Class#RAW, Supplier<T>, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.String, long, com.alibaba.fastjson2.schema.JSONSchema, Supplier<T>, Function#RAW, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader9.java | ObjectReader9 | getFieldReader | class ObjectReader9<T>
extends ObjectReaderAdapter<T> {
protected final FieldReader fieldReader0;
protected final FieldReader fieldReader1;
protected final FieldReader fieldReader2;
protected final FieldReader fieldReader3;
protected final FieldReader fieldReader4;
protected final FieldR... |
if (hashCode == hashCode0) {
return fieldReader0;
}
if (hashCode == hashCode1) {
return fieldReader1;
}
if (hashCode == hashCode2) {
return fieldReader2;
}
if (hashCode == hashCode3) {
return fieldReader3;
... | 1,278 | 215 | 1,493 | <methods>public transient void <init>(Class#RAW, Supplier<T>, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.String, long, com.alibaba.fastjson2.schema.JSONSchema, Supplier<T>, Function#RAW, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplAtomicReference.java | ObjectReaderImplAtomicReference | readJSONBObject | class ObjectReaderImplAtomicReference
extends ObjectReaderPrimitive {
static final ObjectReaderImplAtomicReference INSTANCE = new ObjectReaderImplAtomicReference(Object.class);
final Type referenceType;
public ObjectReaderImplAtomicReference(Type referenceType) {
super(AtomicReference.clas... |
if (jsonReader.nextIfNull()) {
return null;
}
Object value = jsonReader.read(referenceType);
return new AtomicReference<>(value);
| 211 | 48 | 259 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplBigDecimal.java | ObjectReaderImplBigDecimal | createInstance | class ObjectReaderImplBigDecimal
extends ObjectReaderPrimitive {
private final Function converter = new ToBigDecimal();
static final ObjectReaderImplBigDecimal INSTANCE = new ObjectReaderImplBigDecimal(null);
final Function<BigDecimal, Object> function;
public ObjectReaderImplBigDecimal(Functi... |
Object value = map.get("value");
if (value == null) {
value = map.get("$numberDecimal");
}
if (!(value instanceof BigDecimal)) {
value = converter.apply(value);
}
BigDecimal decimal = (BigDecimal) value;
if (function != null) {
... | 295 | 109 | 404 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplBitSet.java | ObjectReaderImplBitSet | readJSONBObject | class ObjectReaderImplBitSet
extends ObjectReaderPrimitive<BitSet> {
static final ObjectReaderImplBitSet INSTANCE = new ObjectReaderImplBitSet();
public static final long HASH_TYPE = Fnv.hashCode64("BitSet");
public ObjectReaderImplBitSet() {
super(BitSet.class);
}
@Override
p... |
if (jsonReader.nextIfNull()) {
return null;
}
if (jsonReader.nextIfMatch(JSONB.Constants.BC_TYPED_ANY)) {
long typeHash = jsonReader.readTypeHashCode();
if (typeHash != HASH_TYPE) {
String typeName = jsonReader.getString();
thr... | 208 | 133 | 341 | <methods>public void <init>(Class#RAW) ,public java.util.BitSet createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.util.BitSet readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplBoolValueArray.java | ObjectReaderImplBoolValueArray | readObject | class ObjectReaderImplBoolValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplBoolValueArray INSTANCE = new ObjectReaderImplBoolValueArray();
static final long TYPE_HASH = Fnv.hashCode64("[Z");
ObjectReaderImplBoolValueArray() {
super(boolean[].class);
}
@Overri... |
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
boolean[] values = new boolean[16];
int size = 0;
while (!jsonReader.nextIfArrayEnd()) {
int minCapacity = size + 1;
if (minCapacit... | 328 | 298 | 626 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplByte.java | ObjectReaderImplByte | readObject | class ObjectReaderImplByte
extends ObjectReaderPrimitive<Byte> {
static final ObjectReaderImplByte INSTANCE = new ObjectReaderImplByte();
public static final long HASH_TYPE = Fnv.hashCode64("B");
ObjectReaderImplByte() {
super(Byte.class);
}
@Override
public Byte readJSONBObje... |
Integer i = jsonReader.readInt32();
if (i == null) {
return null;
}
return i.byteValue();
| 192 | 41 | 233 | <methods>public void <init>(Class#RAW) ,public java.lang.Byte createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Byte readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplCalendar.java | ObjectReaderImplCalendar | readObject | class ObjectReaderImplCalendar
extends DateTimeCodec
implements ObjectReader {
static final ObjectReaderImplCalendar INSTANCE = new ObjectReaderImplCalendar(null, null);
public static ObjectReaderImplCalendar of(String format, Locale locale) {
if (format == null) {
return IN... |
if (jsonReader.isString()) {
if (format != null) {
DateTimeFormatter formatter = getDateFormatter();
if (formatter != null) {
String str = jsonReader.readString();
if (str.isEmpty()) {
return null;
... | 395 | 371 | 766 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplCharValueArray.java | ObjectReaderImplCharValueArray | readObject | class ObjectReaderImplCharValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplCharValueArray INSTANCE = new ObjectReaderImplCharValueArray(null);
static final long TYPE_HASH = Fnv.hashCode64("[C");
final Function<char[], Object> builder;
public ObjectReaderImplCharValueArra... |
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.current() == '"') {
String str = jsonReader.readString();
char[] chars = str.toCharArray();
if (builder != null) {
return builder.apply(chars);
}
... | 465 | 397 | 862 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplCharacter.java | ObjectReaderImplCharacter | readObject | class ObjectReaderImplCharacter
extends ObjectReaderPrimitive {
static final ObjectReaderImplCharacter INSTANCE = new ObjectReaderImplCharacter();
ObjectReaderImplCharacter() {
super(Character.class);
}
@Override
public Object readJSONBObject(JSONReader jsonReader, Type fieldType, ... |
String str = jsonReader.readString();
if (str == null) {
return null;
}
return str.charAt(0);
| 160 | 41 | 201 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplClass.java | ObjectReaderImplClass | readObject | class ObjectReaderImplClass
extends ObjectReaderPrimitive {
static final ObjectReaderImplClass INSTANCE = new ObjectReaderImplClass();
static final long TYPE_HASH = Fnv.hashCode64("java.lang.Class");
ObjectReaderImplClass() {
super(Class.class);
}
@Override
public Object readJS... |
long classNameHash = jsonReader.readValueHashCode();
JSONReader.Context context = jsonReader.getContext();
JSONReader.AutoTypeBeforeHandler typeFilter = context.getContextAutoTypeBeforeHandler();
if (typeFilter != null) {
Class<?> filterClass = typeFilter.apply(classNameHas... | 256 | 369 | 625 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplCurrency.java | ObjectReaderImplCurrency | readJSONBObject | class ObjectReaderImplCurrency
extends ObjectReaderPrimitive {
static final ObjectReaderImplCurrency INSTANCE = new ObjectReaderImplCurrency();
static final long TYPE_HASH = Fnv.hashCode64("Currency");
ObjectReaderImplCurrency() {
super(Currency.class);
}
@Override
public Obje... |
if (jsonReader.getType() == JSONB.Constants.BC_TYPED_ANY) {
jsonReader.next();
long typeHash = jsonReader.readTypeHashCode();
final long TYPE_HASH_FULL = -7860540621745740270L; // Fnv.hashCode64("java.util.Currency");
if (typeHash != TYPE_HASH && typeHash != TYPE... | 286 | 205 | 491 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplDate.java | ObjectReaderImplDate | readDate | class ObjectReaderImplDate
extends DateTimeCodec
implements ObjectReader {
public static final ObjectReaderImplDate INSTANCE = new ObjectReaderImplDate(null, null);
public static ObjectReaderImplDate of(String format, Locale locale) {
if (format == null) {
return INSTANCE;
... |
long millis;
if (useSimpleFormatter) {
String str = jsonReader.readString();
try {
return new SimpleDateFormat(format).parse(str);
} catch (ParseException e) {
throw new JSONException(jsonReader.info("parse error : " + str), e);
... | 427 | 1,194 | 1,621 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplDoubleArray.java | ObjectReaderImplDoubleArray | readObject | class ObjectReaderImplDoubleArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplDoubleArray INSTANCE = new ObjectReaderImplDoubleArray();
static final long HASH_TYPE = Fnv.hashCode64("[Double");
ObjectReaderImplDoubleArray() {
super(Double[].class);
}
@Override
p... |
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
Double[] values = new Double[16];
int size = 0;
while (!jsonReader.nextIfArrayEnd()) {
if (jsonReader.isEnd()) {
throw new JSON... | 516 | 327 | 843 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplDoubleValueArray.java | ObjectReaderImplDoubleValueArray | readObject | class ObjectReaderImplDoubleValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplDoubleValueArray INSTANCE = new ObjectReaderImplDoubleValueArray(null);
static final long TYPE_HASH = Fnv.hashCode64("[D");
final Function<double[], Object> builder;
ObjectReaderImplDoubleValueA... |
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
double[] values = new double[16];
int size = 0;
while (!jsonReader.nextIfArrayEnd()) {
if (jsonReader.isEnd()) {
throw new JSON... | 600 | 358 | 958 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplField.java | ObjectReaderImplField | readObject | class ObjectReaderImplField
implements ObjectReader {
static final long HASH_DECLARING_CLASS = Fnv.hashCode64("declaringClass");
static final long HASH_NAME = Fnv.hashCode64("name");
@Override
public Object readJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) ... |
boolean objectStart = jsonReader.nextIfObjectStart();
if (!objectStart) {
if (jsonReader.isSupportBeanArray(features)) {
if (jsonReader.jsonb) {
return readArrayMappingJSONBObject(jsonReader, fieldType, fieldName, features);
} else {
... | 630 | 298 | 928 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplFloatArray.java | ObjectReaderImplFloatArray | readObject | class ObjectReaderImplFloatArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplFloatArray INSTANCE = new ObjectReaderImplFloatArray();
static final long HASH_TYPE = Fnv.hashCode64("[Float");
ObjectReaderImplFloatArray() {
super(Float[].class);
}
@Override
public ... |
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
Float[] values = new Float[16];
int size = 0;
while (!jsonReader.nextIfArrayEnd()) {
if (jsonReader.isEnd()) {
throw new JSONEx... | 523 | 329 | 852 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplFloatValueArray.java | ObjectReaderImplFloatValueArray | readJSONBObject | class ObjectReaderImplFloatValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplFloatValueArray INSTANCE = new ObjectReaderImplFloatValueArray(null);
static final long TYPE_HASH = Fnv.hashCode64("[F");
final Function<float[], Object> builder;
ObjectReaderImplFloatValueArray(... |
if (jsonReader.nextIfMatch(JSONB.Constants.BC_TYPED_ANY)) {
long typeHashCode = jsonReader.readTypeHashCode();
if (typeHashCode != TYPE_HASH) {
throw new JSONException("not support autoType : " + jsonReader.getString());
}
}
int entryCnt = js... | 761 | 194 | 955 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplFromBoolean.java | ObjectReaderImplFromBoolean | readObject | class ObjectReaderImplFromBoolean<T>
extends ObjectReaderPrimitive<T> {
final Function<Boolean, T> creator;
public ObjectReaderImplFromBoolean(Class<T> objectClass, Function<Boolean, T> creator) {
super(objectClass);
this.creator = creator;
}
@Override
public T readJSONBObj... |
if (jsonReader.nextIfNull()) {
return null;
}
return creator.apply(
jsonReader.readBoolValue()
);
| 198 | 44 | 242 | <methods>public void <init>(Class#RAW) ,public T createInstance(long) ,public Class#RAW getObjectClass() ,public abstract T readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplFromInt.java | ObjectReaderImplFromInt | readObject | class ObjectReaderImplFromInt<T>
extends ObjectReaderPrimitive<T> {
final IntFunction<T> creator;
public ObjectReaderImplFromInt(Class<T> objectClass, IntFunction creator) {
super(objectClass);
this.creator = creator;
}
@Override
public T readJSONBObject(JSONReader jsonRead... |
if (jsonReader.nextIfNull()) {
return null;
}
return creator.apply(
jsonReader.readInt32Value()
);
| 195 | 46 | 241 | <methods>public void <init>(Class#RAW) ,public T createInstance(long) ,public Class#RAW getObjectClass() ,public abstract T readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplFromLong.java | ObjectReaderImplFromLong | readJSONBObject | class ObjectReaderImplFromLong<T>
extends ObjectReaderPrimitive<T> {
final LongFunction<T> creator;
public ObjectReaderImplFromLong(Class<T> objectClass, LongFunction creator) {
super(objectClass);
this.creator = creator;
}
@Override
public T readJSONBObject(JSONReader json... |
if (jsonReader.nextIfNull()) {
return null;
}
return creator.apply(
jsonReader.readInt32Value()
);
| 195 | 46 | 241 | <methods>public void <init>(Class#RAW) ,public T createInstance(long) ,public Class#RAW getObjectClass() ,public abstract T readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplFromString.java | ObjectReaderImplFromString | readJSONBObject | class ObjectReaderImplFromString<T>
extends ObjectReaderPrimitive<T> {
final Function<String, T> creator;
public ObjectReaderImplFromString(Class<T> objectClass, Function<String, T> creator) {
super(objectClass);
this.creator = creator;
}
@Override
public T readJSONBObject(... |
String str = jsonReader.readString();
if (str == null || str.isEmpty()) {
return null;
}
return creator.apply(str);
| 196 | 46 | 242 | <methods>public void <init>(Class#RAW) ,public T createInstance(long) ,public Class#RAW getObjectClass() ,public abstract T readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplGenericArray.java | ObjectReaderImplGenericArray | readJSONBObject | class ObjectReaderImplGenericArray
implements ObjectReader {
final Type arrayType;
final Class arrayClass;
final Type itemType;
final Class<?> componentClass;
ObjectReader itemObjectReader;
final String arrayClassName;
final long arrayClassNameHash;
public ObjectReaderImplGeneri... |
if (jsonReader.nextIfMatch(JSONB.Constants.BC_TYPED_ANY)) {
long typeHash = jsonReader.readTypeHashCode();
if (typeHash != arrayClassNameHash) {
String typeName = jsonReader.getString();
throw new JSONException("not support input typeName " + typeName);
... | 801 | 234 | 1,035 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInstant.java | ObjectReaderImplInstant | createInstance | class ObjectReaderImplInstant
extends DateTimeCodec
implements ObjectReader {
public static final ObjectReaderImplInstant INSTANCE = new ObjectReaderImplInstant(null, null);
public static ObjectReaderImplInstant of(String format, Locale locale) {
if (format == null) {
return... |
Number nano = (Number) map.get("nano");
Number epochSecond = (Number) map.get("epochSecond");
if (nano != null && epochSecond != null) {
return Instant.ofEpochSecond(epochSecond.longValue(), nano.longValue());
}
if (epochSecond != null) {
return Instant... | 712 | 184 | 896 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt16Array.java | ObjectReaderImplInt16Array | readJSONBObject | class ObjectReaderImplInt16Array
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt16Array INSTANCE = new ObjectReaderImplInt16Array();
static final long HASH_TYPE = Fnv.hashCode64("[Short");
ObjectReaderImplInt16Array() {
super(Short[].class);
}
@Override
public ... |
if (jsonReader.nextIfMatch(BC_TYPED_ANY)) {
long typeHash = jsonReader.readTypeHashCode();
if (typeHash != HASH_TYPE
&& typeHash != ObjectReaderImplInt16ValueArray.HASH_TYPE
) {
throw new JSONException(jsonReader.info("not support type " +... | 699 | 207 | 906 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt16ValueArray.java | ObjectReaderImplInt16ValueArray | readObject | class ObjectReaderImplInt16ValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt16ValueArray INSTANCE = new ObjectReaderImplInt16ValueArray(null);
static final long HASH_TYPE = Fnv.hashCode64("[S");
final Function<short[], Object> builder;
ObjectReaderImplInt16ValueArray(... |
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
short[] values = new short[16];
int size = 0;
while (!jsonReader.nextIfArrayEnd()) {
if (jsonReader.isEnd()) {
throw new JSONEx... | 631 | 364 | 995 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt32Array.java | ObjectReaderImplInt32Array | createInstance | class ObjectReaderImplInt32Array
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt32Array INSTANCE = new ObjectReaderImplInt32Array();
public static final long HASH_TYPE = Fnv.hashCode64("[Integer");
ObjectReaderImplInt32Array() {
super(Integer[].class);
}
@Override
... |
Integer[] array = new Integer[collection.size()];
int i = 0;
for (Object item : collection) {
Integer value;
if (item == null) {
value = null;
} else if (item instanceof Number) {
value = ((Number) item).intValue();
... | 697 | 177 | 874 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt32ValueArray.java | ObjectReaderImplInt32ValueArray | readObject | class ObjectReaderImplInt32ValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt32ValueArray INSTANCE = new ObjectReaderImplInt32ValueArray(int[].class, null);
public static final long HASH_TYPE = Fnv.hashCode64("[I");
final Function<int[], Object> builder;
ObjectReaderIm... |
if (jsonReader.jsonb) {
return readJSONBObject(jsonReader, fieldType, fieldName, features);
}
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
int[] values = new int[16];
int size = 0;
... | 635 | 394 | 1,029 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt64Array.java | ObjectReaderImplInt64Array | createInstance | class ObjectReaderImplInt64Array
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt64Array INSTANCE = new ObjectReaderImplInt64Array();
public static final long HASH_TYPE = Fnv.hashCode64("[Long");
ObjectReaderImplInt64Array() {
super(Long[].class);
}
@Override
pu... |
Long[] array = new Long[collection.size()];
int i = 0;
for (Object item : collection) {
Long value;
if (item == null) {
value = null;
} else if (item instanceof Number) {
value = ((Number) item).longValue();
} else ... | 736 | 177 | 913 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt64ValueArray.java | ObjectReaderImplInt64ValueArray | readObject | class ObjectReaderImplInt64ValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt64ValueArray INSTANCE = new ObjectReaderImplInt64ValueArray(long[].class, null);
public static final long HASH_TYPE = Fnv.hashCode64("[J");
final Function<long[], Object> builder;
ObjectReade... |
long[] array = jsonReader.readInt64ValueArray();
if (array != null && builder != null) {
return builder.apply(array);
}
return array;
| 472 | 51 | 523 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt8Array.java | ObjectReaderImplInt8Array | readJSONBObject | class ObjectReaderImplInt8Array
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt8Array INSTANCE = new ObjectReaderImplInt8Array(null);
static final long HASH_TYPE = Fnv.hashCode64("[Byte");
final String format;
public ObjectReaderImplInt8Array(String format) {
super(Byt... |
if (jsonReader.nextIfMatch(JSONB.Constants.BC_TYPED_ANY)) {
long typeHashCode = jsonReader.readTypeHashCode();
if (typeHashCode != HASH_TYPE) {
throw new JSONException("not support autoType : " + jsonReader.getString());
}
}
if (jsonReader.is... | 1,000 | 222 | 1,222 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplInt8ValueArray.java | ObjectReaderImplInt8ValueArray | createInstance | class ObjectReaderImplInt8ValueArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplInt8ValueArray INSTANCE = new ObjectReaderImplInt8ValueArray(null);
static final long HASH_TYPE = Fnv.hashCode64("[B");
final String format;
final Function<byte[], Object> builder;
final long f... |
byte[] bytes = new byte[collection.size()];
int i = 0;
for (Object item : collection) {
byte value;
if (item == null) {
value = 0;
} else if (item instanceof Number) {
value = ((Number) item).byteValue();
} else {
... | 1,025 | 200 | 1,225 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplJSONP.java | ObjectReaderImplJSONP | readObject | class ObjectReaderImplJSONP
implements ObjectReader {
private final Class objectClass;
public ObjectReaderImplJSONP(Class objectClass) {
this.objectClass = objectClass;
}
@Override
public Object readObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) {<FI... |
String funcName = jsonReader.readFieldNameUnquote();
if (jsonReader.nextIfMatch('.')) {
String name2 = jsonReader.readFieldNameUnquote();
funcName += '.' + name2;
}
char ch = jsonReader.current();
if (ch == '/') {
if (jsonReader.nextIfMatchI... | 92 | 389 | 481 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplListInt64.java | ObjectReaderImplListInt64 | readObject | class ObjectReaderImplListInt64
implements ObjectReader {
final Class listType;
final Class instanceType;
final long instanceTypeHash;
public ObjectReaderImplListInt64(Class listType, Class instanceType) {
this.listType = listType;
this.instanceType = instanceType;
this.... |
if (jsonReader.jsonb) {
return readJSONBObject(jsonReader, fieldType, fieldName, 0);
}
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.isString()) {
Collection list = (Collection) createInstance(jsonReader.getContext().getFeatur... | 672 | 429 | 1,101 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplListStr.java | ObjectReaderImplListStr | readJSONBObject | class ObjectReaderImplListStr
implements ObjectReader {
final Class listType;
final Class instanceType;
public ObjectReaderImplListStr(Class listType, Class instanceType) {
this.listType = listType;
this.instanceType = instanceType;
}
@Override
public Object createInsta... |
Class instanceType = this.instanceType;
if (jsonReader.nextIfNull()) {
return null;
}
ObjectReader objectReader = jsonReader.checkAutoType(this.listType, 0, features);
if (objectReader != null) {
instanceType = objectReader.getObjectClass();
}
... | 746 | 1,003 | 1,749 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplLocalDate.java | ObjectReaderImplLocalDate | readObject | class ObjectReaderImplLocalDate
extends DateTimeCodec
implements ObjectReader {
static final ObjectReaderImplLocalDate INSTANCE = new ObjectReaderImplLocalDate(null, null);
public ObjectReaderImplLocalDate(String format, Locale locale) {
super(format, locale);
}
public static O... |
JSONReader.Context context = jsonReader.getContext();
if (jsonReader.readIfNull()) {
return null;
}
if (format == null || yyyyMMddhhmmss19 || formatISO8601 || jsonReader.isNumber()) {
return jsonReader.readLocalDate();
}
String str = jsonReader... | 241 | 321 | 562 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplLocalDateTime.java | ObjectReaderImplLocalDateTime | readObject | class ObjectReaderImplLocalDateTime
extends DateTimeCodec
implements ObjectReader {
static final ObjectReaderImplLocalDateTime INSTANCE = new ObjectReaderImplLocalDateTime(null, null);
public ObjectReaderImplLocalDateTime(String format, Locale locale) {
super(format, locale);
}
... |
JSONReader.Context context = jsonReader.getContext();
if (jsonReader.isInt()) {
DateTimeFormatter formatter = getDateFormatter();
if (formatter != null) {
String str = jsonReader.readString();
return LocalDateTime.parse(str, formatter);
... | 184 | 484 | 668 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplLocalTime.java | ObjectReaderImplLocalTime | readObject | class ObjectReaderImplLocalTime
extends DateTimeCodec
implements ObjectReader {
static final ObjectReaderImplLocalTime INSTANCE = new ObjectReaderImplLocalTime(null, null);
public ObjectReaderImplLocalTime(String format, Locale locale) {
super(format, locale);
}
@Override
p... |
JSONReader.Context context = jsonReader.getContext();
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.isInt()) {
long millis = jsonReader.readInt64Value();
if (formatUnixTime) {
millis *= 1000;
}
... | 184 | 418 | 602 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplLocale.java | ObjectReaderImplLocale | readObject | class ObjectReaderImplLocale
extends ObjectReaderPrimitive {
static final ObjectReaderImplLocale INSTANCE = new ObjectReaderImplLocale();
ObjectReaderImplLocale() {
super(Locale.class);
}
@Override
public Object readJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldNam... |
String strVal = jsonReader.readString();
if (strVal == null || strVal.isEmpty()) {
return null;
}
String[] items = strVal.split("_");
if (items.length == 1) {
return new Locale(items[0]);
}
if (items.length == 2) {
return new L... | 255 | 124 | 379 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplMapEntry.java | ObjectReaderImplMapEntry | readObject | class ObjectReaderImplMapEntry
extends ObjectReaderPrimitive {
final Type keyType;
final Type valueType;
volatile ObjectReader keyReader;
volatile ObjectReader valueReader;
public ObjectReaderImplMapEntry(Type keyType, Type valueType) {
super(Map.Entry.class);
this.keyType ... |
jsonReader.nextIfObjectStart();
Object key = jsonReader.readAny();
jsonReader.nextIfMatch(':');
Object value;
if (valueType == null) {
value = jsonReader.readAny();
} else {
if (valueReader == null) {
valueReader = jsonReader.getO... | 410 | 153 | 563 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplMapMultiValueType.java | ObjectReaderImplMapMultiValueType | readObject | class ObjectReaderImplMapMultiValueType
implements ObjectReader {
final Class mapType;
final Class instanceType;
final Function builder;
final MapMultiValueType multiValueType;
public ObjectReaderImplMapMultiValueType(MapMultiValueType multiValueType) {
this.multiValueType = multiVa... |
if (!jsonReader.nextIfObjectStart()) {
if (jsonReader.nextIfNullOrEmptyString()) {
return null;
}
throw new JSONException(jsonReader.info("expect '{', but '" + jsonReader.current() + "'"));
}
JSONReader.Context context = jsonReader.getContext... | 767 | 695 | 1,462 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplMapString.java | ObjectReaderImplMapString | readObject | class ObjectReaderImplMapString
extends ObjectReaderImplMapTyped {
public ObjectReaderImplMapString(Class mapType, Class instanceType, long features) {
super(mapType, instanceType, null, String.class, features, null);
}
@Override
public Object readObject(JSONReader jsonReader, Type fiel... |
if (jsonReader.jsonb) {
return this.readJSONBObject(jsonReader, fieldType, fieldName, features);
}
boolean match = jsonReader.nextIfObjectStart();
if (!match) {
if (jsonReader.current() == '[') {
jsonReader.next();
if (jsonReader.... | 104 | 581 | 685 | <methods>public void <init>(Class#RAW, Class#RAW, java.lang.reflect.Type, java.lang.reflect.Type, long, Function#RAW) ,public java.lang.Object createInstance(Map#RAW, long) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSO... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplMethod.java | ObjectReaderImplMethod | readArrayMappingJSONBObject | class ObjectReaderImplMethod
implements ObjectReader<Method> {
static final long HASH_DECLARING_CLASS = Fnv.hashCode64("declaringClass");
static final long HASH_NAME = Fnv.hashCode64("name");
static final long HASH_PARAMETER_TYPES = Fnv.hashCode64("parameterTypes");
@Override
public Method ... |
int entryCount = jsonReader.startArray();
if (entryCount != 3) {
throw new JSONException("not support input " + jsonReader.info());
}
String declaringClassName = jsonReader.readString();
String methodName = jsonReader.readString();
List<String> paramTypeName... | 1,058 | 124 | 1,182 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplNumberArray.java | ObjectReaderImplNumberArray | readObject | class ObjectReaderImplNumberArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplNumberArray INSTANCE = new ObjectReaderImplNumberArray();
public ObjectReaderImplNumberArray() {
super(Number[].class);
}
@Override
public Object readObject(JSONReader jsonReader, Type fi... |
if (jsonReader.readIfNull()) {
return null;
}
if (jsonReader.nextIfArrayStart()) {
Number[] values = new Number[16];
int size = 0;
while (!jsonReader.nextIfArrayEnd()) {
int minCapacity = size + 1;
if (minCapacity ... | 398 | 234 | 632 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplOffsetDateTime.java | ObjectReaderImplOffsetDateTime | readObject | class ObjectReaderImplOffsetDateTime
extends DateTimeCodec implements ObjectReader {
static final ObjectReaderImplOffsetDateTime INSTANCE = new ObjectReaderImplOffsetDateTime(null, null);
public static ObjectReaderImplOffsetDateTime of(String format, Locale locale) {
if (format == null) {
... |
JSONReader.Context context = jsonReader.getContext();
if (jsonReader.isInt()) {
long millis = jsonReader.readInt64Value();
if (formatUnixTime || context.isFormatUnixTime()) {
millis *= 1000;
}
Instant instant = Instant.ofEpochMilli(milli... | 247 | 552 | 799 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplOffsetTime.java | ObjectReaderImplOffsetTime | readObject | class ObjectReaderImplOffsetTime
extends DateTimeCodec implements ObjectReader {
static final ObjectReaderImplOffsetTime INSTANCE = new ObjectReaderImplOffsetTime(null, null);
public static ObjectReaderImplOffsetTime of(String format, Locale locale) {
if (format == null) {
return IN... |
JSONReader.Context context = jsonReader.getContext();
if (jsonReader.isInt()) {
long millis = jsonReader.readInt64Value();
if (formatUnixTime || context.isFormatUnixTime()) {
millis *= 1000;
}
Instant instant = Instant.ofEpochMilli(milli... | 247 | 585 | 832 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplOptional.java | ObjectReaderImplOptional | readJSONBObject | class ObjectReaderImplOptional
extends ObjectReaderPrimitive {
static final ObjectReaderImplOptional INSTANCE = new ObjectReaderImplOptional(null, null, null);
final String format;
final Locale locale;
final Type itemType;
final Class itemClass;
ObjectReader itemObjectReader;
stat... |
Object value;
if (itemType == null) {
value = jsonReader.readAny();
} else {
if (itemObjectReader == null) {
ObjectReader formattedObjectReader = null;
if (format != null) {
formattedObjectReader = FieldReader.createFor... | 563 | 198 | 761 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplOptionalDouble.java | ObjectReaderImplOptionalDouble | readObject | class ObjectReaderImplOptionalDouble
extends ObjectReaderPrimitive {
static final ObjectReaderImplOptionalDouble INSTANCE = new ObjectReaderImplOptionalDouble();
public ObjectReaderImplOptionalDouble() {
super(OptionalDouble.class);
}
@Override
public Object readJSONBObject(JSONRea... |
Double value = jsonReader.readDouble();
if (value == null) {
return OptionalDouble.empty();
}
return OptionalDouble.of(value);
| 176 | 44 | 220 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplOptionalInt.java | ObjectReaderImplOptionalInt | readObject | class ObjectReaderImplOptionalInt
extends ObjectReaderPrimitive {
static final ObjectReaderImplOptionalInt INSTANCE = new ObjectReaderImplOptionalInt();
public ObjectReaderImplOptionalInt() {
super(OptionalInt.class);
}
@Override
public Object readJSONBObject(JSONReader jsonReader,... |
Integer integer = jsonReader.readInt32();
if (integer == null) {
return OptionalInt.empty();
}
return OptionalInt.of(integer);
| 178 | 46 | 224 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplOptionalLong.java | ObjectReaderImplOptionalLong | readJSONBObject | class ObjectReaderImplOptionalLong
extends ObjectReaderPrimitive {
static final ObjectReaderImplOptionalLong INSTANCE = new ObjectReaderImplOptionalLong();
public ObjectReaderImplOptionalLong() {
super(OptionalLong.class);
}
@Override
public Object readJSONBObject(JSONReader jsonRe... |
Long integer = jsonReader.readInt64();
if (integer == null) {
return OptionalLong.empty();
}
return OptionalLong.of(integer);
| 178 | 46 | 224 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplShort.java | ObjectReaderImplShort | readJSONBObject | class ObjectReaderImplShort
extends ObjectReaderPrimitive {
static final ObjectReaderImplShort INSTANCE = new ObjectReaderImplShort();
public static final long HASH_TYPE = Fnv.hashCode64("S");
public ObjectReaderImplShort() {
super(Short.class);
}
@Override
public Object readJ... |
Integer i = jsonReader.readInt32();
if (i == null) {
return null;
}
return i.shortValue();
| 190 | 41 | 231 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplString.java | ObjectReaderImplString | createInstance | class ObjectReaderImplString
extends ObjectReaderPrimitive {
static final ObjectReaderImplString INSTANCE = new ObjectReaderImplString();
public ObjectReaderImplString() {
super(String.class);
}
@Override
public Object readJSONBObject(JSONReader jsonReader, Type fieldType, Object f... |
if (collection == null) {
return null;
}
return JSON.toJSONString(collection);
| 218 | 32 | 250 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplStringArray.java | ObjectReaderImplStringArray | createInstance | class ObjectReaderImplStringArray
extends ObjectReaderPrimitive {
static final ObjectReaderImplStringArray INSTANCE = new ObjectReaderImplStringArray();
public static final long HASH_TYPE = Fnv.hashCode64("[String");
ObjectReaderImplStringArray() {
super(Long[].class);
}
@Override
... |
String[] array = new String[collection.size()];
int i = 0;
for (Object item : collection) {
String value;
if (item == null) {
value = null;
} else if (item instanceof String) {
value = (String) item;
} else {
... | 195 | 108 | 303 | <methods>public void <init>(Class#RAW) ,public java.lang.Object createInstance(long) ,public Class#RAW getObjectClass() ,public abstract java.lang.Object readJSONBObject(com.alibaba.fastjson2.JSONReader, java.lang.reflect.Type, java.lang.Object, long) <variables>protected final non-sealed Class#RAW objectClass |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplValue.java | ObjectReaderImplValue | readObject | class ObjectReaderImplValue<I, T>
implements ObjectReader<T> {
final Type valueType;
final Class<I> valueClass;
final long features;
final Constructor<T> constructor;
final Method factoryMethod;
final Function<I, T> function;
final JSONSchema schema;
final Object emptyVariantArgs... |
if (valueReader == null) {
valueReader = jsonReader.getObjectReader(valueType);
}
I value = (I) valueReader.readObject(jsonReader, fieldType, fieldName, features | this.features);
if (value == null) {
return null;
}
if (schema != null) {
... | 575 | 354 | 929 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplValueInt.java | ObjectReaderImplValueInt | readObject | class ObjectReaderImplValueInt<T>
implements ObjectReader<T> {
final long features;
final IntFunction<T> function;
final JSONSchema schema;
public ObjectReaderImplValueInt(
Class<T> objectClass,
long features,
JSONSchema schema,
IntFunction<T> fun... |
if (jsonReader.nextIfNullOrEmptyString()) {
return null;
}
int value = jsonReader.readInt32Value();
if (schema != null) {
schema.validate(value);
}
T object;
try {
object = function.apply(value);
} catch (Exception e... | 359 | 119 | 478 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplValueString.java | ObjectReaderImplValueString | readObject | class ObjectReaderImplValueString<T>
implements ObjectReader<T> {
final long features;
final Function<String, T> function;
final JSONSchema schema;
public ObjectReaderImplValueString(
Class<T> objectClass,
long features,
JSONSchema schema,
Functio... |
if (jsonReader.nextIfNullOrEmptyString()) {
return null;
}
String value = jsonReader.readString();
if (schema != null) {
schema.validate(value);
}
T object;
try {
object = function.apply(value);
} catch (Exception ex... | 362 | 116 | 478 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderImplZonedDateTime.java | ObjectReaderImplZonedDateTime | readObject | class ObjectReaderImplZonedDateTime
extends DateTimeCodec implements ObjectReader {
static final ObjectReaderImplZonedDateTime INSTANCE = new ObjectReaderImplZonedDateTime(null, null);
public static ObjectReaderImplZonedDateTime of(String format, Locale locale) {
if (format == null) {
... |
JSONReader.Context context = jsonReader.getContext();
ZonedDateTime zdt;
if (jsonReader.isInt()) {
long millis = jsonReader.readInt64Value();
if (formatUnixTime) {
millis *= 1000;
}
Instant instant = Instant.ofEpochMilli(millis);... | 288 | 527 | 815 | <methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-s... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderInterface.java | ObjectReaderInterface | createInstance | class ObjectReaderInterface<T>
extends ObjectReaderAdapter<T> {
public ObjectReaderInterface(
Class objectClass,
String typeKey,
String typeName,
long features,
Supplier creator,
Function buildFunction,
FieldReader[] fieldRe... |
JSONObject object;
if (map instanceof JSONObject) {
object = (JSONObject) map;
} else {
object = new JSONObject(map);
}
return (T) TypeUtils.newProxyInstance(objectClass, object);
| 1,978 | 65 | 2,043 | <methods>public transient void <init>(Class#RAW, Supplier<T>, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.String, long, com.alibaba.fastjson2.schema.JSONSchema, Supplier<T>, Function#RAW, FieldReader#RAW[]) ,public transient void <init>(Class#RAW, java.lang.String, java.lang.... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderMisc.java | ObjectReaderMisc | readObject | class ObjectReaderMisc
implements ObjectReader {
static final long HASH_ADDRESS = Fnv.hashCode64("address");
static final long HASH_PORT = Fnv.hashCode64("port");
private final Class objectClass;
public ObjectReaderMisc(Class objectClass) {
this.objectClass = objectClass;
}
@O... |
if (jsonReader.nextIfNull()) {
return null;
}
if (objectClass == InetSocketAddress.class) {
InetAddress inetAddress = null;
int port = 0;
jsonReader.nextIfObjectStart();
while (!jsonReader.nextIfObjectEnd()) {
long na... | 132 | 224 | 356 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/AllOf.java | AllOf | validate | class AllOf
extends JSONSchema {
final JSONSchema[] items;
public AllOf(JSONSchema[] items) {
super(null, null);
this.items = items;
}
public AllOf(JSONObject input, JSONSchema parent) {
super(input);
JSONArray items = input.getJSONArray("allOf");
if (it... |
for (JSONSchema item : items) {
ValidateResult result = item.validate(value);
if (!result.isSuccess()) {
return result;
}
}
return SUCCESS;
| 512 | 55 | 567 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/AnyOf.java | AnyOf | validate | class AnyOf
extends JSONSchema {
final JSONSchema[] items;
public AnyOf(JSONSchema[] items) {
super(null, null);
this.items = items;
}
public AnyOf(JSONObject input, JSONSchema parent) {
super(input);
JSONArray items = input.getJSONArray("anyOf");
if (it... |
for (JSONSchema item : items) {
ValidateResult result = item.validate(value);
if (result == SUCCESS) {
return SUCCESS;
}
}
return FAIL_ANY_OF;
| 288 | 62 | 350 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/BooleanSchema.java | BooleanSchema | validate | class BooleanSchema
extends JSONSchema {
BooleanSchema(JSONObject input) {
super(input);
}
@Override
public Type getType() {
return Type.Boolean;
}
@Override
public ValidateResult validate(Object value) {<FILL_FUNCTION_BODY>}
@Override
public JSONObject toJ... |
if (value == null) {
return FAIL_INPUT_NULL;
}
if (value instanceof Boolean) {
return SUCCESS;
}
return new ValidateResult(false, "expect type %s, but %s", Type.Boolean, value.getClass());
| 114 | 76 | 190 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/EnumSchema.java | EnumSchema | validate | class EnumSchema
extends JSONSchema {
final Set<Object> items;
EnumSchema(Object... items) {
super(null, null);
this.items = new LinkedHashSet<>(items.length);
for (Object item : items) {
if (item instanceof BigDecimal) {
BigDecimal decimal = ((BigDec... |
if (value instanceof BigDecimal) {
BigDecimal decimal = (BigDecimal) value;
value = decimal.stripTrailingZeros();
long longValue = decimal.longValue();
if (decimal.compareTo(BigDecimal.valueOf(longValue)) == 0) {
value = longValue;
} ... | 333 | 332 | 665 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/Not.java | Not | validate | class Not
extends JSONSchema {
final JSONSchema schema;
final Type[] types;
final Boolean result;
public Not(JSONSchema schema, Type[] types, Boolean result) {
super(null, null);
this.schema = schema;
this.types = types;
this.result = result;
}
@Override... |
if (schema != null) {
if (schema.validate(value).isSuccess()) {
return FAIL_NOT;
}
}
if (types != null) {
for (Type type : types) {
switch (type) {
case String:
if (value instanceof ... | 137 | 441 | 578 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/NullSchema.java | NullSchema | validate | class NullSchema
extends JSONSchema {
NullSchema(JSONObject input) {
super(input);
}
@Override
public Type getType() {
return Type.Null;
}
@Override
public ValidateResult validate(Object value) {<FILL_FUNCTION_BODY>}
} |
if (value == null) {
return SUCCESS;
}
return new ValidateResult(false, "expect type %s, but %s", Type.Null, value.getClass());
| 83 | 52 | 135 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/OneOf.java | OneOf | validate | class OneOf
extends JSONSchema {
final JSONSchema[] items;
public OneOf(JSONSchema[] items) {
super(null, null);
this.items = items;
}
public OneOf(JSONObject input, JSONSchema parent) {
super(input);
JSONArray items = input.getJSONArray("oneOf");
if (it... |
int count = 0;
for (JSONSchema item : items) {
ValidateResult result = item.validate(value);
if (result.isSuccess()) {
count++;
if (count > 1) {
return FAIL_ONE_OF;
}
}
}
return count... | 288 | 96 | 384 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/UnresolvedReference.java | PropertyResolveTask | resolve | class PropertyResolveTask
extends ResolveTask {
final Map<String, JSONSchema> properties;
final String entryKey;
final String refName;
PropertyResolveTask(Map<String, JSONSchema> properties, String entryKey, String refName) {
this.properties = properties;
... |
Map<String, JSONSchema> defs = null;
if (root instanceof ObjectSchema) {
defs = ((ObjectSchema) root).defs;
} else if (root instanceof ArraySchema) {
defs = ((ArraySchema) root).defs;
}
if (defs == null) {
retu... | 127 | 130 | 257 | <methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/schema/ValidateResult.java | ValidateResult | getMessage | class ValidateResult {
private final boolean success;
final String format;
final Object[] args;
final ValidateResult cause;
String message;
public ValidateResult(ValidateResult cause, String format, Object... args) {
this.success = false;
this.format = format;
this.args ... |
if (message == null) {
if (format != null && args.length > 0) {
String s = String.format(format, args);
if (cause != null) {
s += "; " + cause.getMessage();
}
return message = s;
}
}
ret... | 229 | 84 | 313 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/stream/JSONStreamReader.java | JSONStreamReader | stat | class JSONStreamReader<T>
extends StreamReader<T> {
protected ObjectReaderAdapter objectReader;
public JSONStreamReader(Type[] types) {
super(types);
}
public JSONStreamReader(ObjectReaderAdapter objectReader) {
this.objectReader = objectReader;
}
public static JSONStr... |
if (stat == null) {
return;
}
if (value == null) {
stat.nulls++;
return;
}
stat.values++;
if (value instanceof Number) {
stat.numbers++;
if (value instanceof Byte || value instanceof Short || value instanceof... | 1,268 | 232 | 1,500 | <methods>public void <init>() ,public void <init>(java.lang.reflect.Type[]) ,public abstract T readLineObject() ,public Stream<T> stream() ,public Stream<T> stream(Class<T>) <variables>protected static final int SIZE_512K,protected List<com.alibaba.fastjson2.stream.StreamReader.ColumnStat> columnStats,protected Map<jav... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/stream/JSONStreamReaderUTF16.java | JSONStreamReaderUTF16 | seekLine | class JSONStreamReaderUTF16<T>
extends JSONStreamReader<T> {
char[] buf;
final Reader input;
final JSONReader.Context context;
JSONStreamReaderUTF16(Reader input, ObjectReaderAdapter objectReader) {
super(objectReader);
this.input = input;
this.context = JSONFactory.crea... |
if (buf == null) {
if (input != null) {
buf = new char[SIZE_512K];
int cnt = input.read(buf);
if (cnt == -1) {
inputEnd = true;
return false;
}
this.end = cnt;
}
... | 412 | 741 | 1,153 | <methods>public void <init>(java.lang.reflect.Type[]) ,public void <init>(ObjectReaderAdapter#RAW) ,public com.alibaba.fastjson2.stream.StreamReader.ColumnStat getColumnStat(java.lang.String) ,public static JSONStreamReader#RAW of(java.io.File) throws java.io.IOException,public static JSONStreamReader#RAW of(java.io.In... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/stream/JSONStreamReaderUTF8.java | JSONStreamReaderUTF8 | readLineObject | class JSONStreamReaderUTF8<T>
extends JSONStreamReader<T> {
byte[] buf;
final InputStream input;
final Charset charset;
final JSONReader.Context context;
JSONStreamReaderUTF8(InputStream input, Charset charset, Type[] types) {
super(types);
this.charset = charset;
th... |
try {
if (inputEnd) {
return null;
}
if (input == null) {
if (off >= end) {
return null;
}
}
boolean result = seekLine();
if (!result) {
return null;
... | 1,012 | 227 | 1,239 | <methods>public void <init>(java.lang.reflect.Type[]) ,public void <init>(ObjectReaderAdapter#RAW) ,public com.alibaba.fastjson2.stream.StreamReader.ColumnStat getColumnStat(java.lang.String) ,public static JSONStreamReader#RAW of(java.io.File) throws java.io.IOException,public static JSONStreamReader#RAW of(java.io.In... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/support/LambdaMiscCodec.java | ReflectToIntFunction | applyAsInt | class ReflectToIntFunction
implements ToIntFunction {
final Method method;
public ReflectToIntFunction(Method method) {
this.method = method;
}
public int applyAsInt(Object object) {<FILL_FUNCTION_BODY>}
} |
try {
return (Integer) method.invoke(object);
} catch (Exception e) {
throw new JSONException("applyAsInt error", e);
}
| 73 | 45 | 118 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/DynamicClassLoader.java | DynamicClassLoader | loadClass | class DynamicClassLoader
extends ClassLoader {
private static final java.security.ProtectionDomain DOMAIN;
private static final Map<String, Class<?>> classMapping = new HashMap<>();
private static final DynamicClassLoader instance = new DynamicClassLoader();
private final Map<String, Class> c... |
Class<?> mappingClass = classMapping.get(name);
if (mappingClass != null) {
return mappingClass;
}
Class clazz = classes.get(name);
if (clazz != null) {
return clazz;
}
ClassNotFoundException error;
try {
return super... | 1,445 | 193 | 1,638 | <methods>public void clearAssertionStatus() ,public final java.lang.Package getDefinedPackage(java.lang.String) ,public final java.lang.Package[] getDefinedPackages() ,public java.lang.String getName() ,public final java.lang.ClassLoader getParent() ,public static java.lang.ClassLoader getPlatformClassLoader() ,public ... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/Fnv.java | Fnv | hashCode64 | class Fnv {
public static final long MAGIC_HASH_CODE = 0xcbf29ce484222325L;
public static final long MAGIC_PRIME = 0x100000001b3L;
public static long hashCode64LCase(String name) {
boolean ascii = true;
long nameValue = 0;
int scoreCount = 0;
for (int i = 0; i < name.length... |
if (name.length() <= 8) {
boolean ascii = true;
long nameValue = 0;
for (int i = 0; i < name.length(); ++i) {
char ch = name.charAt(i);
if (ch > 0xFF || (i == 0 && ch == 0)) {
ascii = false;
break;
... | 687 | 302 | 989 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/GuavaSupport.java | ImmutableListConvertFunction | apply | class ImmutableListConvertFunction
implements Function {
@Override
public Object apply(Object object) {<FILL_FUNCTION_BODY>}
} |
if (CLASS_IMMUTABLE_LIST == null) {
CLASS_IMMUTABLE_LIST = TypeUtils.loadClass("com.google.common.collect.ImmutableList");
}
if (CLASS_IMMUTABLE_LIST == null) {
throw new JSONException("class not found : com.google.common.collect.ImmutableList");
... | 41 | 580 | 621 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/JdbcSupport.java | TimeWriter | write | class TimeWriter
extends DateTimeCodec
implements ObjectWriter {
public static final TimeWriter INSTANCE = new TimeWriter(null);
public TimeWriter(String format) {
super(format);
}
@Override
public void write(JSONWriter jsonWriter, Object obj... |
if (object == null) {
jsonWriter.writeNull();
return;
}
JSONWriter.Context context = jsonWriter.context;
if (formatUnixTime || context.isDateFormatUnixTime()) {
long millis = ((Date) object).getTime();
long... | 99 | 618 | 717 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/JodaSupport.java | LocalDateReader | readJSONBObject | class LocalDateReader
implements ObjectReader {
final Class objectClass;
final Constructor constructor3;
final Constructor constructor4;
final Class classISOChronology;
final Class classChronology;
final Object utc;
LocalDateReader(Class objectClass)... |
byte type = jsonReader.getType();
if (type == BC_LOCAL_DATE) {
LocalDate localDate = jsonReader.readLocalDate();
try {
return constructor3.newInstance(localDate.getYear(), localDate.getMonthValue(), localDate.getDayOfMonth());
... | 526 | 471 | 997 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/KotlinUtils.java | KotlinUtils | getConstructor | class KotlinUtils {
public static final int STATE;
static {
int state = 0;
try {
Class.forName("kotlin.Metadata");
state++;
Class.forName("kotlin.reflect.jvm.ReflectJvmMapping");
state++;
} catch (Throwable e) {
// Nothing
... |
int creatorParams = 0;
Constructor<?> creatorConstructor = null;
String[] paramNames = beanInfo.createParameterNames;
Constructor<?>[] constructors = BeanUtils.getConstructor(clazz);
for (Constructor<?> constructor : constructors) {
int paramCount = constructor.get... | 205 | 481 | 686 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/ParameterizedTypeImpl.java | ParameterizedTypeImpl | equals | class ParameterizedTypeImpl
implements ParameterizedType {
private final Type[] actualTypeArguments;
private final Type ownerType;
private final Type rawType;
@JSONCreator
public ParameterizedTypeImpl(Type[] actualTypeArguments, Type ownerType, Type rawType) {
this.actualTypeArgumen... |
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ParameterizedTypeImpl that = (ParameterizedTypeImpl) o;
// Probably incorrect - comparing Object[] arrays with Arrays.equals
if (!Arrays.equal... | 362 | 150 | 512 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/util/PropertiesUtils.java | PropertiesUtils | paths | class PropertiesUtils {
public static <T> T toJavaObject(Properties properties, Class<T> clazz) {
return toJavaObject(properties, JSONFactory.getDefaultObjectReaderProvider(), clazz);
}
public static <T> T toJavaObject(
Properties properties,
ObjectReaderProvider provider,
... |
if (javaObject == null) {
return;
}
String p = values.put(javaObject, parent);
if (p != null) {
Class<?> type = javaObject.getClass();
boolean basicType = type == String.class
|| type == Boolean.class
|| type =... | 456 | 949 | 1,405 | <no_super_class> |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBigDecimalField.java | FieldWriterBigDecimalField | write | class FieldWriterBigDecimalField<T>
extends FieldWriter<T> {
FieldWriterBigDecimalField(
String name,
int ordinal,
long features,
String format,
String label,
Field field
) {
super(name, ordinal, features, format, null, labe... |
BigDecimal value = (BigDecimal) getFieldValue(object);
if (value == null) {
long features = this.features | jsonWriter.getFeatures();
if ((features & JSONWriter.Feature.WriteNulls.mask) == 0) {
return false;
}
}
writeFieldName(jsonWri... | 191 | 108 | 299 | <methods>public int compareTo(java.lang.Object) ,public java.lang.Object getFieldValue(T) ,public Function#RAW getFunction() ,public ObjectWriter#RAW getInitWriter() ,public Class#RAW getItemClass() ,public java.lang.reflect.Type getItemType() ,public ObjectWriter#RAW getItemWriter(com.alibaba.fastjson2.JSONWriter, jav... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBigDecimalFunc.java | FieldWriterBigDecimalFunc | write | class FieldWriterBigDecimalFunc<T>
extends FieldWriter<T> {
final Function<T, BigDecimal> function;
FieldWriterBigDecimalFunc(
String fieldName,
int ordinal,
long features,
String format,
String label,
Field field,
Meth... |
BigDecimal value;
try {
value = function.apply(object);
} catch (RuntimeException error) {
if (jsonWriter.isIgnoreErrorGetter()) {
return false;
}
throw error;
}
if (value == null) {
long features = thi... | 277 | 152 | 429 | <methods>public int compareTo(java.lang.Object) ,public java.lang.Object getFieldValue(T) ,public Function#RAW getFunction() ,public ObjectWriter#RAW getInitWriter() ,public Class#RAW getItemClass() ,public java.lang.reflect.Type getItemType() ,public ObjectWriter#RAW getItemWriter(com.alibaba.fastjson2.JSONWriter, jav... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBigDecimalMethod.java | FieldWriterBigDecimalMethod | getFieldValue | class FieldWriterBigDecimalMethod<T>
extends FieldWriter<T> {
FieldWriterBigDecimalMethod(
String fieldName,
int ordinal,
long features,
String format,
String label,
Field field,
Method method
) {
super(fieldName... |
try {
return method.invoke(object);
} catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
throw new JSONException("invoke getter method error, " + fieldName, e);
}
| 372 | 59 | 431 | <methods>public int compareTo(java.lang.Object) ,public java.lang.Object getFieldValue(T) ,public Function#RAW getFunction() ,public ObjectWriter#RAW getInitWriter() ,public Class#RAW getItemClass() ,public java.lang.reflect.Type getItemType() ,public ObjectWriter#RAW getItemWriter(com.alibaba.fastjson2.JSONWriter, jav... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBigIntField.java | FieldWriterBigIntField | write | class FieldWriterBigIntField<T>
extends FieldWriter<T> {
FieldWriterBigIntField(
String name,
int ordinal,
long features,
String format,
String label,
Field field
) {
super(name, ordinal, features, format, null, label, BigIn... |
BigInteger value = (BigInteger) getFieldValue(object);
if (value == null) {
long features = this.features | jsonWriter.getFeatures();
if ((features & JSONWriter.Feature.WriteNulls.mask) == 0) {
return false;
}
}
writeFieldName(jsonWri... | 182 | 103 | 285 | <methods>public int compareTo(java.lang.Object) ,public java.lang.Object getFieldValue(T) ,public Function#RAW getFunction() ,public ObjectWriter#RAW getInitWriter() ,public Class#RAW getItemClass() ,public java.lang.reflect.Type getItemType() ,public ObjectWriter#RAW getItemWriter(com.alibaba.fastjson2.JSONWriter, jav... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBigIntFunc.java | FieldWriterBigIntFunc | write | class FieldWriterBigIntFunc<T>
extends FieldWriter<T> {
final Function<T, BigInteger> function;
FieldWriterBigIntFunc(
String fieldName,
int ordinal,
long features,
String format,
String label,
Field field,
Method metho... |
BigInteger value = function.apply(o);
if (value == null) {
long features = this.features | jsonWriter.getFeatures();
if ((features & JSONWriter.Feature.WriteNulls.mask) == 0) {
return false;
}
}
writeFieldName(jsonWriter);
json... | 271 | 98 | 369 | <methods>public int compareTo(java.lang.Object) ,public java.lang.Object getFieldValue(T) ,public Function#RAW getFunction() ,public ObjectWriter#RAW getInitWriter() ,public Class#RAW getItemClass() ,public java.lang.reflect.Type getItemType() ,public ObjectWriter#RAW getItemWriter(com.alibaba.fastjson2.JSONWriter, jav... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBoolMethod.java | FieldWriterBoolMethod | getFieldValue | class FieldWriterBoolMethod
extends FieldWriterBoolean {
FieldWriterBoolMethod(
String fieldName,
int ordinal,
long features,
String format,
String label,
Field field,
Method method,
Class fieldClass
) {
... |
try {
return method.invoke(object);
} catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
throw new JSONException("invoke getter method error, " + fieldName, e);
}
| 126 | 59 | 185 | <methods>public ObjectWriter#RAW getObjectWriter(com.alibaba.fastjson2.JSONWriter, Class#RAW) ,public boolean write(com.alibaba.fastjson2.JSONWriter, java.lang.Object) ,public final void writeBool(com.alibaba.fastjson2.JSONWriter, boolean) ,public void writeValue(com.alibaba.fastjson2.JSONWriter, java.lang.Object) <var... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBoolVal.java | FieldWriterBoolVal | write | class FieldWriterBoolVal
extends FieldWriterBoolean {
FieldWriterBoolVal(
String name,
int ordinal,
long features,
String format,
String label,
Type fieldType,
Class fieldClass,
Field field,
Method me... |
boolean value;
try {
value = (Boolean) getFieldValue(object);
} catch (RuntimeException error) {
if (jsonWriter.isIgnoreErrorGetter()) {
return false;
}
throw error;
}
if (!value) {
long features = this... | 133 | 144 | 277 | <methods>public ObjectWriter#RAW getObjectWriter(com.alibaba.fastjson2.JSONWriter, Class#RAW) ,public boolean write(com.alibaba.fastjson2.JSONWriter, java.lang.Object) ,public final void writeBool(com.alibaba.fastjson2.JSONWriter, boolean) ,public void writeValue(com.alibaba.fastjson2.JSONWriter, java.lang.Object) <var... |
alibaba_fastjson2 | fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/FieldWriterBoolValField.java | FieldWriterBoolValField | getFieldValueBoolean | class FieldWriterBoolValField
extends FieldWriterBoolVal {
FieldWriterBoolValField(
String fieldName,
int ordinal,
long features,
String format,
String label,
Field field,
Class fieldClass
) {
super(fieldName, or... |
if (object == null) {
throw new JSONException("field.get error, " + fieldName);
}
try {
boolean value;
if (fieldOffset != -1) {
value = UNSAFE.getBoolean(object, fieldOffset);
} else {
value = field.getBoolean(obje... | 151 | 132 | 283 | <methods>public boolean write(com.alibaba.fastjson2.JSONWriter, java.lang.Object) <variables> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.