DeepLinkDispatch icon indicating copy to clipboard operation
DeepLinkDispatch copied to clipboard

Move parameter parsing to compile time

Open felipecsl opened this issue 10 years ago • 2 comments

We could move the regex code that extracts parameters from the URI into compile time by baking that into the processor

felipecsl avatar Jul 07 '15 01:07 felipecsl

That would also help for a request of mine - the generation of a Parameters class that lists all used parameters for a specific URL configuration. Like, when you have

@DeepLink("foo://bar/{baz}/{bla}")
public class SomeActivity extends Activity { ... }

it would create this

public interface DeepLinkParams {
    public interface SomeActivity {
        String BAZ = "baz";
        String BLA = "bla";
    }
}

This would enable us to access URL parameters by constants at compile time, without having them "silently" drift apart over time, but instead error out in the face if something changed.

realdadfish avatar Dec 14 '15 17:12 realdadfish

yeah, that's pretty much what I had in mind

felipecsl avatar Dec 16 '15 07:12 felipecsl