Ignore:
Timestamp:
06/26/13 13:27:31 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • use java annotations to mark classes and fields to be used when:
    • using java classes with ReflectionAccess? to represent remote objects with FramsClass? description found by "info ..." requests
    • to build up FramsClass? representation of objects not present at remote server
  • allow using primitive types (instead of wraping counterparts) in reflected classes
  • rework FramsClass? creation process (add FramsClassBuilder?)
  • add more tests

CHANGELOG:
Prepare model.World class.

Minor change.

Use primitive types for Genotype and Creature classes.

Use primitive types in model.Neuro* classes.

Use primitive types in model.Joint* classes.

Use primitive types in model.Part* classes.

Fix primitive values.

Extract FramsClassBuilder?.

Add tests of Model classes.

More fixes.

Refactorize out ParamCandidate?.

Several fixes.

Fix all regressions after introducing annotations.

Use annotations throughout the project.

Add exception classes.

Improve creation of FramsClass?.

More changes.

Many changes regarding annotations.

Annotate classes in com.framsticks.model package.

Remove manual FramsClass? constructor.

Construct FramsClass? for Creature. Add test.

Add default values to the ParamAnnotation?.

Add ParamBuilderTest? and ParamAnnotation?.

Add FramsClassAnnotation?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/parsers/Loaders.java

    r85 r86  
    22
    33import com.framsticks.params.*;
    4 import org.apache.log4j.Logger;
     4// import org.apache.log4j.Logger;
    55
    66/**
     
    99public class Loaders {
    1010
    11         private static final Logger log = Logger.getLogger(Loaders.class.getName());
     11        // private static final Logger log = Logger.getLogger(Loaders.class.getName());
    1212
    13         public static FramsClass loadFramsClass(SourceInterface source) {
     13        public static FramsClass loadFramsClass(SourceInterface source) throws ConstructionException {
    1414                MultiParamLoader loader = new MultiParamLoader();
    1515                loader.setNewSource(source);
     
    1717                FramsClass result = new FramsClass();
    1818
    19                 AccessInterface framsClassAccess = new ReflectionAccess(FramsClass.class, FramsClass.getFramsClass());
    20                 AccessInterface paramBuilderAccess = new ReflectionAccess(ParamBuilder.class, ParamBuilder.getFramsClass());
     19                AccessInterface framsClassAccess = new ReflectionAccess(FramsClass.class, FramsClassBuilder.buildForClass(FramsClass.class));
     20                AccessInterface paramBuilderAccess = new ReflectionAccess(ParamBuilder.class, FramsClassBuilder.buildForClass(ParamBuilder.class));
    2121                framsClassAccess.select(result);
    2222                loader.addAccessInterface(framsClassAccess);
     
    4141                        return result;
    4242                } catch (Exception e) {
    43                         log.error("an error occurred while loading class description: " + e + " before " + source.readLine());
    44                         e.printStackTrace();
     43                        throw new ConstructionException().msg("an error occurred while loading class description").arg("before", loader.getCurrentLine()).cause(e);
    4544                }
    46                 return null;
    47 
    48 
    4945        }
    5046}
Note: See TracChangeset for help on using the changeset viewer.