FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java/src/main/java/com/jsoniter/Binding.java at master · akan/java · GitHub
akan
/
java
Public
forked from
json-iterator/java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
java
/
src
/
main
/
java
/
com
/
jsoniter
/
Binding.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
54 lines (46 loc) · 1.45 KB
Breadcrumbs
java
/
src
/
main
/
java
/
com
/
jsoniter
/
Binding.java
Copy path
File metadata and controls
54 lines (46 loc) · 1.45 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package
com
.
jsoniter
;
import
java
.
lang
.
annotation
.
Annotation
;
import
java
.
lang
.
reflect
.
Type
;
public
class
Binding
{
// input
public
Class
clazz
;
public
String
name
;
public
Type
valueType
;
public
Annotation
[]
annotations
;
// output
public
String
[]
fromNames
;
public
Decoder
decoder
;
public
<
T
extends
Annotation
>
T
getAnnotation
(
Class
<
T
>
annotationClass
) {
if
(
annotations
==
null
) {
return
null
;
}
for
(
Annotation
annotation
:
annotations
) {
if
(
annotationClass
.
isAssignableFrom
(
annotation
.
getClass
())) {
return
(
T
)
annotation
;
}
}
return
null
;
}
@
Override
public
boolean
equals
(
Object
o
) {
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
() !=
o
.
getClass
())
return
false
;
Binding
binding
= (
Binding
)
o
;
if
(
clazz
!=
null
? !
clazz
.
equals
(
binding
.
clazz
) :
binding
.
clazz
!=
null
)
return
false
;
return
name
!=
null
?
name
.
equals
(
binding
.
name
) :
binding
.
name
==
null
;
}
@
Override
public
int
hashCode
() {
int
result
=
clazz
!=
null
?
clazz
.
hashCode
() :
0
;
result
=
31
*
result
+ (
name
!=
null
?
name
.
hashCode
() :
0
);
return
result
;
}
@
Override
public
String
toString
() {
return
"Binding{"
+
"clazz="
+
clazz
+
", name='"
+
name
+
'\''
+
", valueType="
+
valueType
+
'}'
;
}
}
Back
|
FazBrowse Home
|
New Git URL