forked from json-iterator/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExtension.java
More file actions
30 lines (26 loc) · 783 Bytes
/
Extension.java
File metadata and controls
30 lines (26 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.jsoniter;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
public interface Extension {
/**
* Customize field of certain kind, for example having certain annotation
*
* @param field the field reflection object
* @return null, if no special customization needed
*/
Decoder createDecoder(Field field);
/**
* Customize the field map to
*
* @param field the field reflection object
* @return null, if fallback to default behavior
*/
String[] getAlternativeFieldNames(Field field);
/**
* Generate source code for creating new instance
*
* @param type the type of new object to create
* @return generated source code
*/
String codegenNewInstance(Type type);
}