The {@link DefaultVarExploder} is a {@link VarExploder} implementation that takes in a Java object andextracts the properties for use in a URI Template. Given the following URI expression:
/mapper{?address*}
And this Java object for an address:
Address address = new Address(); address.setState("CA"); address.setCity("Newport Beach"); String result = UriTemplate.fromExpression("/mapper{?address*}").set("address", address).expand();
The expanded URI will be:
/mapper?city=Newport%20Beach&state=CA
The {@link DefaultVarExploder} breaks down the object properties as follows:
|
|
|
|