igloo-project / bindgen Goto Github PK
View Code? Open in Web Editor NEWdata binding framework
Home Page: http://www.bindgen.org
License: Other
data binding framework
Home Page: http://www.bindgen.org
License: Other
Using transient sub-binding may be an interesting trick for Serializable behavior. It should not trigger any regression, and enhance serialization performance.
Maybe allowing to use a Binding registry (at least for rootless bindings) can be interesting.
We should at least a better equals/hashCode implementation (as for the moment two bindings for the same class are not instance-equal after a deserialization).
Code uses .toUri()
, which converts spaces in the path to %20
escape codes, which are not de-escaped later when they're used as File
paths. Problematic code:
There might be other characters besides spaces in the URI spec that would get escaped. It's probably better to stick with URI
s and try to resolve the config file against URIs all the way up to the root of the filesystem (if we're to keep looking for bindgen.properties
up to the filesystem root, which is questionable).
For now, bindgen does not handle already used generic placeholders.
If we bind a GenericClass<P>, it fails because we use P placeholder twice (one from the bound class, one from the binding).
[edited 29.11.2018 to escape tags, so that issue can be read]
Need to be done to migrate toward ft-lambda:
About <R, T>
-> <R, P, T>
: before lambda, information about parent binding were known by the fact the MyBinding was an inner class. With lambda, Type Binding is completely independant from parent Binding. So we need to inject some more information, like P, the type of the parent binding.
P allow to use type-constrained Getter and Setter.
Current behavior: when target type is generic, we use plain old inner binding classes.
We should move to lambda expressions.
Two cases must be handled:
private Map field;
for exampleprivate Map<? extends K, V>
or private Map<K, ? extends K> field
or private Map<? extends K, ? extends V> field
private Map<?, V>
or private Map<K, ?> field
or private Map<?, ?> field
For raw type, we need to build a custom TypeRawBindingPath<R, P, T> extends AbstractBinding<R, P, T, Type> as a binding base class.
Not sure if constrained and unconstrained types are really different cases.
Lambda expression with getter method (x) -> x.getAttribute()
can be replaced by method reference (ObjectType::getAttribute).
See what is possible / needed for callable bindings.
ft-lambda feature is a rewrite of bindgen to use lambda expression instead of inner private classes. One goal of this rewrite is to get rid of all the *$Binding.class that can slow down compilation and IDE.
We also take the occasion to do a full cleanup of code and prospect some new feature (advanced configuration).
In JDK 8 ElementType.TYPE_USE
got introduced which makes it possible to annotate a type on type use. Type annotations like @Nullable
, @NotNull
etc. are prime examples of this. Bindgen doesn't handle these cases correctly when run through javac
, because AnnotatedType.toString()
used at
javac
returns a similar string:
(@TypeAnnotation :: TypeName)
which is unexpected by the processor, and therefore generates invalid java code. Under Eclipse Compiler for Java, it happens to run correctly, because of a different toString()
implementation on AnnotatedType
that returns only the type name.
ContainerBinding is handled on inner-class ; we need to correctly implement it with lambda bindings.
We can do:
public boolean isContainer()
implements ContainerBinding
on the *BindingPath
class.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.