Class AnnotationProfile
java.lang.Object
com.levigo.jadice.annotation.profiles.AnnotationProfile
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(AnnotationType type) Return whether this profile or a parent profile contain the given annotation type.booleanstatic AnnotationProfileReturn the applicableAnnotationProfilefor the givenDocument.static AnnotationProfilegetFactory(String name) Return the annotation factory for the given name.getName()getTemplate(String name) Return the template with the given name ornullif there is no such template.Return the type profile with the given name ornullif there is no such profile.getTypes()getTypeSet(String name) inthashCode()static voidset(Document document, AnnotationProfile ap) Set the applicable AnnotationProfile for the given document.static voidsetDefaultProfile(AnnotationProfile defaultProfile) voidvoidsetParentProfile(AnnotationProfile parentProfile) voidsetTypeSets(List<TypeSet> allTypeSets) toString()
-
Constructor Details
-
AnnotationProfile
public AnnotationProfile()
-
-
Method Details
-
setDefaultProfile
- Parameters:
defaultProfile- the defaultProfile to set
-
getDefaultProfile
- Returns:
- the defaultProfile
-
get
Return the applicableAnnotationProfilefor the givenDocument. Returnsnull, if the document doesn't have one.Caveat: this method only uses the first annotation page segment found on the given page using the ordering of
Page.getPageSegments(). However, the latter is problematic as the default implementation does not return the segments in any predictable order but in order of the hash map they are maintained in. Future implementations will exhibit a clarified but different behavior.- Parameters:
document-- Returns:
- the applicable
AnnotationProfile
-
set
Set the applicable AnnotationProfile for the given document.- Parameters:
document-ap-
-
setName
- Parameters:
name- the name to set
-
getName
- Returns:
- the name
-
getTypes
- Returns:
- the typeProfiles
-
getTemplates
- Returns:
- the templates
-
getTemplate
Return the template with the given name ornullif there is no such template.- Parameters:
name-- Returns:
- the template or
null
-
hashCode
public int hashCode() -
equals
-
getType
Return the type profile with the given name ornullif there is no such profile.- Parameters:
name-- Returns:
- the type profile or
null
-
getFactory
Return the annotation factory for the given name.- Parameters:
name-- Returns:
- the type profile or
null
-
setTypeSets
-
getTypeSets
-
getTypeSet
-
getDefaultTypeSet
-
toString
-
setParentProfile
- Parameters:
parentProfile- the parentProfile to set
-
getParentProfile
- Returns:
- the parentProfile
-
contains
Return whether this profile or a parent profile contain the given annotation type.- Parameters:
type-- Returns:
-