Search in sources :

Example 1 with EnumerationDefinition

use of nl.ramsolutions.sw.magik.analysis.definitions.EnumerationDefinition in project magik-tools by StevenLooman.

the class MagikIndexer method handleDefinition.

private void handleDefinition(final Path path, final MagikFile magikFile, final Definition definition) {
    if (definition instanceof PackageDefinition) {
        final PackageDefinition packageDefinition = (PackageDefinition) definition;
        this.handleDefinition(magikFile, packageDefinition);
    } else if (definition instanceof IndexedExemplarDefinition) {
        final IndexedExemplarDefinition indexedExemplarDefinition = (IndexedExemplarDefinition) definition;
        this.handleDefinition(magikFile, indexedExemplarDefinition);
    } else if (definition instanceof EnumerationDefinition) {
        final EnumerationDefinition enumerationDefinition = (EnumerationDefinition) definition;
        this.handleDefinition(magikFile, enumerationDefinition);
    } else if (definition instanceof SlottedExemplarDefinition) {
        final SlottedExemplarDefinition slottedExemplarDefinition = (SlottedExemplarDefinition) definition;
        this.handleDefinition(magikFile, slottedExemplarDefinition);
    } else if (definition instanceof MixinDefinition) {
        final MixinDefinition mixinDefinition = (MixinDefinition) definition;
        this.handleDefinition(magikFile, mixinDefinition);
    } else if (definition instanceof MethodDefinition) {
        final MethodDefinition methodDefinition = (MethodDefinition) definition;
        this.handleDefinition(magikFile, methodDefinition);
    } else if (definition instanceof GlobalDefinition) {
        final GlobalDefinition globalDefinition = (GlobalDefinition) definition;
        this.handleDefinition(magikFile, globalDefinition);
    } else if (definition instanceof BinaryOperatorDefinition) {
        final BinaryOperatorDefinition binaryOperatorDefinition = (BinaryOperatorDefinition) definition;
        this.handleDefinition(magikFile, binaryOperatorDefinition);
    }
}
Also used : PackageDefinition(nl.ramsolutions.sw.magik.analysis.definitions.PackageDefinition) BinaryOperatorDefinition(nl.ramsolutions.sw.magik.analysis.definitions.BinaryOperatorDefinition) IndexedExemplarDefinition(nl.ramsolutions.sw.magik.analysis.definitions.IndexedExemplarDefinition) MethodDefinition(nl.ramsolutions.sw.magik.analysis.definitions.MethodDefinition) GlobalDefinition(nl.ramsolutions.sw.magik.analysis.definitions.GlobalDefinition) EnumerationDefinition(nl.ramsolutions.sw.magik.analysis.definitions.EnumerationDefinition) MixinDefinition(nl.ramsolutions.sw.magik.analysis.definitions.MixinDefinition) SlottedExemplarDefinition(nl.ramsolutions.sw.magik.analysis.definitions.SlottedExemplarDefinition)

Example 2 with EnumerationDefinition

use of nl.ramsolutions.sw.magik.analysis.definitions.EnumerationDefinition in project magik-tools by StevenLooman.

the class MagikPreIndexer method handleDefinition.

private void handleDefinition(final Definition definition) {
    if (definition instanceof PackageDefinition) {
        final PackageDefinition packageDefinition = (PackageDefinition) definition;
        this.handleDefinition(packageDefinition);
    } else if (definition instanceof IndexedExemplarDefinition) {
        final IndexedExemplarDefinition indexedExemplarDefinition = (IndexedExemplarDefinition) definition;
        this.handleDefinition(indexedExemplarDefinition);
    } else if (definition instanceof EnumerationDefinition) {
        final EnumerationDefinition enumerationDefinition = (EnumerationDefinition) definition;
        this.handleDefinition(enumerationDefinition);
    } else if (definition instanceof SlottedExemplarDefinition) {
        final SlottedExemplarDefinition slottedExemplarDefinition = (SlottedExemplarDefinition) definition;
        this.handleDefinition(slottedExemplarDefinition);
    } else if (definition instanceof MixinDefinition) {
        final MixinDefinition mixinDefinition = (MixinDefinition) definition;
        this.handleDefinition(mixinDefinition);
    }
}
Also used : PackageDefinition(nl.ramsolutions.sw.magik.analysis.definitions.PackageDefinition) IndexedExemplarDefinition(nl.ramsolutions.sw.magik.analysis.definitions.IndexedExemplarDefinition) EnumerationDefinition(nl.ramsolutions.sw.magik.analysis.definitions.EnumerationDefinition) MixinDefinition(nl.ramsolutions.sw.magik.analysis.definitions.MixinDefinition) SlottedExemplarDefinition(nl.ramsolutions.sw.magik.analysis.definitions.SlottedExemplarDefinition)

Aggregations

EnumerationDefinition (nl.ramsolutions.sw.magik.analysis.definitions.EnumerationDefinition)2 IndexedExemplarDefinition (nl.ramsolutions.sw.magik.analysis.definitions.IndexedExemplarDefinition)2 MixinDefinition (nl.ramsolutions.sw.magik.analysis.definitions.MixinDefinition)2 PackageDefinition (nl.ramsolutions.sw.magik.analysis.definitions.PackageDefinition)2 SlottedExemplarDefinition (nl.ramsolutions.sw.magik.analysis.definitions.SlottedExemplarDefinition)2 BinaryOperatorDefinition (nl.ramsolutions.sw.magik.analysis.definitions.BinaryOperatorDefinition)1 GlobalDefinition (nl.ramsolutions.sw.magik.analysis.definitions.GlobalDefinition)1 MethodDefinition (nl.ramsolutions.sw.magik.analysis.definitions.MethodDefinition)1