Resource$.java
4.6 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.forms.common.utils.URIUtils
* org.slf4j.Logger
* scala.Function0
* scala.Function1
* scala.None
* scala.None$
* scala.Option
* scala.Predef
* scala.Predef$
* scala.Predef$ArrowAssoc
* scala.ScalaObject
* scala.Some
* scala.Tuple2
* scala.collection.GenMap
* scala.collection.Seq
* scala.collection.immutable.Map
* scala.collection.immutable.Map$
* scala.collection.immutable.Nil
* scala.collection.immutable.Nil$
* scala.collection.mutable.StringBuilder
*/
package com.adobe.forms.rm;
import com.adobe.forms.common.utils.URIUtils;
import com.adobe.forms.logging.Loggable;
import com.adobe.forms.logging.Loggable$class;
import com.adobe.forms.rm.Resource;
import com.adobe.forms.rm.Resource$EmptyResource$;
import com.adobe.forms.rm.ResourceResolver;
import com.adobe.forms.rm.ResourceResolver$;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.net.URI;
import org.slf4j.Logger;
import scala.Function0;
import scala.Function1;
import scala.None;
import scala.Option;
import scala.Predef;
import scala.ScalaObject;
import scala.Some;
import scala.Tuple2;
import scala.collection.GenMap;
import scala.collection.Seq;
import scala.collection.immutable.Map;
import scala.collection.immutable.Nil;
import scala.collection.mutable.StringBuilder;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public final class Resource$
implements Loggable,
ScalaObject {
public static final Resource$ MODULE$;
private final long INVALID_TIME;
private final Logger logger;
public volatile int bitmap$0;
public static {
new com.adobe.forms.rm.Resource$();
}
public long INVALID_TIME() {
return this.INVALID_TIME;
}
public <A> A using(InputStream r, Function1<InputStream, A> f) {
Object exceptionResult1 = null;
try {
exceptionResult1 = f.apply((Object)r);
return (A)exceptionResult1;
}
finally {
r.close();
}
}
public Resource.RichInputStream enrichInputStream(InputStream xs) {
return new Resource.RichInputStream(xs);
}
public String absolutize(Option<String> context, String resId) {
URI resIdUri;
Some some;
String parent;
String string;
Option<String> option = context;
return (option instanceof Some && this.gd1$1(parent = (string = (String)(some = (Some)option).x())) ? ((resIdUri = URIUtils.getUri((String)resId, (boolean)false)).isAbsolute() ? resId : new StringBuilder().append((Object)parent).append((Object)File.separator).append((Object)resId).toString()) : resId).replace('\\', '/');
}
public Resource apply() {
return Resource$EmptyResource$.MODULE$;
}
/*
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
public Resource apply(Object content, Option<String> context, Map<String, Object> map) {
void exceptionResult222;
Class class_2;
Resource$EmptyResource$ resource$EmptyResource$;
ResourceResolver.RegisteredResource resource = ResourceResolver$.MODULE$.apply(content, context, map);
Class class_ = resource.cls();
if (!(class_ instanceof Class)) {
resource$EmptyResource$ = Resource$EmptyResource$.MODULE$;
return resource$EmptyResource$;
}
Class c = class_2 = class_;
Object exceptionResult322 = null;
try {
Constructor ctor = c.getConstructor(Object.class, Option.class, Map.class);
Resource exceptionResult322 = (Resource)ctor.newInstance(new Object[]{content, context, map.$plus(Predef..MODULE$.any2ArrowAssoc((Object)"userData").$minus$greater(resource.userData()))});
}
catch (NoSuchMethodException noSuchMethodException) {
this.logger().warn("No resource type registered.");
Resource$EmptyResource$ exceptionResult222 = Resource$EmptyResource$.MODULE$;
}
resource$EmptyResource$ = exceptionResult222;
return resource$EmptyResource$;
}
public Map apply$default$3() {
return (Map)Predef..MODULE$.Map().apply((Seq)Nil..MODULE$);
}
public Option apply$default$2() {
return None..MODULE$;
}
private final boolean gd1$1(String string) {
return !string.isEmpty();
}
private Resource$() {
MODULE$ = this;
Loggable$class.$init$(this);
this.INVALID_TIME = Long.MAX_VALUE;
}
}