Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.SimpleType


            final PrimitiveType primitiveType = (PrimitiveType)type;
            return primitiveType.getPrimitiveTypeCode().toString();
        }

        if (type.isSimpleType()) {
            final SimpleType simpleType = (SimpleType)type;
            return simpleType.getName().getFullyQualifiedName();
        }

        if (type.isQualifiedType()) {
            final QualifiedType qualifiedType = (QualifiedType)type;
            return qualifiedType.getName().getFullyQualifiedName();
View Full Code Here


                }
            }
            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()) {
View Full Code Here

        if (type.isPrimitiveType()) {
            PrimitiveType primitiveType = (PrimitiveType)type;
            return primitiveType.getPrimitiveTypeCode().toString();
        }
        if (type.isSimpleType()) {
            SimpleType simpleType = (SimpleType)type;
            return JavaMetadataUtil.getName(simpleType.getName());
        }
        if (type.isParameterizedType()) {
            ParameterizedType parameterizedType = (ParameterizedType)type;
            return getTypeName(parameterizedType.getType());
        }
View Full Code Here

            return arrayTypeFieldMetadata;

        }
        // can't be an array type
        if (type.isSimpleType()) {
            SimpleType simpleType = (SimpleType)type;
            arrayTypeFieldMetadata = FieldMetadata.arrayType(JavaMetadataUtil.getName(simpleType.getName()));
            processModifiersAndVariablesOfFieldDeclaration(fieldDeclaration, arrayTypeFieldMetadata);
            arrayTypeFieldMetadata.setName(getFieldName(fieldDeclaration));
            return arrayTypeFieldMetadata;
        }
View Full Code Here

     *
     * @param fieldDeclaration - the field declaration.
     * @return SimpleTypeFieldMetadata.
     */
    protected FieldMetadata processSimpleType( FieldDeclaration fieldDeclaration ) {
        SimpleType simpleType = (SimpleType)fieldDeclaration.getType();
        FieldMetadata simpleTypeFieldMetadata = FieldMetadata.simpleType(JavaMetadataUtil.getName(simpleType.getName()));
        // modifiers
        processModifiersOfFieldDeclaration(fieldDeclaration, simpleTypeFieldMetadata);
        processVariablesOfVariableDeclarationFragment(fieldDeclaration, simpleTypeFieldMetadata);
        simpleTypeFieldMetadata.setName(getFieldName(fieldDeclaration));

View Full Code Here

     * @return the specific type of <code>FieldMetadata</code>
     */
    protected FieldMetadata createParameterizedFieldMetadataFrom( Type type ) {
        FieldMetadata parameterizedTypeFieldMetadata = null;
        if (type.isSimpleType()) {
            SimpleType simpleType = (SimpleType)type;
            parameterizedTypeFieldMetadata = FieldMetadata.parametrizedType(JavaMetadataUtil.getName(simpleType.getName()));
        }
        // TODO also process QualifiedType
        return parameterizedTypeFieldMetadata;
    }
View Full Code Here

        
         getBodyDeclaration().setStructuralProperty(TypeDeclaration.SUPERCLASS_TYPE_PROPERTY, pt);
      }
      else
      {
         SimpleType simpleType = body.getAST().newSimpleType(body.getAST().newSimpleName(Types.toSimpleName(type)));
         getBodyDeclaration().setStructuralProperty(TypeDeclaration.SUPERCLASS_TYPE_PROPERTY, simpleType);

         if (!hasImport(type) && Types.isQualified(type))
         {
            addImport(type);
View Full Code Here

      PrimitiveType type = PrimitiveType.class.cast(someType);
      return new TypeWrapperPrimitive(type);
    }

    if (someType.isSimpleType()) {
      SimpleType type = SimpleType.class.cast(someType);
      return new TypeWrapperSimple(type);
    }

    throw new UnsupportedOperationException();
  }
View Full Code Here

    Block body = ast.newBlock();
    input.setBody(body);

    SimpleName uoe = ast.newSimpleName("UnsupportedOperationException");
    SimpleType uoeType = ast.newSimpleType(uoe);
    ClassInstanceCreation newUoeType = ast.newClassInstanceCreation();
    newUoeType.setType(uoeType);

    ThrowStatement statement = ast.newThrowStatement();
    statement.setExpression(newUoeType);
View Full Code Here

    Block body = ast.newBlock();
    input.setBody(body);

    SimpleName uoe = ast.newSimpleName("UnsupportedOperationException");
    SimpleType uoeType = ast.newSimpleType(uoe);
    ClassInstanceCreation newUoeType = ast.newClassInstanceCreation();
    newUoeType.setType(uoeType);

    ThrowStatement statement = ast.newThrowStatement();
    statement.setExpression(newUoeType);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.SimpleType

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.