public class PolicyCmptType extends Type
IPolicyCmptType.Type.AnnotatedElementMatcher<T extends Annotation>| Constructor and Description |
|---|
PolicyCmptType(String name,
AnnotatedDeclaration annotatedDeclararation) |
| Modifier and Type | Method and Description |
|---|---|
PolicyAssociation |
getAssociation(String name)
Returns the association with the given
name declared in this type or one of it's
super types. |
List<PolicyAssociation> |
getAssociations()
Returns the type's associations including those defined in it's super types.
|
PolicyAttribute |
getAttribute(String name)
Returns the attribute with the given
name declared in this type or one of it's
super types. |
List<PolicyAttribute> |
getAttributes()
Returns a list containing the type's attributes including those defined in the type's super
types.
|
PolicyAssociation |
getDeclaredAssociation(int index)
Returns the association at the given
index. |
PolicyAssociation |
getDeclaredAssociation(String name)
Returns the association with the given
name declared in this type. |
List<PolicyAssociation> |
getDeclaredAssociations()
Returns a list containing all associations declared in this type.
|
PolicyAttribute |
getDeclaredAttribute(int index)
Returns the declared attribute at the given
index. |
PolicyAttribute |
getDeclaredAttribute(String name)
Returns the attribute with the given
name declared in this type. |
List<PolicyAttribute> |
getDeclaredAttributes()
Returns a list containing all attributes declared in this model type.
|
ValidationRule |
getDeclaredValidationRule(int index)
Returns the declared
ValidationRule at the given index. |
ValidationRule |
getDeclaredValidationRule(String name)
Returns the
ValidationRule with the given name declared in this type. |
List<ValidationRule> |
getDeclaredValidationRules()
Returns a list containing all
ValidationRules declared in this model
type. |
protected String |
getKindName() |
ProductCmptType |
getProductCmptType()
Returns the
ProductCmptType that configures this policy component type. |
PolicyCmptType |
getSuperType()
Returns this type's super type or
null if it has none. |
ValidationRule |
getValidationRule(String name)
Returns the
ValidationRule with the given name declared in this type or
one of its super types. |
List<ValidationRule> |
getValidationRules()
Returns a list containing all the
ValidationRules including those
defined in the super types. |
boolean |
isAssociationDeclared(String name)
Returns whether the association with the given
name is declared in this type. |
boolean |
isAttributeDeclared(String name)
Returns whether the attribute with the given
name is declared in this type. |
boolean |
isConfiguredByProductCmptType()
Returns whether this policy component type is configured by a product component type.
|
boolean |
isValidationRuleDeclared(String name)
Returns whether the
ValidationRule with the given name is declared in
this type. |
getAnnotatedDeclaration, getDeclarationClass, getDeclaredMethods, getJavaClass, getJavaInterface, getMessageHelper, getMessageKey, isAssociationPresent, isAttributePresent, isSuperTypePresent, searchDeclaredMethod, toStringcreateMessageHelper, getDescription, getDocumentation, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getName, getRelevantProductObject, invokeField, invokeMethodclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getNamepublic static final String KIND_NAME
public PolicyCmptType(String name, AnnotatedDeclaration annotatedDeclararation)
protected String getKindName()
getKindName in class Typepublic boolean isConfiguredByProductCmptType()
true you could use getProductCmptType() to get the type
of the configuring product.true if this policy component type is configured else falsepublic ProductCmptType getProductCmptType()
ProductCmptType that configures this policy component type. Throws an
IllegalArgumentException if this policy component type is not configured. Use
isConfiguredByProductCmptType() to check whether it is configured or not.ProductCmptType that configures this policy component typeNullPointerException - if this policy component type is not configuredpublic PolicyCmptType getSuperType()
Typenull if it has none.getSuperType in interface IModelTypegetSuperType in class Typepublic PolicyAttribute getDeclaredAttribute(String name)
Typename declared in this type. Attributes
defined in the type's super types are not returned.getDeclaredAttribute in interface IModelTypegetDeclaredAttribute in class Typename - the name of the attributeType.isAttributeDeclared(String)public PolicyAttribute getDeclaredAttribute(int index)
Typeindex.getDeclaredAttribute in interface IModelTypegetDeclaredAttribute in class Typepublic List<PolicyAttribute> getDeclaredAttributes()
TypegetDeclaredAttributes in interface IModelTypegetDeclaredAttributes in class Typepublic PolicyAttribute getAttribute(String name)
Typename declared in this type or one of it's
super types.getAttribute in interface IModelTypegetAttribute in class Typepublic List<PolicyAttribute> getAttributes()
TypegetAttributes in interface IModelTypegetAttributes in class Typepublic PolicyAssociation getDeclaredAssociation(String name)
Typename declared in this type. Associations
defined in the type's super types are not considered. The name could either be the singular
or the plural name.getDeclaredAssociation in interface IModelTypegetDeclaredAssociation in class Typename - the name of the associationType.isAssociationDeclared(String)public PolicyAssociation getDeclaredAssociation(int index)
Typeindex. Associations defined in the type's
super types are not returned.getDeclaredAssociation in interface IModelTypegetDeclaredAssociation in class Typepublic List<PolicyAssociation> getDeclaredAssociations()
TypegetDeclaredAssociations in interface IModelTypegetDeclaredAssociations in class Typepublic PolicyAssociation getAssociation(String name)
Typename declared in this type or one of it's
super types. The name could either be the singular or the plural name.getAssociation in interface IModelTypegetAssociation in class Typepublic List<PolicyAssociation> getAssociations()
TypegetAssociations in interface IModelTypegetAssociations in class Typepublic boolean isAssociationDeclared(String name)
Typename is declared in this type.
Associations defined in the type's super types are not considered.isAssociationDeclared in class Typename - the name of the associationtrue if the association is declared in this type, false if
notType.isAssociationPresent(String)public boolean isAttributeDeclared(String name)
Typename is declared in this type.
Attributes defined in the type's super types are not considered.isAttributeDeclared in class Typename - the name of the attributetrue if the attribute is declared in this type, false if
notpublic ValidationRule getDeclaredValidationRule(String name)
ValidationRule with the given name declared in this type.
ValidationRules defined in the type's super types is not returned.name - the name of the ValidationRuleValidationRule with the given name if it was found in this typeIllegalArgumentException - if no ValidationRule with the given
name existspublic ValidationRule getDeclaredValidationRule(int index)
ValidationRule at the given index.index - the position at which the ValidationRule is expected in the list of
declared ValidationRulesValidationRule at the given indexIndexOutOfBoundsException - if no ValidationRule exists for the given
indexpublic List<ValidationRule> getDeclaredValidationRules()
ValidationRules declared in this model
type. ValidationRules defined in the type's super types are not
returned.ValidationRules declared in this typepublic ValidationRule getValidationRule(String name)
ValidationRule with the given name declared in this type or
one of its super types.name - the name of the ValidationRuleValidationRule with the given name declared in this type or one
of its super typesIllegalArgumentException - if no ValidationRule with the given
name existspublic List<ValidationRule> getValidationRules()
ValidationRules including those
defined in the super types.ValidationRules declared in this type and in
its super typespublic boolean isValidationRuleDeclared(String name)
ValidationRule with the given name is declared in
this type. ValidationRules defined in the type's super types are not
considered.name - the name of the ValidationRuletrue if the ValidationRule is declared in this type,
false if notCopyright © 2019. All rights reserved.