| Constructor and Description |
|---|
IdType(String resourceType)
Constructor.
|
IdType(String[] resourceTypes,
String resourceTypeFieldName)
Constructor for the polymorphic resource ID case.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(TypeVisitor visitor)
Accepts a type visitor and dispatches to the appropriate visitor method,
depending on class of the individual type.
|
String |
getResourceType()
Returns the resource type for the
ID. |
String |
getResourceTypeFieldName()
Returns the field specifying the resource type for polymorphic
resource
ID in canonical form. |
List<String> |
getResourceTypes()
Returns the allowed resource types for polymorphic resource
ID. |
public IdType(String resourceType)
Creates an instance for given resource type, i.e. the value
of @Resource(...) from the IDL
resourceType - resource type of the ID;
must not be nullIllegalArgumentException - if the resource type is
nullpublic IdType(String[] resourceTypes, String resourceTypeFieldName)
Creates an instance for given allowed resource types and resource
type field. This are the values specified at the
@Resource(String[] allowedTypes, typeFieldName) in the IDL
resourceTypes - the allowed resource typesresourceTypeFieldName - the name of the field specifying the
resource typeIllegalArgumentException - if both arguments are nullpublic void accept(TypeVisitor visitor)
Typepublic String getResourceType()
ID.String representing the resource typepublic List<String> getResourceTypes()
ID.List<String> representing the resource typepublic String getResourceTypeFieldName()
ID in canonical form.String representing the resource typeCopyright © 2022. All rights reserved.