Package org.overturetool.vdmj.types

Examples of org.overturetool.vdmj.types.Type


      {
        if (def instanceof SystemDefinition)
        {
          for (Definition d : def.definitions)
          {
            Type t = d.getType();

            if (t instanceof ClassType)
            {
              ClassType ct = (ClassType) t;
              if (ct.classdef instanceof CPUClassDefinition)
View Full Code Here


    return sb.substring(1).trim();
  }

  private Type getVdmTypeName(IAstNode node)
  {
    Type t = null;

    if (node instanceof InstanceVariableDefinition)
    {
      t = ((InstanceVariableDefinition) node).type;
    } else if (node instanceof ValueDefinition)
View Full Code Here

    return UNKNOWN;
  }

  private String getTypeName(Definition def)
  {
    Type t = null;

    if (def instanceof InstanceVariableDefinition)
    {
      t = ((InstanceVariableDefinition) def).type;
    } else if (def instanceof ValueDefinition)
    {
      t = ((ValueDefinition) def).type;
    } else if (def instanceof LocalDefinition)
    {
      t = ((LocalDefinition) def).type;
    }

    String typeName = "";
    if (t instanceof OptionalType)
    {
      OptionalType opType = (OptionalType) t;
      typeName = opType.type.getName();

    }
    if (t instanceof ClassType)
    {
      typeName = t.getName();
    } else if (t instanceof OptionalType
        && ((OptionalType) t).type instanceof ClassType)
    {
      typeName = t.getName();

    } else
    {
      typeName = def.getName();
    }
View Full Code Here

  private List<Definition> getChildrenOf(
      InstanceVariableDefinition instance)
  {
    List<Definition> result = new Vector<Definition>();

    Type instanceType = instance.type;

    if (instanceType instanceof OptionalType)
    {
      instanceType = ((OptionalType) instanceType).type;
    }
View Full Code Here

    return result;
  }

  private boolean isVirtual(Definition def)
  {
    Type instanceType = def.getType();
   
    if (instanceType instanceof OptionalType)
    {
      instanceType = ((OptionalType) instanceType).type;
    }
View Full Code Here

   
  }
 
  private boolean isWorthAdding(Definition def)
  {
    Type instanceType = def.getType();

    if(def instanceof InstanceVariableDefinition)
    {
      if (instanceType instanceof OptionalType)
      {
View Full Code Here

TOP

Related Classes of org.overturetool.vdmj.types.Type

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.