@@ -168,8 +168,6 @@ private void addToElementAndNested(Reflection reflection, Element element) {
168168 }
169169
170170 private void addElement (Element element , Reflection annotation ) {
171- // final Symbol.ClassSymbol symbol = (Symbol.ClassSymbol) element;
172- // ((Symbol.ClassSymbol) element).sourcefile.de
173171 logger .debug (
174172 "m=addElement, asType=%s, kind=%s, simpleName=%s, enclosing=%s, clazz=%s" ,
175173 element .asType (), element .getKind (), element .getSimpleName (),
@@ -184,9 +182,13 @@ private void addElement(Element element, Reflection annotation) {
184182 }
185183
186184 private void writeObjects () {
185+
187186 final String classPackage = this .getClassPackage ();
188187 final String reflectFile = solvePath (classPackage , "reflect.json" );
189188 final String reflectFileThirdParty = solvePath (classPackage , "reflect-third-party.json" );
189+
190+ this .subtractSourceFromThirdPartyClass ();
191+
190192 try (
191193 ReflectionConfigWriter appender =
192194 new ReflectionConfigWriter (this .processingEnv , reflectFile );
@@ -213,6 +215,10 @@ private void writeObjects() {
213215 }
214216 }
215217
218+ boolean subtractSourceFromThirdPartyClass () {
219+ return this .classes .removeAll (this .thirdPartyClasses );
220+ }
221+
216222 private String getClassPackage () {
217223 return this .classPackage == null ? "graal-reflection-configuration" : this .classPackage ;
218224 }
0 commit comments