Download Sources

com.liguorien.flex.generator
Annotation Type FlexList


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface FlexList

Used to define the Generics type on a List property.

You can also define the List implementation class for the generated java code.

Exemple :

    
    
    public class MyEntity  {

        private List<String> _names;
        private List<Integer> _selectedIds;

        @FlexList(String.class)
        public List<String> getNames(){
            return _names;
        }

        public void setName(List<String> names){
            _names = names;
        }


        @FlexList(value=Integer.class, clazz=LinkedList.class)
        public List<Integer> getSelectedIds(){
            return _selectedIds;
        }

        public void setSelectedIds(List<Integer> ids){
            _selectedIds = names;
        }
    }
 

Version:
0.2
Author:
Nicolas Désy

Required Element Summary
 java.lang.Class<?> value
          The Generics type declared on the List property.
 
Optional Element Summary
 java.lang.Class<? extends java.util.List> clazz
          Defines the List implementation class for the generated java code.
 

Element Detail

value

public abstract java.lang.Class<?> value

The Generics type declared on the List property.

clazz

public abstract java.lang.Class<? extends java.util.List> clazz

Defines the List implementation class for the generated java code.

The default value is java.util.ArrayList

Default:
java.util.ArrayList.class

FlexGenerator

Copyright 2006 Nicolas Désy. All rights reserved.