Ignore:
Timestamp:
09/10/13 21:11:41 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • import refactorization: move Tree, Path, etc.

from core to structure package

  • initial serialization implementation
  • improve PrimeExperiment? test
  • many organizational changes and convenience improvements

CHANGELOG:
Make registry in AbstractTree? final.

Move most classes from core to structure package.

Minor changes.

Switch names of Future and FutureHandler?.

Rename ExceptionResultHandler? to ExceptionHandler?.

Rename ExceptionHandler? to ExceptionDispatcherHandler?.

Fix bug in ParamCandidate? cache.

Add missing synchronization to the BufferedDispatcher?.

Develop @Serialized support.

Rework serialization further.

Add serialization/deserialization interface to ValueParam?.

Move getStorageType and isNumeric from Param down to params hierarchy.

Minor changes.

Improve param type induction.

Add TestSerializedClass? for testing new serialization.

Add info files gor GenePool? and Population.

Add standard.expt exemplary netfile.

Add type name field to PropertiesObject?.

Use PropertiesObject? for PropertiesAccess? instead of ordinary map.

Hide getFramsClass is several more places.

More unification accross FramsClass?, Access and Path.

Add ParamCollection?.

Simplify interface for getting params from FramsClass?, Access
or Path.

Make Access.call() interface variadic.

Add arguments(args) convenience wrapper around new Object[] {args}.

Upgrade to apache.commons.lang version 3.1

Minor improvement with Response constructors.

Develop proper result printing in ClientAtServer?.

Add experimentNetsave to PrimeExperiment?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/params/FramsClass.java

    r100 r105  
    33import com.framsticks.params.annotations.FramsClassAnnotation;
    44import com.framsticks.params.annotations.ParamAnnotation;
    5 import com.framsticks.util.FramsticksException;
    65import com.framsticks.util.lang.Containers;
    76import com.framsticks.util.lang.Strings;
     
    109import java.util.*;
    1110
    12 import javax.annotation.Nonnull;
    1311import javax.annotation.concurrent.Immutable;
    1412
     
    3028@Immutable
    3129@FramsClassAnnotation(id = "class", name = "class")
    32 public class FramsClass {
     30public class FramsClass implements ParamCollection {
    3331
    3432        private final static Logger log = LogManager.getLogger(FramsClass.class);
     
    5553
    5654        @ParamAnnotation(id = "props", name = "props")
    57         public List<Param> getParamEntries() {
     55        public List<Param> getParams() {
    5856                return Collections.unmodifiableList(paramList);
    5957        }
     
    135133        }
    136134
    137         public @Nonnull <T extends Param> T castedParam(@Nonnull final Param param, @Nonnull final Class<T> type, Object name) {
    138                 if (param == null) {
    139                         // return null;
    140                         throw new FramsticksException().msg("param is missing").arg("name", name).arg("in", this);
    141                 }
    142                 if (!type.isInstance(param)) {
    143                         // return null;
    144                         throw new FramsticksException().msg("wrong type of param").arg("actual", param.getClass()).arg("requested", type).arg("in", this);
    145                 }
    146                 return type.cast(param);
    147         }
    148 
    149         /**
    150          * Gets the param entry.
    151          *
    152          * @param i
    153          *            the offset of parameter
    154          * @return the param entry
    155          */
    156         public @Nonnull <T extends Param> T getParamEntry(final int i, @Nonnull final Class<T> type) {
    157                 return castedParam(getParam(i), type, i);
    158         }
    159 
    160         /**
    161          * Gets the param entry.
    162          *
    163          * @param id
    164          *            the getId of parameter
    165          * @return the param entry
    166          */
    167         public @Nonnull <T extends Param> T getParamEntry(@Nonnull final String id, @Nonnull final Class<T> type) {
    168                 return castedParam(getParam(id), type, id);
    169         }
    170 
    171135        public Param getParam(int i) {
    172136                if (i < 0 || i >= paramList.size()) {
Note: See TracChangeset for help on using the changeset viewer.