Search in sources :

Example 46 with MethodWithType

use of ast.ExpCore.ClassB.MethodWithType in project L42 by ElvisResearchGroup.

the class MethodPathCloneVisitor method getMt.

private Ast.MethodType getMt(Program p, MethodSelector s, ClassB cb) {
    assert p.top() == cb;
    Optional<Member> mOpt = Functions.getIfInDom(cb.getMs(), s);
    assert mOpt.isPresent();
    if (mOpt.get() instanceof MethodWithType) {
        return ((MethodWithType) mOpt.get()).getMt();
    }
    assert mOpt.get() instanceof MethodImplemented;
    MethodWithType mwt = (MethodWithType) cb._getMember(s);
    return mwt.getMt();
}
Also used : MethodImplemented(ast.ExpCore.ClassB.MethodImplemented) MethodWithType(ast.ExpCore.ClassB.MethodWithType) Member(ast.ExpCore.ClassB.Member)

Aggregations

MethodWithType (ast.ExpCore.ClassB.MethodWithType)46 Member (ast.ExpCore.ClassB.Member)21 MethodType (ast.Ast.MethodType)18 ArrayList (java.util.ArrayList)16 Type (ast.Ast.Type)13 Path (ast.Ast.Path)10 ClassB (ast.ExpCore.ClassB)10 NestedClass (ast.ExpCore.ClassB.NestedClass)9 ExpCore (ast.ExpCore)8 MethodSelector (ast.Ast.MethodSelector)7 MethodImplemented (ast.ExpCore.ClassB.MethodImplemented)7 Ast (ast.Ast)4 Phase (ast.ExpCore.ClassB.Phase)4 HashSet (java.util.HashSet)4 List (java.util.List)4 Program (programReduction.Program)4 Mdf (ast.Ast.Mdf)3 Functions (auxiliaryGrammar.Functions)3 From (coreVisitors.From)3 Collections (java.util.Collections)3