Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import static java.util.Objects.requireNonNull;

/**
* UserDefinedType represents an enum type, or a distinct type.
* UserDefinedType represents an enum type, a distinct type, or a primitive type with a name.
* Type definition is defined by user and is extracted at runtime.
*/
public class UserDefinedType
Expand Down Expand Up @@ -46,4 +46,14 @@ public boolean isDistinctType()
{
return representation.isDistinctType();
}

public boolean isEnumType()
{
return representation.isEnum();
}

public boolean isPrimitiveType()
{
return !representation.isDistinctType() && representation.getTypeSignatureBase().hasStandardType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ protected Type getType(UserDefinedType userDefinedType)
if (userDefinedType.isDistinctType()) {
return getDistinctType(userDefinedType.getPhysicalTypeSignature().getParameters().get(0).getDistinctTypeInfo());
}
// Enum type
// Enum type or primitive type with name
return getType(new TypeSignature(userDefinedType));
}

Expand Down
Loading