Reflection access from context objects
See original GitHub issueIn the version 2.6.1 (currently the latest version), it is no longer possible to access the relevant reflection object from the relevant context objects. For example, when writing a custom OperationBuilderPlugin
in version 2.5.0, I could get the appropriate java.lang.reflect.Method
from the OperationContext
by calling context.getHandlerMethod().getMethod();
but I no longer see any way to accomplish this.
Assuming you don’t want to prevent developers from writing custom plugins that require access to reflection-based objects like this, I can see 3 options:
- Add back
getHandlerMethod()
and similar methods to various context objects for full backward-compatibility (I assume you had a reason for removing the method in the first place, so I don’t expect this will be a viable option) - Add a method to the context object to access the reflection object directly, like
OperationContext.getReflectionMethod()
- Add some kind of mechanism for developers to provide their own implementation of context objects
Depending on the approach, I would be happy to work on this and submit a pull request.
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (18 by maintainers)
Top Results From Across the Web
CustomReflectionContext Class (System.Reflection.Context)
CustomReflectionContext provides a way for you to add or remove custom attributes from reflection objects, or add dummy properties to those objects, without...
Read more >sql - Acessing Calling Context from a Reflection Assembly in C#
I have a windows service written in C# that sends emails based on variables in an XML file this includes access to SQL...
Read more >Attachmate.Reflection.Objects.Emulation.Common Library
Common Library. Represents an individual item within a context menu. Defines valid values used to determine a field's attributes. HostField represents a field ......
Read more >How to: Load Assemblies into the Reflection-Only Context
The reflection-only load context allows you to examine assemblies compiled for other platforms or for other versions of the .NET Framework.
Read more >ReflectivePropertyAccessor (Spring Framework 6.0.2 API)
A powerful PropertyAccessor that uses reflection to access properties for reading and possibly also for writing on a target instance.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
what about this? https://gitee.com/largerfish/swagger-doc
You know you can use something like
@Description
annotation and create your own plugin to read that right?