Class ArchetypeAttributeParser


  • public class ArchetypeAttributeParser
    extends java.lang.Object
    Utility class for parsing ArchetypeAttributes.
    • Constructor Detail

      • ArchetypeAttributeParser

        public ArchetypeAttributeParser​(@NotNull
                                        @NotNull ArchetypeAttributeFactory archetypeAttributeFactory)
        Creates a new instance.
        Parameters:
        archetypeAttributeFactory - the archetype attribute factory to use
    • Method Detail

      • load

        @Nullable
        public @Nullable ArchetypeAttribute load​(@NotNull
                                                 @NotNull nu.xom.Element attributeElement,
                                                 @NotNull
                                                 @NotNull ErrorViewCollector errorViewCollector,
                                                 @NotNull
                                                 @NotNull ArchetypeTypeSet archetypeTypeSet,
                                                 @NotNull
                                                 @NotNull java.lang.String typeName)
                                          throws MissingAttributeException
        Loading the data from an xml element into this object.
        Parameters:
        attributeElement - the xml 'attribute' element
        errorViewCollector - the error view collector for reporting errors
        archetypeTypeSet - the archetype type list
        typeName - (descriptive) name of the type this attribute belongs to (e.g. "Weapon")
        Returns:
        the archetype attribute or null if an error occurs
        Throws:
        MissingAttributeException - if the element cannot be parsed