@Test public void projections() { DmdlSemantics resolved = resolve(); ModelDeclaration simple = resolved.findModelDeclaration("simple"); assertThat(simple, not(nullValue())); PropertyDeclaration a = simple.findPropertyDeclaration("a"); assertThat(a, not(nullValue())); assertThat(a.getType(), is(type(BasicTypeKind.INT))); PropertyDeclaration b = simple.findPropertyDeclaration("b"); assertThat(b, not(nullValue())); assertThat(b.getType(), is(type(BasicTypeKind.LONG))); ProjectionsTrait trait = simple.getTrait(ProjectionsTrait.class); assertThat(trait, not(nullValue())); assertThat(trait.getProjections(), has(model("a"))); assertThat(trait.getProjections(), has(model("b"))); }
public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); void addModel(AstModelDefinition<?> definition); synchronized DmdlSemantics resolve(); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); void addModel(AstModelDefinition<?> definition); synchronized DmdlSemantics resolve();  }