1111 */
1212package org .emfjson .jackson .databind .deser ;
1313
14- import com .fasterxml .jackson .databind .*;
15- import com .fasterxml .jackson .databind .introspect .AnnotatedMember ;
16- import com .fasterxml .jackson .databind .jsonFormatVisitors .JsonObjectFormatVisitor ;
14+ import com .fasterxml .jackson .databind .BeanProperty ;
15+ import com .fasterxml .jackson .databind .JavaType ;
16+ import com .fasterxml .jackson .databind .PropertyMetadata ;
17+ import com .fasterxml .jackson .databind .PropertyName ;
18+ import com .fasterxml .jackson .databind .introspect .AnnotationMap ;
1719import com .fasterxml .jackson .databind .type .SimpleType ;
1820import org .eclipse .emf .ecore .EObject ;
1921import org .eclipse .emf .ecore .resource .Resource ;
2022import org .eclipse .emf .ecore .resource .ResourceSet ;
2123import org .emfjson .common .ReferenceEntries ;
2224
23- import java .lang .annotation .Annotation ;
24-
25- public class ResourceProperty implements BeanProperty {
25+ public class ResourceProperty extends BeanProperty .Std {
2626
2727 private final ResourceSet resourceSet ;
2828 private final Resource resource ;
2929 private final ReferenceEntries entries ;
3030
31+ private static final JavaType type = SimpleType .construct (EObject .class );
32+ private static final PropertyName propertyName = PropertyName .construct ("contents" , "org.emfjson.resource" );
33+
3134 public ResourceProperty (ResourceSet resourceSet , Resource resource , ReferenceEntries entries ) {
35+ super (propertyName , type , propertyName , new AnnotationMap (), null , PropertyMetadata .STD_REQUIRED );
3236 this .resourceSet = resourceSet ;
3337 this .resource = resource ;
3438 this .entries = entries ;
@@ -46,52 +50,4 @@ public ReferenceEntries getEntries() {
4650 return entries ;
4751 }
4852
49- @ Override
50- public String getName () {
51- return "contents" ;
52- }
53-
54- @ Override
55- public PropertyName getFullName () {
56- return PropertyName .construct ("contents" , "org.emfjson.resource" );
57- }
58-
59- @ Override
60- public JavaType getType () {
61- return SimpleType .construct (EObject .class );
62- }
63-
64- @ Override
65- public PropertyName getWrapperName () {
66- return null ;
67- }
68-
69- @ Override
70- public PropertyMetadata getMetadata () {
71- return null ;
72- }
73-
74- @ Override
75- public boolean isRequired () {
76- return false ;
77- }
78-
79- @ Override
80- public <A extends Annotation > A getAnnotation (Class <A > acls ) {
81- return null ;
82- }
83-
84- @ Override
85- public <A extends Annotation > A getContextAnnotation (Class <A > acls ) {
86- return null ;
87- }
88-
89- @ Override
90- public AnnotatedMember getMember () {
91- return null ;
92- }
93-
94- @ Override
95- public void depositSchemaProperty (JsonObjectFormatVisitor objectVisitor ) throws JsonMappingException {}
96-
9753}
0 commit comments