Ignore:
Timestamp:
06/28/13 11:56:03 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • FramsClass? and contained Param are now immutable classes (like String),

which allows to refer to them concurrently without synchronization
(which for example in turn simplifies GUI management)

  • also make Path immutable (which was earlier only assumed)
  • add global cache for FramsClasses? created solely and automatically

on base of Java classes.

representations basing on given FramsClass?

  • above changes greatly improved GUI responsivness during browsing
  • furtherly improve Param class hierarchy
  • allow to inject actions on state changes into MultiParamLoader?
  • add more tests

CHANGELOG:

Add StatusListener? to MultiParamLoader?.

Minor refactorization in MultiParamLoader?.

First step with auto append.

Add SchemaTest?.

Improve Registry.

Clean up in Registry.

Work out Registry.

Use annotations for Param.

Fix ListChange?.

Improve fluent interface of the FramsClassBuilder?.

Done caching of ReflectionAccess?.Backend

Fix hashCode of Pair.

A step on a way to cache ReflectionAccess?.Backend

Make SimpleAbstractAccess?.framsClass a final field.

Add static cache for FramsClasses? based on java.

Only classes created strictly and automatically
based on java classes are using this cache.

Make all Params immutable.

Many improvement to make Param immutable.

Make PrimitiveParam? generic type.

Several changes to make Param immutable.

Make FramsClass? immutable.

Another improvement to Path immutability.

Several improvements to Path.

Improve PathTest?.

Configurarable MutabilityDetector?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/core/Node.java

    r84 r87  
    11package com.framsticks.core;
    22
     3import javax.annotation.Nonnull;
     4import javax.annotation.concurrent.Immutable;
     5
    36import com.framsticks.params.CompositeParam;
     7import com.framsticks.params.ParamBuilder;
    48
    59/**
    610 * @author Piotr Sniegowski
    711 */
     12@Immutable
    813public class Node {
    914
    10     protected final CompositeParam param;
    11     protected final Object object;
    12     //protected final Map<String, Node> children = new HashMap<String, Node>();
     15        protected final CompositeParam param;
     16        protected final Object object;
     17        //protected final Map<String, Node> children = new HashMap<String, Node>();
    1318
    14     public Node() {
    15         param = null;
    16         object = null;
    17     }
     19        public Node() {
     20                param = null;
     21                object = null;
     22        }
    1823
    19     public Node(CompositeParam param, Object object) {
    20         assert param != null;
    21         this.param = param;
    22         this.object = object;
    23     }
     24        public Node(@Nonnull CompositeParam param, Object object) {
     25                assert param != null;
     26                this.param = param;
     27                this.object = object;
     28        }
    2429
    25     public final CompositeParam getParam() {
    26         return param;
    27     }
     30        public Node(@Nonnull ParamBuilder builder, Object object) {
     31                this((CompositeParam) builder.finish(), object);
     32        }
    2833
    29     public final Object getObject() {
    30         return object;
    31     }
     34        public final CompositeParam getParam() {
     35                return param;
     36        }
     37
     38        public final Object getObject() {
     39                return object;
     40        }
    3241
    3342}
Note: See TracChangeset for help on using the changeset viewer.