Class CollectionInfo

    • Field Detail

      • DEFAULT_REFERENCE_SUFFIX

        public static final java.lang.String DEFAULT_REFERENCE_SUFFIX
        Default suffix for the setter/getter by reference method names.
        See Also:
        Constant Field Values
      • REFERENCE_SUFFIX_PROPERTY

        public static final java.lang.String REFERENCE_SUFFIX_PROPERTY
        The property used to overwrite the reference suffix for extra collection methods.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CollectionInfo

        public CollectionInfo​(XSType contentType,
                              java.lang.String name,
                              java.lang.String elementName,
                              boolean useJava50,
                              FieldMemberAndAccessorFactory memberAndAccessorFactory,
                              FieldMemberAndAccessorFactory contentMemberAndAccessorFactory)
        Creates a new CollectionInfo.
        Parameters:
        contentType - the _content type of the collection, ie. the type of objects that the collection will contain
        name - the name of the Collection
        elementName - the element name for each element in collection
        useJava50 - true if source code is supposed to be generated for Java 5
        memberAndAccessorFactory - the FieldMemberAndAccessorFactory to be used
        contentMemberAndAccessorFactory - the FieldMemberAndAccessorFactory for the content
    • Method Detail

      • getContent

        public final FieldInfo getContent()
        Return the contents of the collection.
        Returns:
        the contents of the collection.
      • getContentName

        public final java.lang.String getContentName()
        Returns the variable name for the content of the collection.
        Returns:
        the variable name for the content of the collection.
      • getContentType

        public final XSType getContentType()
        Returns the type of content in this collection.
        Returns:
        the type of content in this collection.
      • getElementName

        public final java.lang.String getElementName()
        Returns the name to be used when referring to the elements of this collection.
        Returns:
        the name to be used when referring to the elements of this collection.
      • getXSList

        public final XSListType getXSList()
        Returns the schema type represented by this collection.
        Returns:
        the schema type represented by this collection.
      • setCreateExtraMethods

        public final void setCreateExtraMethods​(boolean extraMethods)
        Sets whether or not to create extra collection methods for accessing the actual collection.
        Parameters:
        extraMethods - a boolean that when true indicates that extra collection accessor methods should be created. False by default.
        See Also:
        setReferenceMethodSuffix(java.lang.String)
      • setReferenceMethodSuffix

        public final void setReferenceMethodSuffix​(java.lang.String suffix)
        Sets the method suffix (ending) to use when creating the extra collection methods.
        Parameters:
        suffix - the method suffix to use when creating the extra collection methods. If null or emtpty the default value, as specified by DEFAULT_REFERENCE_SUFFIX will used.
        See Also:
        setCreateExtraMethods(boolean)
      • getMethodSuffix

        public final java.lang.String getMethodSuffix()
        Returns the method suffix for creating method names.
        Overrides:
        getMethodSuffix in class FieldInfo
        Returns:
        the method suffix used when creating method names.
        See Also:
        FieldInfo.getMethodSuffix()
      • getReferenceMethodSuffix

        public final java.lang.String getReferenceMethodSuffix()
        Returns the suffix (ending) that should be used when creating the extra collection methods.
        Returns:
        the suffix for the reference methods
      • isExtraMethods

        public boolean isExtraMethods()
        Indicates whether extra collection methods should be created.
        Returns:
        True if extra collection methods will be created.
      • getParameterPrefix

        public java.lang.String getParameterPrefix()
        Returns the element type name converted to a parameter prefix.
        Returns:
        the element type name converted to a parameter prefix.
      • getReferenceSuffix

        public java.lang.String getReferenceSuffix()
        Returns the reference suffix to use for 'reference style' methods.
        Returns:
        the reference suffix to use