primitiveFieldMetadata.getVariables().add(variable);
for (IExtendedModifier extendedModifier : (List<IExtendedModifier>)singleVariableDeclaration.modifiers()) {
if (extendedModifier.isAnnotation()) {
primitiveFieldMetadata.getAnnotations().add(createAnnotationMetadataFor((Annotation)extendedModifier));
} else {
Modifier modifier = (Modifier)extendedModifier;
primitiveFieldMetadata.getModifiers().add(new ModifierMetadata(modifier.getKeyword().toString()));
}
}
return primitiveFieldMetadata;
}
if (type.isSimpleType()) {
SimpleType simpleType = (SimpleType)type;
FieldMetadata simpleTypeFieldMetadata = FieldMetadata.simpleType(JavaMetadataUtil.getName(simpleType.getName()));
variable = new Variable();
variable.setName(JavaMetadataUtil.getName(singleVariableDeclaration.getName()));
simpleTypeFieldMetadata.setName(variable.getName());
simpleTypeFieldMetadata.getVariables().add(variable);
for (IExtendedModifier simpleTypeExtendedModifier : (List<IExtendedModifier>)singleVariableDeclaration.modifiers()) {
if (simpleTypeExtendedModifier.isAnnotation()) {
simpleTypeFieldMetadata.getAnnotations().add(createAnnotationMetadataFor((Annotation)simpleTypeExtendedModifier));
} else {
Modifier modifier = (Modifier)simpleTypeExtendedModifier;
simpleTypeFieldMetadata.getModifiers().add(new ModifierMetadata(modifier.getKeyword().toString()));
}
}
return simpleTypeFieldMetadata;
}
if (type.isParameterizedType()) {
ParameterizedType parameterizedType = (ParameterizedType)type;
FieldMetadata parameterizedTypeFieldMetadata = FieldMetadata.parametrizedType(getTypeName(parameterizedType));
variable = new Variable();
variable.setName(JavaMetadataUtil.getName(singleVariableDeclaration.getName()));
parameterizedTypeFieldMetadata.setName(variable.getName());
parameterizedTypeFieldMetadata.getVariables().add(variable);
for (IExtendedModifier parameterizedExtendedModifier : (List<IExtendedModifier>)singleVariableDeclaration.modifiers()) {
if (parameterizedExtendedModifier.isAnnotation()) {
parameterizedTypeFieldMetadata.getAnnotations().add(createAnnotationMetadataFor((Annotation)parameterizedExtendedModifier));
} else {
Modifier modifier = (Modifier)parameterizedExtendedModifier;
parameterizedTypeFieldMetadata.getModifiers().add(new ModifierMetadata(modifier.getKeyword().toString()));
}
}
return parameterizedTypeFieldMetadata;
}
if (type.isArrayType()) {
ArrayType arrayType = (ArrayType)type;
FieldMetadata arrayTypeFieldMetadata = FieldMetadata.arrayType(getTypeName(arrayType));
variable = new Variable();
variable.setName(JavaMetadataUtil.getName(singleVariableDeclaration.getName()));
arrayTypeFieldMetadata.setName(variable.getName());
arrayTypeFieldMetadata.getVariables().add(variable);
for (IExtendedModifier arrayTypeExtendedModifier : (List<IExtendedModifier>)singleVariableDeclaration.modifiers()) {
if (arrayTypeExtendedModifier.isAnnotation()) {
arrayTypeFieldMetadata.getAnnotations().add(createAnnotationMetadataFor((Annotation)arrayTypeExtendedModifier));
} else {
Modifier modifier = (Modifier)arrayTypeExtendedModifier;
arrayTypeFieldMetadata.getModifiers().add(new ModifierMetadata(modifier.getKeyword().toString()));
}
}
return arrayTypeFieldMetadata;
}
return null;