source: java/main/src/main/java/com/framsticks/params/AccessInterface.java @ 87

Last change on this file since 87 was 87, checked in by psniegowski, 11 years ago

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 size: 1.5 KB
Line 
1package com.framsticks.params;
2
3import java.util.Collection;
4
5
6/**
7 * The Interface AccessInterface. It's the most general class for storing data in
8 * framsticks. In descriptions of methods names "property" and "parameter" are
9 * synonyms.
10 *
11 * @author Jarek Szymczak <name.surname@gmail.com> (please replace name and
12 *         surname with my personal data)
13 */
14public interface AccessInterface {
15
16        Param getParam(int i);
17
18        Param getParam(String id);
19
20        String getId();
21
22        Param getGroupMember(int gi, int n);
23
24        int getParamCount();
25
26        // void call(int i, Object args, Object ret);
27        // TODO: as for now it's not necessary to implement this method
28
29        <T> T get(int i, Class<T> type);
30
31        <T> T get(String id, Class<T> type);
32
33        <T> T get(ValueParam param, Class<T> type);
34
35        <T> int set(int i, T value);
36
37        <T> int set(String id, T value);
38
39        <T> int set(ValueParam param, T value);
40
41        void setDefault(boolean numericOnly);
42
43        void setDefault(int i, boolean numericOnly);
44
45        void setMin();
46
47        void setMin(int i);
48
49        void setMax();
50
51        void setMax(int i);
52
53        void copyFrom(AccessInterface src);
54
55        void save(SinkInterface sink);
56
57        void load(SourceInterface stream) throws Exception;
58
59        /**
60         * Removes all the properties values.
61         */
62        void clearValues();
63
64        AccessInterface select(Object object);
65
66        Object getSelected();
67
68        AccessInterface cloneAccess() throws ConstructionException;
69
70        Object createAccessee();
71
72        Collection<Param> getParams();
73
74        FramsClass getFramsClass();
75
76        boolean tryAutoAppend(Object object);
77
78
79}
Note: See TracBrowser for help on using the repository browser.