Analysis.jrag 667 Bytes
Newer Older
1
aspect Analysis {
René Schöne's avatar
René Schöne committed
2
3
4
5
6
7
  // --- isPrimitiveType ---
  syn boolean TokenComponent.isPrimitiveType() = getJavaTypeUse().isPrimitiveType();
  syn boolean JavaTypeUse.isPrimitiveType() = false;
  eq SimpleJavaTypeUse.isPrimitiveType() {
    switch(getName()) {
      case "int":
8
9
      case "short":
      case "long":
René Schöne's avatar
René Schöne committed
10
11
12
13
14
15
16
17
18
19
20
21
      case "float":
      case "double":
      case "char":
      case "byte": return true;
      default: return false;
    }
  }

  // --- prettyPrint ---
  syn String MappingDefinitionType.prettyPrint();
  eq JavaMappingDefinitionType.prettyPrint() = getType().getName();
  eq JavaArrayMappingDefinitionType.prettyPrint() = getType().getName() + "[]";
22
23

}