Class ReflectionParser
java.lang.Object
com.cryptomorin.xseries.reflection.parser.ReflectionParser
Note: Currently, if XSeries is included as a library, the @Language annotation doesn't work
even if you have the sources downloaded, this is unfortunately
a bug with IntelliJ.
This class should not be used directly.
This class is designed to be able to parse Java declarations only in a loose way, as it also supports more simplified syntax (for example not requiring semicolons) which even works much better if you're using IntelliJ because of the string highlighting.
Performance & Caching
All XReflection APIs that use this feature, use heavy RegEx patterns which sacrifices a lot of performance for readability. Please readXReflection's Performance & Caching
section for more information about how to properly cache this.
TODO Add better support for inner classes. Read includeInnerClassOf(com.cryptomorin.xseries.reflection.jvm.MemberHandle) for more info.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckedPackages(String... checkedPackages) imports(ReflectiveNamespace namespace) <T extends DynamicClassHandle>
TparseClass(T classHandle) <T extends ConstructorMemberHandle>
TparseConstructor(T ctorHandle) <T extends FieldMemberHandle>
TparseField(T fieldHandle) <T extends MethodMemberHandle>
TparseMethod(T methodHandle)
-
Constructor Details
-
ReflectionParser
-
-
Method Details
-
checkedPackages
public ReflectionParser checkedPackages(@Pattern("(\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*\\.)*\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*") String... checkedPackages) -
imports
-
parseClass
-
parseConstructor
-
parseMethod
-
parseField
-