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/portals/Portal.java

    r85 r86  
    22
    33import com.framsticks.observers.Observer;
    4 import com.framsticks.params.FramsClass;
     4import com.framsticks.params.annotations.FramsClassAnnotation;
     5import com.framsticks.params.annotations.ParamAnnotation;
    56import com.framsticks.util.PeriodicTask;
    67import org.apache.log4j.Logger;
     
    1011 * @author Piotr Sniegowski
    1112 */
     13@FramsClassAnnotation
    1214public class Portal extends Observer {
    1315
    1416        private final static Logger log = Logger.getLogger(Portal.class.getName());
    1517
     18        @ParamAnnotation
    1619        public Integer counter = 0;
    1720
     
    3841        }
    3942
     43        @ParamAnnotation(id = "counter_squared", name = "Counter Squared")
    4044        public Double getCounterSquared() {
    4145                return (double)(counter * counter);
    4246        }
    4347
    44         public static void constructFramsClass(FramsClass.Constructor constructor) {
    45                 constructor.method("getCounterSquared").field("counter");
    46         }
    4748}
Note: See TracChangeset for help on using the changeset viewer.