Search in sources :

Example 1 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MmoveImplementation£xthat£xpath£xsrc£xdest.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MmoveImplementation£xthat£xpath£xsrc£xdest(Object _that, Object _path, Object _sel1, Object _sel2) {
    try {
        ClassB that = ensureExtractClassB(_that);
        //assert that.getStage().isInheritedComputed();
        List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
        MethodSelector sel1 = MethodSelector.parse(ensureExtractStringU(_sel1));
        MethodSelector sel2 = MethodSelector.parse(ensureExtractStringU(_sel2));
        return Abstract.toAbstract(Resources.getP(), that, path, sel1, sel2);
    } catch (RuntimeException rte) {
        //to put breakpoint
        throw rte;
    }
}
Also used : MethodSelector(ast.Ast.MethodSelector) ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 2 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method Mredirect£xthat£xsrc£xdest.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.TypeAny })
public Object Mredirect£xthat£xsrc£xdest(Object _that, Object _src, Object _dest) {
    ClassB that = ensureExtractClassB(_that);
    List<Ast.C> src = PathAux.parseValidCs(ensureExtractStringU(_src));
    Path dest = ensureExtractPathFromJava(_dest);
    assert dest.isCore() || dest.isPrimitive() : dest;
    //TODO: see if extractPath should be changed
    if (dest.isCore()) {
        dest = dest.setNewOuter(dest.outerNumber() + 1);
    }
    return Redirect.redirect(Resources.getP(), that, Path.outer(0, src), dest);
}
Also used : Path(ast.Ast.Path) ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 3 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MmakeMethod£xthat£xpath£xselector£xmdfs£xexceptionN.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MmakeMethod£xthat£xpath£xselector£xmdfs£xexceptionN(Object _lib, Object _path, Object _selector, Object _mdfs, Object _execptionN) {
    ClassB lib = ensureExtractClassB(_lib);
    List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
    MethodSelector selector = MethodSelector.parse(ensureExtractStringU(_selector));
    String mdfs = ensureExtractStringU(_mdfs);
    int exceptionN = ensureExtractInt32(_execptionN);
    return MakeMethod.addMethod(lib, path, selector, mdfs, exceptionN);
}
Also used : MethodSelector(ast.Ast.MethodSelector) ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 4 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MaddKs£xthat£xpath£xfields£xmutK£xlentK£xreadK£ximmK£xisFwd.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MaddKs£xthat£xpath£xfields£xmutK£xlentK£xreadK£ximmK£xisFwd(Object _that, Object _path, Object _fields, Object _mutK, Object _lentK, Object _readK, Object _immK, Object _fwd) {
    ClassB that = ensureExtractClassB(_that);
    List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
    String[] fieldNames = ensureExtractStringU(_fields).split(",");
    String mutK = ensureExtractStringU(_mutK);
    String lentK = ensureExtractStringU(_lentK);
    String readK = ensureExtractStringU(_readK);
    String immK = ensureExtractStringU(_immK);
    boolean fwd = ensureExtractInt32(_fwd) == 0 ? false : true;
    return MakeKs.makeKs(that, path, Arrays.asList(fieldNames), mutK, lentK, readK, immK, fwd);
}
Also used : ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Example 5 with ActionType

use of platformSpecific.fakeInternet.ActionType in project L42 by ElvisResearchGroup.

the class Plugin method MhideClass£xthat£xsrc.

@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MhideClass£xthat£xsrc(Object _that, Object _src) {
    ClassB that = ensureExtractClassB(_that);
    List<Ast.C> src = PathAux.parseValidCs(ensureExtractStringU(_src));
    List<Ast.C> dest = new ArrayList<>(src);
    dest.set(dest.size() - 1, dest.get(dest.size() - 1).withUniqueNum(L42.freshPrivate()));
    return Rename.renameClass(Resources.getP(), that, src, dest);
}
Also used : ArrayList(java.util.ArrayList) ClassB(ast.ExpCore.ClassB) EncodingHelper.ensureExtractClassB(auxiliaryGrammar.EncodingHelper.ensureExtractClassB) ActionType(platformSpecific.fakeInternet.ActionType)

Aggregations

ClassB (ast.ExpCore.ClassB)16 EncodingHelper.ensureExtractClassB (auxiliaryGrammar.EncodingHelper.ensureExtractClassB)16 ActionType (platformSpecific.fakeInternet.ActionType)16 MethodSelector (ast.Ast.MethodSelector)8 Doc (ast.Ast.Doc)2 EncodingHelper.ensureExtractDoc (auxiliaryGrammar.EncodingHelper.ensureExtractDoc)2 Path (ast.Ast.Path)1 ExpCore (ast.ExpCore)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1