42
42
43
43
import java .util .Objects ;
44
44
45
- <<<<<<<< HEAD :sdk /src /org .graalvm .nativeimage /src /org /graalvm /nativeimage /impl /TypeReachabilityCondition .java
46
45
import org .graalvm .nativeimage .hosted .RegistrationCondition ;
47
46
48
47
/**
@@ -54,19 +53,6 @@ public class TypeReachabilityCondition implements RegistrationCondition {
54
53
55
54
/* Cached to save space: it is used as a marker for all non-conditional elements */
56
55
public static final TypeReachabilityCondition JAVA_LANG_OBJECT_REACHED = new TypeReachabilityCondition (Object .class , true );
57
- ========
58
- import org .graalvm .nativeimage .hosted .InclusionCondition ;
59
-
60
- /**
61
- * Type that represents both type-reached and type-reachable condition. When
62
- * {@link TypeCondition#runtimeChecked} is <code>true</code> denotes that this is a
63
- * <code>typeReached</code> condition.
64
- */
65
- public class TypeCondition implements InclusionCondition {
66
-
67
- /* Cached to save space: it is used as a marker for all non-conditional elements */
68
- public static final TypeCondition JAVA_LANG_OBJECT_REACHED = new TypeCondition (Object .class , true );
69
- >>>>>>>> 675 ac0bf8ee (Introduced public API for registration conditions .):sdk /src /org .graalvm .nativeimage /src /org /graalvm /nativeimage /impl /TypeCondition .java
70
56
private final Class <?> type ;
71
57
72
58
public final boolean runtimeChecked ;
@@ -79,7 +65,6 @@ public class TypeCondition implements InclusionCondition {
79
65
* @param runtimeChecked makes this a type-reachable condition when false
80
66
* @return instance of the condition
81
67
*/
82
- <<<<<<<< HEAD :sdk /src /org .graalvm .nativeimage /src /org /graalvm /nativeimage /impl /TypeReachabilityCondition .java
83
68
public static TypeReachabilityCondition create (Class <?> type , boolean runtimeChecked ) {
84
69
Objects .requireNonNull (type );
85
70
if (TypeReachabilityCondition .JAVA_LANG_OBJECT_REACHED .getKey ().equals (type )) {
@@ -93,21 +78,6 @@ public boolean isAlwaysTrue() {
93
78
}
94
79
95
80
public TypeReachabilityCondition (Class <?> type , boolean runtimeChecked ) {
96
- ========
97
- public static TypeCondition create (Class <?> type , boolean runtimeChecked ) {
98
- Objects .requireNonNull (type );
99
- if (TypeCondition .JAVA_LANG_OBJECT_REACHED .getKey ().equals (type )) {
100
- return TypeCondition .JAVA_LANG_OBJECT_REACHED ;
101
- }
102
- return new TypeCondition (type , runtimeChecked );
103
- }
104
-
105
- public boolean isAlwaysTrue () {
106
- return InclusionCondition .alwaysInclude ().equals (this );
107
- }
108
-
109
- public TypeCondition (Class <?> type , boolean runtimeChecked ) {
110
- >>>>>>>> 675 ac0bf8ee (Introduced public API for registration conditions .):sdk /src /org .graalvm .nativeimage /src /org /graalvm /nativeimage /impl /TypeCondition .java
111
81
this .runtimeChecked = runtimeChecked ;
112
82
this .type = type ;
113
83
}
@@ -124,11 +94,7 @@ public boolean equals(Object o) {
124
94
if (o == null || getClass () != o .getClass ()) {
125
95
return false ;
126
96
}
127
- <<<<<<<< HEAD :sdk /src /org .graalvm .nativeimage /src /org /graalvm /nativeimage /impl /TypeReachabilityCondition .java
128
97
TypeReachabilityCondition that = (TypeReachabilityCondition ) o ;
129
- ========
130
- TypeCondition that = (TypeCondition ) o ;
131
- >>>>>>>> 675 ac0bf8ee (Introduced public API for registration conditions .):sdk /src /org .graalvm .nativeimage /src /org /graalvm /nativeimage /impl /TypeCondition .java
132
98
return runtimeChecked == that .runtimeChecked && Objects .equals (type , that .type );
133
99
}
134
100
@@ -139,11 +105,7 @@ public int hashCode() {
139
105
140
106
@ Override
141
107
public String toString () {
142
- <<<<<<<< HEAD :sdk /src /org .graalvm .nativeimage /src /org /graalvm /nativeimage /impl /TypeReachabilityCondition .java
143
108
return "TypeReachabilityCondition(" +
144
- ========
145
- return " TypeCondition (" +
146
- >>>>>>>> 675ac0bf8ee (Introduced public API for registration conditions.):sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/impl/TypeCondition.java
147
109
"type=" + type +
148
110
", runtimeChecked=" + runtimeChecked +
149
111
')' ;
0 commit comments