Package org.immutables.processor
Class ProxyProcessor
java.lang.Object
org.immutables.processor.ProxyProcessor
- All Implemented Interfaces:
Processor
Proxy processor to overcome eclipse class loading problems which renders our workarounds
for Eclipse bugs and quirks useless. When the condition is not detected we try to use direct
delegation to
org.immutables.value.processor.Processor.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ClassLoaderprivate final Processorprivate static final Stringprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ProcessorWe find the delegating classloader by traversing the call stack and looking for the first class that has a classloader from the Eclipse namespace.private static ProcessorIterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) voidinit(ProcessingEnvironment processing) booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment round) private static boolean
-
Field Details
-
DELEGATE_CLASS
- See Also:
-
ECLIPSE_PACKAGE_PREFIX
- See Also:
-
OSGI_SYSTEM_PROPERTY
- See Also:
-
cachedProxyClassLoader
-
delegate
-
-
Constructor Details
-
ProxyProcessor
public ProxyProcessor()
-
-
Method Details
-
getSupportedOptions
- Specified by:
getSupportedOptionsin interfaceProcessor
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypesin interfaceProcessor
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersionin interfaceProcessor
-
init
-
process
-
getCompletions
public Iterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) - Specified by:
getCompletionsin interfaceProcessor
-
createDefaultDelegate
-
createClassLoaderDelegate
We find the delegating classloader by traversing the call stack and looking for the first class that has a classloader from the Eclipse namespace. This is bound to be the bundle classloader of a JDT bundle which can load the required Eclipse compiler types. NOTE: We cannot simply use the thread context class loader. This works in the Eclipse IDE (where it is set to ContextFinder), but not in the JDT Language Server. -
requiresClassLoaderDelegate
private static boolean requiresClassLoaderDelegate()
-