Class BasePropertySet

    • Constructor Detail

      • BasePropertySet

        protected BasePropertySet()
        Creates a new instance of TypedMap.
    • Method Detail

      • getPropertyMap

        protected abstract BasePropertySet.PropertyMap getPropertyMap()
        Map representing the Fields and Methods annotated with PropertySet.Property. Model of PropertySet class.

        At the end of the derivation chain this method just needs to be implemented as:

         private static final PropertyMap model;
         static {
           model = parse(MyDerivedClass.class);
         }
         protected PropertyMap getPropertyMap() {
           return model;
         }
         
      • get

        public Object get​(Object key)
        Gets the name of the property.
        Specified by:
        get in interface PropertySet
        Parameters:
        key - This field is typed as Object to follow the Map.get(Object) convention, but if anything but String is passed, this method just returns null.
      • put

        public Object put​(String key,
                          Object value)
        Sets a property.

        Implementation Note

        This method is slow. Code inside JAX-WS should define strongly-typed fields in this class and access them directly, instead of using this.
        Specified by:
        put in interface PropertySet
        Throws:
        ReadOnlyPropertyException - if the given key is an alias of a strongly-typed field, and if the name object given is not assignable to the field.
        See Also:
        PropertySet.Property
      • asMap

        public Map<String,​Object> asMap()
        Creates a modifiable Map view of this PropertySet.

        Changes done on this Map or on PropertySet object work in both directions - values made to Map are reflected to PropertySet and changes done using getters/setters on PropertySet object are automatically reflected in this Map.

        If necessary, it also can hold other values (not present on PropertySet) - {@see PropertySet#mapAllowsAdditionalProperties}

        Specified by:
        asMap in interface PropertySet
        Returns:
        always non-null valid instance.
      • mapAllowsAdditionalProperties

        protected boolean mapAllowsAdditionalProperties()
        Used when constructing the BasePropertySet.MapView for this object - it controls if the BasePropertySet.MapView servers only to access strongly typed values or allows also different values
        Returns:
        true if Map should allow also properties not defined as strongly typed fields