Package org.modeshape.sequencer.javafile.metadata

Examples of org.modeshape.sequencer.javafile.metadata.ModifierMetadata


                    MarkerAnnotation marker = (MarkerAnnotation)extendedModifier;
                    classMetadata.getAnnotations().add(AnnotationMetadata.markerAnnotation(JavaMetadataUtil.getName(marker.getTypeName())));
                }
            } else {
                Modifier modifier = (Modifier)extendedModifier;
                classMetadata.getModifiers().add(new ModifierMetadata(modifier.getKeyword().toString()));
            }
        }
    }
View Full Code Here


            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;
View Full Code Here

                Annotation annotation = (Annotation)extendedModifier;
                fieldMetadata.getAnnotations().add(createAnnotationMetadataFor(annotation));

            } else {
                Modifier modifier = (Modifier)extendedModifier;
                ModifierMetadata modifierMetadata = new ModifierMetadata(modifier.getKeyword().toString());
                fieldMetadata.getModifiers().add(modifierMetadata);
            }
        }

    }
View Full Code Here

            if (extendedModifier.isAnnotation()) {
                Annotation annotation = (Annotation)extendedModifier;
                methodMetadata.getAnnotations().add(createAnnotationMetadataFor(annotation));
            } else {
                Modifier modifier = (Modifier)extendedModifier;
                methodMetadata.getModifiers().add(new ModifierMetadata(modifier.getKeyword().toString()));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.modeshape.sequencer.javafile.metadata.ModifierMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.