Class BaseDescriptor

    • Constructor Detail

      • BaseDescriptor

        public BaseDescriptor()
    • Method Detail

      • canAccept

        public boolean canAccept​(java.lang.String name,
                                 java.lang.String namespace,
                                 java.lang.Object object)
        Returns true if the given object represented by this XMLClassDescriptor can accept a member whose name is given. An XMLClassDescriptor can accept a field if it contains a descriptor that matches the given name and if the given object can hold this field (i.e a value is not already set for this field).

        This is mainly used for container object (that can contain other objects), in this particular case the implementation returns false.

        Specified by:
        canAccept in interface XMLClassDescriptor
        Parameters:
        name - the name of the field to check
        namespace - the namespace of the element. This may be null. Note: A null namespace is not the same as the default namespace unless the default namespace is also null.
        object - the object represented by this XMLCLassDescriptor
        Returns:
        true if the given object represented by this XMLClassDescriptor can accept a member whose name is given.
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
        Description copied from interface: PropertyHolder
        Get a property by its name.
        Specified by:
        getProperty in interface PropertyHolder
        Parameters:
        name - of the property
        Returns:
        value of the property
      • setProperty

        public void setProperty​(java.lang.String name,
                                java.lang.Object value)
        Description copied from interface: PropertyHolder
        Set a property specified by the name to the passed value.
        Specified by:
        setProperty in interface PropertyHolder
        Parameters:
        name - of the property
        value - of the property
      • addNature

        public void addNature​(java.lang.String nature)
        Description copied from interface: NatureExtendable
        Adds a specified nature.
        Specified by:
        addNature in interface NatureExtendable
        Parameters:
        nature - ID of the Nature
      • hasNature

        public boolean hasNature​(java.lang.String nature)
        Description copied from interface: NatureExtendable
        Checks if a specified nature has been added.
        Specified by:
        hasNature in interface NatureExtendable
        Parameters:
        nature - ID of the Nature
        Returns:
        true if the Nature ID was added.