code: public static Resource child(@NotNull Resource parentResource, @NotNull String name, @NotNull String resourceType,
        @NotNull ValueMap valueMap) {
      Resource child = new GraniteUiSyntheticResource(parentResource.getResourceResolver(),
          parentResource.getPath() + "/" + name,
          resourceType,
          valueMap,
          ImmutableList.<Resource>of());
      if (parentResource instanceof GraniteUiSyntheticResource) {
        ((GraniteUiSyntheticResource)parentResource).addChild(child);
      }
      else {
        throw new IllegalArgumentException("Resource is not a GraniteUiSyntheticResource.");
      }
      return child;
    }
docs: Create synthetic resource child resource of the given parent resource.
  @param parentResource Parent resource (has to be a {@link GraniteUiSyntheticResource} instance)
  @param name Child resource name
  @param resourceType Resource type
  @param valueMap Properties
  @return Resource