-
Notifications
You must be signed in to change notification settings - Fork 26
/
ImmutableResource.java
37 lines (27 loc) · 1.19 KB
/
ImmutableResource.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.theoryinpractise.halbuilder.impl.resources;
import com.google.common.base.Optional;
import com.theoryinpractise.halbuilder.ResourceFactory;
import com.theoryinpractise.halbuilder.impl.bytecode.InterfaceContract;
import com.theoryinpractise.halbuilder.impl.bytecode.InterfaceRenderer;
import com.theoryinpractise.halbuilder.spi.Link;
import com.theoryinpractise.halbuilder.spi.Renderer;
import com.theoryinpractise.halbuilder.spi.Resource;
import java.io.StringWriter;
import java.util.List;
import java.util.Map;
public class ImmutableResource extends BaseResource {
private final Link resourceLink;
public ImmutableResource(ResourceFactory resourceFactory,
Map<String, String> namespaces, List<Link> links, Map<String, Optional<Object>> properties, List<Resource> resources, boolean hasNullProperties) {
super(resourceFactory);
this.namespaces = namespaces;
this.links = links;
this.properties = properties;
this.resources = resources;
this.resourceLink = super.getResourceLink();
this.hasNullProperties = hasNullProperties;
}
public Link getResourceLink() {
return resourceLink;
}
}