for ( String name : beanInfo.getCreatorParameters().keySet() ) { String variableName = String.format( INSTANCE_BUILDER_VARIABLE_FORMAT, propertyIndex++ ); propertyNameToVariableBuilder.put( name, variableName ); PropertyInfo propertyInfo = properties.get( name );
creatorParameters.put( creators.get( 0 ).getParameters()[i].getAnnotation( JsonProperty.class ).value(), creators .get( creators.size() - 1 ).getParameters()[i] );
private static ImmutableMap<JClassType, String> extractMetadata( TreeLogger logger, RebindConfiguration configuration, JClassType type, Optional<JsonTypeInfo> jsonTypeInfo, Optional<JsonSubTypes> propertySubTypes, Optional<JsonSubTypes> typeSubTypes, ImmutableList<JClassType> allSubtypes ) throws UnableToCompleteException { ImmutableMap.Builder<JClassType, String> classToMetadata = ImmutableMap.builder(); classToMetadata.put( type, extractTypeMetadata( logger, configuration, type, type, jsonTypeInfo .get(), propertySubTypes, typeSubTypes, allSubtypes ) ); for ( JClassType subtype : allSubtypes ) { classToMetadata.put( subtype, extractTypeMetadata( logger, configuration, type, subtype, jsonTypeInfo .get(), propertySubTypes, typeSubTypes, allSubtypes ) ); } return classToMetadata.build(); }
@Override public Map<String, GssFunction> get() { Map<String, GssFunction> gssFunctionMap = super.get(); return ImmutableMap.<String, GssFunction>builder().putAll(gssFunctionMap) // TODO add a namespace for gwt-specific function ? .put(EvalFunction.getName(), new EvalFunction()) .put(ValueFunction.getName(), new ValueFunction()) .put(ResourceUrlFunction.getName(), new ResourceUrlFunction(context)) .build(); } }
@Override public Map<String, GssFunction> get() { Map<String, GssFunction> gssFunctionMap = super.get(); return ImmutableMap.<String, GssFunction>builder().putAll(gssFunctionMap) // TODO add a namespace for gwt-specific function ? .put(EvalFunction.getName(), new EvalFunction()) .put(ValueFunction.getName(), new ValueFunction()) .put(ResourceUrlFunction.getName(), new ResourceUrlFunction(context)) .build(); } }
@Override public Map<String, GssFunction> get() { Map<String, GssFunction> gssFunctionMap = super.get(); return ImmutableMap.<String, GssFunction>builder().putAll(gssFunctionMap) // TODO add a namespace for gwt-specific function ? .put(EvalFunction.getName(), new EvalFunction()) .put(ValueFunction.getName(), new ValueFunction()) .put(ResourceUrlFunction.getName(), new ResourceUrlFunction(context)) .build(); } }