Class AnnotationProfile
java.lang.Object
com.levigo.jadice.annotation.profiles.AnnotationProfile
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(AnnotationType type) Return whether this profile or a parent profile contain the given annotation type.boolean
static AnnotationProfile
Return the applicableAnnotationProfile
for the givenDocument
.static AnnotationProfile
getFactory
(String name) Return the annotation factory for the given name.getName()
getTemplate
(String name) Return the template with the given name ornull
if there is no such template.Return the type profile with the given name ornull
if there is no such profile.getTypes()
getTypeSet
(String name) int
hashCode()
static void
set
(Document document, AnnotationProfile ap) Set the applicable AnnotationProfile for the given document.static void
setDefaultProfile
(AnnotationProfile defaultProfile) void
void
setParentProfile
(AnnotationProfile parentProfile) void
setTypeSets
(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 applicableAnnotationProfile
for 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 ornull
if 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 ornull
if 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:
-