Releases: drapostolos/type-parser
Releases · drapostolos/type-parser
v0.8.1
v0.7.0
- New features, enhancements:
- Add support for
java.nio.file.Path
. - Code is now built with Java 8.
- Internal refactorings/code improvements using Java8 features.
- Add support for
v0.6.0
- New features, enhancements:
- add single argument static factory method support, regardless of method name. #29
- Added optional support for PropertyEditor #30
- Internal refactorings/code improvements. #30
- This change contains a potential (minor) breaking change.
Internally, client registeredDynamicParser
's are now executed after type lookup for regularParser
's. In other
words, if a Parser matching a given type exists it will be used and noDynamicParser
's will be called.
- This change contains a potential (minor) breaking change.
v0.5.0
v0.4.0
- New features, enhancements:
- Introduced
NullStringStrategy
interface according to #21. - [NBC] Changed contract for
InputPreprocessor
interface, in favor ofNullStringStrategy
above.
(the actual contract change is: prepare(...) method does not support returning null objects any more).
- Introduced
- Bugfixes:
- None...
v.0.3.0
- New features, enhancements:
- Introduced
DynamicParser
interface, which gives clients a way to decide in runtime if a String can be parsed to any given type (according to #18). - [NBC] Removed method
TypeParserBuilder.registerParserForTypesAssignableTo(Class<?>, Parser<?>)
in favor ofDynamicParser
above. - Introduced new
TypeParserException
which is now thrown when parsing process fails. - [NBC] renamed
NoSuchRegisteredTypeParserException
toNoSuchRegisteredParserException
- Introduced new methods available in all
*Helper
classes (according to #17)Type getTargetType()
List<Class<T>> getParameterizedClassArguments()
Class<T> getParameterizedClassArgumentByIndex(int)
Class<T> getTargetClass()
Class<T> getRawTargetClass()
boolean isTargetTypeParameterized()
boolean isTargetTypeAssignableTo(Class<?>)
boolean isTargetTypeEqualTo(Class<?>)
boolean isTargetTypeEqualTo(GenericType<?>)
boolean isRawTargetClassAnyOf(Class<?>...)
- Added support for these
Map
subinterfaces:java.util.concurrent.ConcurrentMap
java.util.concurrent.ConcurrentNavigableMap
java.util.NavigableMap
java.util.SortedMap
- Added support for these
Map
implementations:java.util.concurrent.ConcurrentHashMap
java.util.concurrent.ConcurrentSkipListMap
java.util.Hashtable
java.util.IdentityHashMap
java.util.HashMap
java.util.TreeMap
java.util.WeakHashMap
- Added support for these
Collection
subinterfaces:java.util.concurrent.BlockingQueue
java.util.concurrent.BlockingDeque
java.util.Deque
java.util.Queue
java.util.NavigableSet
java.util.SortedSet
- Added support for these
Collection
implementations:java.util.concurrent.ConcurrentLinkedQueue
java.util.concurrent.ConcurrentSkipListSet
java.util.concurrent.CopyOnWriteArrayList
java.util.concurrent.CopyOnWriteArraySet
java.util.concurrent.LinkedBlockingDeque
java.util.concurrent.LinkedBlockingQueue
java.util.concurrent.PriorityBlockingQueue
java.util.ArrayDeque
java.util.HashSet
java.util.LinkedList
java.util.PriorityQueue
java.util.Stack
java.util.TreeSet
java.util.Vector
- Added support for custom made classes with a static
valueOf(...)
method, where the argument can be any supported type, not just String. - Added support for custom made classes with a private static
valueOf(...)
method. - Added support for custom made classes with a single argument constructor where the argument can be of any supported type.
- Added support for custom made classes with a private single argument constructor.
- Introduced
- Bugfixes:
- None...
v.0.2.0
- New features, enhancements:
- [NBC] Renamed these classes/interface/methods according to issue #10
interface TypeParser
->interface Parser
class StringToTypeParser
->class TypeParser
StringToTypeParserBuilder
->TypeParserBuilder
StringToTypeParserBuilder.registerTypeParser(...)
->registerParser(...)
StringToTypeParserBuilder.unregisterTypeParser(...)
->unregisterParser(...)
- Possible to register
Parser
for all sub-classes of a super-class according to issue #7- see new method:
TypeParserBuilder.registerParserForTypesAssignableTo(Class<?>, Parser<?>)
- see new method:
- Added support for these java types
java.net.URL
java.net.URI
java.math.BigInteger
- Re-factored unit tests
- Added these new methods according to issue #11
ParserHelper.getTargetClass() : Class<T>
ParserHelper.getParameterizedClassArguments() : List<Class<T>>
ParserHelper.getParameterizedClassArgumentByIndex(int index) : Class<T>
- [NBC] Renamed these classes/interface/methods according to issue #10
- Bugfixes:
- It is not possible to parse string to Class #5
v0.1.0
This is the first initial release.
Add this in your pom.xml:
<dependency>
<groupId>com.github.drapostolos</groupId>
<artifactId>type-parser</artifactId>
<version>0.1.0</version>
</dependency>