@@ -57,6 +57,24 @@ public EntityGraph(
57
57
.addStatement ("this.delegate = delegate" )
58
58
.build ();
59
59
60
+ MethodSpec emptyStaticMethod =
61
+ MethodSpec .methodBuilder ("empty" )
62
+ .addModifiers (Modifier .PUBLIC , Modifier .STATIC )
63
+ .returns (entityGraphClassName )
64
+ .addStatement ("return $N().$N()" , Constants .PATH_SEPARATOR , Constants .PATH_SEPARATOR )
65
+ .build ();
66
+
67
+ MethodSpec emptyStaticMethodWithEntityGraphType =
68
+ MethodSpec .methodBuilder ("empty" )
69
+ .addModifiers (Modifier .PUBLIC , Modifier .STATIC )
70
+ .addParameter (Constants .ENTITY_GRAPH_TYPE_CLASS_NAME , "entityGraphType" )
71
+ .returns (entityGraphClassName )
72
+ .addStatement (
73
+ "return $N(entityGraphType).$N()" ,
74
+ Constants .PATH_SEPARATOR ,
75
+ Constants .PATH_SEPARATOR )
76
+ .build ();
77
+
60
78
MethodSpec rootStaticMethod =
61
79
MethodSpec .methodBuilder (Constants .PATH_SEPARATOR )
62
80
.addModifiers (Modifier .PUBLIC , Modifier .STATIC )
@@ -95,6 +113,8 @@ public EntityGraph(
95
113
.addField (delegateField )
96
114
.addMethod (emptyConstructor )
97
115
.addMethod (constructor )
116
+ .addMethod (emptyStaticMethod )
117
+ .addMethod (emptyStaticMethodWithEntityGraphType )
98
118
.addMethod (rootStaticMethod )
99
119
.addMethod (rootStaticMethodWithEntityGraphType )
100
120
.addMethod (getEntityGraphTypeMethod )
0 commit comments