Search in sources :

Example 1 with CustomDataImpl

use of org.springframework.roo.model.CustomDataImpl in project spring-roo by spring-projects.

the class PartTreeUnitTest method setUp.

@Before
public void setUp() throws IllegalArgumentException, IllegalAccessException {
    List<FieldMetadata> declaredFields = new ArrayList<FieldMetadata>();
    declaredFields.add(new DefaultFieldMetadata(new CustomDataImpl(new HashMap<Object, Object>()), "text", 0, null, new JavaSymbolName("text"), new JavaType(String.class), null));
    declaredFields.add(new DefaultFieldMetadata(new CustomDataImpl(new HashMap<Object, Object>()), "number", 0, null, new JavaSymbolName("number"), new JavaType(Integer.class), null));
    declaredFields.add(new DefaultFieldMetadata(new CustomDataImpl(new HashMap<Object, Object>()), "date", 0, null, new JavaSymbolName("date"), new JavaType(Date.class), null));
    declaredFields.add(new DefaultFieldMetadata(new CustomDataImpl(new HashMap<Object, Object>()), "enumer", 0, null, new JavaSymbolName("enumer"), new JavaType(Enum.class), null));
    declaredFields.add(new DefaultFieldMetadata(new CustomDataImpl(new HashMap<Object, Object>()), "primitiveInt", 0, null, new JavaSymbolName("primitiveInt"), JavaType.INT_PRIMITIVE, null));
    final List<MemberHoldingTypeDetails> memberHoldingTypeDetails = new ArrayList<MemberHoldingTypeDetails>();
    memberHoldingTypeDetails.add(new DefaultClassOrInterfaceTypeDetails(new CustomDataImpl(new HashMap<Object, Object>()), "Example", 0, null, new JavaType("Example"), PhysicalTypeCategory.CLASS, null, declaredFields, null, null, null, null, null, null, null, null));
    memberDetails = new MemberDetailsImpl(memberHoldingTypeDetails);
}
Also used : FieldMetadata(org.springframework.roo.classpath.details.FieldMetadata) DefaultFieldMetadata(org.springframework.roo.classpath.details.DefaultFieldMetadata) ArrayList(java.util.ArrayList) DefaultClassOrInterfaceTypeDetails(org.springframework.roo.classpath.details.DefaultClassOrInterfaceTypeDetails) MemberDetailsImpl(org.springframework.roo.classpath.scanner.MemberDetailsImpl) JavaSymbolName(org.springframework.roo.model.JavaSymbolName) JavaType(org.springframework.roo.model.JavaType) CustomDataImpl(org.springframework.roo.model.CustomDataImpl) MemberHoldingTypeDetails(org.springframework.roo.classpath.details.MemberHoldingTypeDetails) DefaultFieldMetadata(org.springframework.roo.classpath.details.DefaultFieldMetadata) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 DefaultClassOrInterfaceTypeDetails (org.springframework.roo.classpath.details.DefaultClassOrInterfaceTypeDetails)1 DefaultFieldMetadata (org.springframework.roo.classpath.details.DefaultFieldMetadata)1 FieldMetadata (org.springframework.roo.classpath.details.FieldMetadata)1 MemberHoldingTypeDetails (org.springframework.roo.classpath.details.MemberHoldingTypeDetails)1 MemberDetailsImpl (org.springframework.roo.classpath.scanner.MemberDetailsImpl)1 CustomDataImpl (org.springframework.roo.model.CustomDataImpl)1 JavaSymbolName (org.springframework.roo.model.JavaSymbolName)1 JavaType (org.springframework.roo.model.JavaType)1