Reference.java
1.33 KB
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
38
39
40
41
42
43
44
45
46
47
48
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* aQute.bnd.annotation.ConsumerType
* org.apache.sling.api.resource.Resource
*/
package com.adobe.granite.references;
import aQute.bnd.annotation.ConsumerType;
import org.apache.sling.api.resource.Resource;
@ConsumerType
public class Reference {
private final Resource source;
private final Resource target;
private final String type;
public Reference(Resource source, Resource target, String type) {
this.source = source;
this.target = target;
this.type = type;
}
public Resource getSource() {
return this.source;
}
public Resource getTarget() {
return this.target;
}
public String getType() {
return this.type;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Reference => {\n");
sb.append("\tsource: ").append(this.getSource() != null ? this.getSource().getPath() : null).append("\n");
sb.append("\ttarget: ").append(this.getTarget() != null ? this.getTarget().getPath() : null).append("\n");
sb.append("\ttype: ").append(this.getType()).append("\n");
sb.append("\tclass: ").append(this.getClass().getCanonicalName()).append("\n");
sb.append("}\n");
return sb.toString();
}
}