-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor/code structure #27
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Even though the implementing class for the empty argument list is an immutable argument list it does not completely reflect the usage for the actual argument list. An immutable argument list would normally contain elements but those cannot be changed. This does not contain elements and these cannot be changed.
Separate the attribute entry from the normal entry as the attribute entry itself is a different form of entry that does not need to be implemented in every type of entry.
Even though the generics would lead to more resilient code if there would be an extension, it can be confusing and if often quite fiddley. It is also only important for people that want to extend and if that happens they have the ability to check that for themselves.
The default parser construction shall be completely done by the builder as they are the ones that are responsible for different construction of parsers and they already have most constructs that allow this. This meant hat previously the some things were redundant, which is now removed.
Increase the project Java version to get the new Java features.
The selection logic is now moved to the Selectables because this results in clearer code (before the method returned a function that checks every single element and now the elements are just checked by the Selectable). It is also beneficial if this is being extended as now the developer has a lot more control over the logic behind the selection.
Even though lists are quite useful in Java, they shouldn't really be used for data that is static and won't change again.
As the project is now being compiled in Java 16 there is the record feature which allows for getter, equals, hashCode, toString, etc. generation which makes the code more clean and stable as there is less room for mistakes.
As the Locale class is the default class in the JDK it is a lot more sensible to use that class because it can be used in more scenarios.
As the toString method in Exceptions shouldn't really be overridden and the getLocalizedMessage is the correct method for provinding the reason of the Exception it is being changed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.