public final class JavaTypeProfile extends AbstractJavaProfile<JavaTypeProfile.ProfiledType,ResolvedJavaType>
Modifier and Type | Class and Description |
---|---|
static class |
JavaTypeProfile.ProfiledType |
Modifier and Type | Field and Description |
---|---|
private static JavaTypeProfile.ProfiledType[] |
EMPTY_ARRAY |
private TriState |
nullSeen |
Constructor and Description |
---|
JavaTypeProfile(TriState nullSeen,
double notRecordedProbability,
JavaTypeProfile.ProfiledType[] pitems) |
Modifier and Type | Method and Description |
---|---|
boolean |
allTypesRecorded()
Returns
true if all types seen at this location have been recorded in the profile. |
ResolvedJavaType |
asSingleType()
Returns the single monormorphic type representing this profile or
null if no such
type exists. |
private JavaTypeProfile |
createAdjustedProfile(ArrayList<JavaTypeProfile.ProfiledType> result,
TriState newNullSeen,
double newNotRecorded) |
boolean |
equals(Object other) |
TriState |
getNullSeen()
Returns whether a null value was at the type check.
|
JavaTypeProfile.ProfiledType[] |
getTypes()
A list of types for which the runtime has recorded probability information.
|
int |
hashCode() |
JavaTypeProfile |
restrict(JavaTypeProfile otherProfile) |
JavaTypeProfile |
restrict(ResolvedJavaType declaredType,
boolean nonNull) |
String |
toString() |
findEntry, getItems, getNotRecordedProbability, isIncluded
private static final JavaTypeProfile.ProfiledType[] EMPTY_ARRAY
public JavaTypeProfile(TriState nullSeen, double notRecordedProbability, JavaTypeProfile.ProfiledType[] pitems)
public TriState getNullSeen()
public JavaTypeProfile.ProfiledType[] getTypes()
public JavaTypeProfile restrict(JavaTypeProfile otherProfile)
public JavaTypeProfile restrict(ResolvedJavaType declaredType, boolean nonNull)
private JavaTypeProfile createAdjustedProfile(ArrayList<JavaTypeProfile.ProfiledType> result, TriState newNullSeen, double newNotRecorded)
public boolean equals(Object other)
equals
in class AbstractJavaProfile<JavaTypeProfile.ProfiledType,ResolvedJavaType>
public int hashCode()
hashCode
in class AbstractJavaProfile<JavaTypeProfile.ProfiledType,ResolvedJavaType>
public String toString()
toString
in class AbstractJavaProfile<JavaTypeProfile.ProfiledType,ResolvedJavaType>
public boolean allTypesRecorded()
true
if all types seen at this location have been recorded in the profile.public ResolvedJavaType asSingleType()
null
if no such
type exists.