Download Sources

com.liguorien.flex.generator
Annotation Type FlexSet


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

Used to define the Generics type on a Set property.

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

Exemple :

    
    
    public class MyEntity  {

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

        @FlexSet(String.class)
        public Set<String> getNames(){
            return _names;
        }

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


        @FlexSet(value=Integer.class, clazz=TreeSet.class)
        public Set<Integer> getSelectedIds(){
            return _selectedIds;
        }

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

Version:
0.2
Author:
Nicolas Désy

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

Element Detail

value

public abstract java.lang.Class value

The Generics type declared on the Set property.

clazz

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

Defines the Set implementation class for the generated java code.

The default value is java.util.HashSet

Default:
java.util.HashSet.class

FlexGenerator

Copyright 2006 Nicolas Désy. All rights reserved.