Search in sources :

Example 1 with GlobalDefinition

use of nl.ramsolutions.sw.magik.analysis.definitions.GlobalDefinition 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)

Aggregations

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