CLASSES IN THIS EDGE PACKAGE ARE INTENDED ONLY FOR BOOST INTERNAL USE
YOU ARE PROBABLY WANTING THE AUTO-EDGE MAGIC :)
Edge classes are very thin. There are written to achieve the following:
- Wrap the JDK APIs in interfaces.
- Map any checked exceptions to unchecked exceptions.
Any logic inside edge classes is frowned upon. We experimented with mapping every checked
exception to an equivalent unchecked exception but analysis of handling has indicated wrapping
every checked exception in a single runtime edge exception.
Current design decisions:
- Add methods and classes on demand only.
- Do not perform any null checking.
- All classes are final.
- Edge classes are not object oriented.
- The edge method matches the original method with the addition of a first parameter - the object to
operate on.
- No static keywords anywhere.
- All checked exceptions are mapped to an EdgeException.
- Edge interface is "Edge"classname.
- Edge implementation is "DefaultEdge"classname.
- Edge implementations have a single public no-arg constructor which is not seen.
- We allow duplication where implied by the APIs being edged.
Outstanding questions/issues include:
- What sort of Primordial object should edge implementations extend?
Tried:
- Attempted to make the edge classes object oriented. This overly compicated the edge classes. It
also forced clients to pass Edge* classes around everywhere. We also had to implement methods which
do not throw exceptions, although this is a good thing for mocking.