codesimian
Class Exec

java.lang.Object
  extended by codesimian.CS<CSGeneric>
      extended by codesimian.DefaultCS
          extended by codesimian.Exec
All Implemented Interfaces:
CodeSimian
Direct Known Subclasses:
BeforeExec, Exec.Chaos, Exec.Fixnan, Exec.FixnanChaos, Exec.FixnanPrev, Exec.FixnanPrevChaos, Exec.Fuel, Exec.FuelChaos, Exec.FuelFixnan, Exec.FuelFixnanChaos, Exec.FuelFixnanPrev, Exec.FuelFixnanPrevChaos, Exec.FuelPrev, Exec.FuelPrevChaos, Exec.Myfuel, Exec.MyfuelChaos, Exec.MyfuelFixnan, Exec.MyfuelFixnanChaos, Exec.MyfuelFixnanPrev, Exec.MyfuelFixnanPrevChaos, Exec.MyfuelFuel, Exec.MyfuelFuelChaos, Exec.MyfuelFuelFixnan, Exec.MyfuelFuelFixnanChaos, Exec.MyfuelFuelFixnanPrev, Exec.MyfuelFuelFixnanPrevChaos, Exec.MyfuelFuelPrev, Exec.MyfuelFuelPrevChaos, Exec.MyfuelPrev, Exec.MyfuelPrevChaos, Exec.None, Exec.Prev, Exec.PrevChaos, Static.DefaultExec

public abstract class Exec
extends DefaultCS

An EXEC (being renamed to PROXY) is a wrapper of CS.DForProxy() and other ?ForProxy functions in the same CS.

A subclass can do whatever you want, but the default does things like measure costs and end infinite loops caused by cycles in a network of code. Other default (but not yet instantiated) options include to only return DForProxy() or to only prevent infinite loops or neither or both etc.

This is a wrapper class for the execution of an other CS.
x.D() calls someExec.setP(0,x) then someExec.D() to execute x The proxy/exec is transparent to the caller of x.D()

DForProxy() and D() are reversed. In a normal CS, D() calls DForProxy() but never the reverse. Here, DForProxy() calls D(), and D() does the work, but external code should call D() directly and never call DForProxy().

Instead of targetCS.DForProxy(), normal CSs must call targetCS.D(), which calls targetCS.exec.DForProxy(targetCS). The first exec is an instance of this class. The second is this class's DForProxy() function.

That allows code to easily be inserted between all CodeSimian operations, between parent and child. Any CS that ever calls any CS's DForProxy() must override execHacker() to return true.

Has inner classes: some implememtations of Exec interface, combining the same few options in different combinations.

It is faster to use these inner classes like function-pointers than to use if's to check if each option is enabled every execution (in 1 unified DForProxy()), and that would not be as extendable.

chaosBit is not synchronized because thread errors can make chaosBit more chaotic


Nested Class Summary
static class Exec.Chaos
          CS execMe = P(0); This class generated by Exec.javaCode(Chaos, false, false, false, false, true)
static class Exec.ChaosBit
           
static class Exec.Fixnan
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(Fixnan, false, false, true, false, false)
static class Exec.FixnanChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(FixnanChaos, false, false, true, false, true)
static class Exec.FixnanPrev
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
This class generated by Exec.javaCode(FixnanPrev, false, false, true, true, false)
static class Exec.FixnanPrevChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
This class generated by Exec.javaCode(FixnanPrevChaos, false, false, true, true, true)
static class Exec.Fuel
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(Fuel, false, true, false, false, false)
static class Exec.FuelChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(FuelChaos, false, true, false, false, true)
static class Exec.FuelFixnan
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(FuelFixnan, false, true, true, false, false)
static class Exec.FuelFixnanChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(FuelFixnanChaos, false, true, true, false, true)
static class Exec.FuelFixnanPrev
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(FuelFixnanPrev, false, true, true, true, false)
static class Exec.FuelFixnanPrevChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(FuelFixnanPrevChaos, false, true, true, true, true)
static class Exec.FuelPrev
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(FuelPrev, false, true, false, true, false)
static class Exec.FuelPrevChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(FuelPrevChaos, false, true, false, true, true)
static class Exec.Myfuel
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.myFuel() <= 0
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(Myfuel, true, false, false, false, false)
static class Exec.MyfuelChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.myFuel() <= 0
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(MyfuelChaos, true, false, false, false, true)
static class Exec.MyfuelFixnan
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(MyfuelFixnan, true, false, true, false, false)
static class Exec.MyfuelFixnanChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(MyfuelFixnanChaos, true, false, true, false, true)
static class Exec.MyfuelFixnanPrev
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
This class generated by Exec.javaCode(MyfuelFixnanPrev, true, false, true, true, false)
static class Exec.MyfuelFixnanPrevChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
This class generated by Exec.javaCode(MyfuelFixnanPrevChaos, true, false, true, true, true)
static class Exec.MyfuelFuel
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(MyfuelFuel, true, true, false, false, false)
static class Exec.MyfuelFuelChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(MyfuelFuelChaos, true, true, false, false, true)
static class Exec.MyfuelFuelFixnan
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if any of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(MyfuelFuelFixnan, true, true, true, false, false)
static class Exec.MyfuelFuelFixnanChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if any of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
WARNING: Sometimes returns prevExec, but never sets it. PrevExec might always be 0.
This class generated by Exec.javaCode(MyfuelFuelFixnanChaos, true, true, true, false, true)
static class Exec.MyfuelFuelFixnanPrev
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if any of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(MyfuelFuelFixnanPrev, true, true, true, true, false)
static class Exec.MyfuelFuelFixnanPrevChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if any of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
-- execMe.DForProxy() returns NaN, infinity, or -infinity.
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(MyfuelFuelFixnanPrevChaos, true, true, true, true, true)
static class Exec.MyfuelFuelPrev
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(MyfuelFuelPrev, true, true, false, true, false)
static class Exec.MyfuelFuelPrevChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if either of:
-- execMe.myFuel() <= 0
-- execMe.fuel().D() <= 0.0
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
-- decreases execMe.fuel() by execMe.cost()
This class generated by Exec.javaCode(MyfuelFuelPrevChaos, true, true, false, true, true)
static class Exec.MyfuelPrev
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.myFuel() <= 0
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
This class generated by Exec.javaCode(MyfuelPrev, true, false, false, true, false)
static class Exec.MyfuelPrevChaos
          CS execMe = P(0); Normally returns execMe.DForProxy(), but returns execMe.prevD() if:
-- execMe.myFuel() <= 0
If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
-- decrements execMe.myFuel
This class generated by Exec.javaCode(MyfuelPrevChaos, true, false, false, true, true)
static class Exec.None
          CS execMe = P(0); This class generated by Exec.javaCode(None, false, false, false, false, false)
static class Exec.Prev
          CS execMe = P(0); If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
WARNING: Sets prevExec, but never returns or uses it. If you do not prevD() externally, this wastes cpu time.
This class generated by Exec.javaCode(Prev, false, false, false, true, false)
static class Exec.PrevChaos
          CS execMe = P(0); If execMe is executed, CHANGES:
-- sets execMe's prevExec to value of execMe.DForProxy()
WARNING: Sets prevExec, but never returns or uses it. If you do not prevD() externally, this wastes cpu time.
This class generated by Exec.javaCode(PrevChaos, false, false, false, true, true)
static class Exec.SubclassDescription
          describes a subclass of Exec that you are searching for.
 
Field Summary
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS
 
Constructor Summary
Exec()
           
 
Method Summary
static void addSubclass(java.lang.Class subclassOfExec)
          Add a new subclass of Exec at any time.
For any subDesc where subDesc.equals(subclassInstance.getClassDescription()),
Exec.getSubclass(subDesc) returns subclassInstance.getClass().
 boolean canChangeChaosBit()
          There is 1 static boolean variable that many Execs modify each time they execute.
 double DForProxy()
          reversed.
 Exec.SubclassDescription getClassDescription()
           
static java.lang.Class getSubclass(Exec.SubclassDescription sd)
          Returns a subclass of Exec, probably automatically generated by javaCode(), with the specified options.
static Exec instantiateSubclass(Exec.SubclassDescription sd)
          returns a new instance of the subclass you describe, or null if class for that description not found
static java.lang.String javaCode(Exec.SubclassDescription sd)
          Returns a string of Java code to be inserted in this class as inner classes, between "//START-GENERATED-CODE" and "//END-GENERATED-CODE".
static java.lang.String javaCode(java.lang.String name, boolean limitMyfuel, boolean limitFuel, boolean limitValidNumber, boolean setsPrevRetVal, boolean canChangeChaosBit)
           
 java.lang.String keyword()
          return "exec."+getClass().getName();
 java.lang.Object L(java.lang.Class castToThisType)
          Optionally execute this CS, and definitely try to CAST it to the specified Java type.
 java.lang.Object L(int startIndex, java.lang.Class castToThisType, int indexQuantity)
          same as L(Class) except only uses a subset of param indexs.
Like many other L functions, allows converting CSs to specific Object types.
Example: new S("abcdefg").L(2,String.class,3) returns "cde".
 java.lang.Object LForProxy(java.lang.Class castToThisType)
          reversed
 java.lang.Object LForProxy(int startIndex, java.lang.Class castToThisType, int indexQuantity)
          reversed
 boolean limitFuel()
          true if this.DForProxy(f) chooses to execute f or not depending on the fuel contained in f's fuel() object.
 boolean limitMyfuel()
          true if this.DForProxy(f) chooses to execute f or not depending on if f.myFuel is positive.
 boolean limitValidNumber()
          true if this.DForProxy(f) chooses to execute f or not depending on if f.DForProxy() is NaN, -infinity, or infinity.
static void main(java.lang.String[] s)
           
static java.lang.String newJavaCodeForInnerSubclasses()
           
 boolean setsPrevExec()
          true if this.DForProxy(f) always sets (or returns) f's prevExec.
 java.lang.String toString()
          problem: toString() does not return the same as L(String.class).
 
Methods inherited from class codesimian.DefaultCS
B, C, countP, decrementMyFuel, deleteP, description, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, minP, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setPType, setS, setZ, start, V, Z
 
Methods inherited from class codesimian.CS
addB, addC, addD, addF, addI, addJ, addL, addP, addP, addP, addP, addP, addS, addZ, BForProxy, CForProxy, clone, cost, D, deleteP, FForProxy, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, GETS, GETZ, IForProxy, isIllusion, JForProxy, L, L, L, maxD, maxP, minD, overwrites, parent, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, reflect6, setB, SETB, setC, SETC, setCost, SETD, setDescription, setF, SETF, setHeap, setI, SETI, setJ, SETJ, SETL, setL, setL, setParent, setParsePriority, setProxyOf, setS, SETS, setTester, setZ, SETZ, SForProxy, tester, toJavaCode, VForProxy, voidReflect, ZForProxy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Exec

public Exec()
Method Detail

main

public static void main(java.lang.String[] s)

newJavaCodeForInnerSubclasses

public static java.lang.String newJavaCodeForInnerSubclasses()

javaCode

public static java.lang.String javaCode(Exec.SubclassDescription sd)
Returns a string of Java code to be inserted in this class as inner classes, between "//START-GENERATED-CODE" and "//END-GENERATED-CODE".

If you change this function, get the output of javaCode(options) for every combination of options and copy/paste them to the bottom of this file. If there are too many combinations, only copy/paste the 10000 (or choose your own limit) generated classes that are most likely to be used.

The number of inner classes is exponential compared to the number of options.
If there are 10 boolean options, there must be 2^10 = 1024 subclasses to cover all combinations.

If Name is null (which is usually best), calculates a name from the options given.

Might generate classes that do not make sense, depending on what each option means. Some combinations might not make sense together, like dont setPrevExec but do limitFuel, which makes Fuel return 0 if the fuel is gone because prevExec was not updated. It should have returned the previous calculated fuel value, before the fuel ran out. Unexpected or illogical generated subclasses should include a bold warning in their javadoc.


javaCode

public static java.lang.String javaCode(java.lang.String name,
                                        boolean limitMyfuel,
                                        boolean limitFuel,
                                        boolean limitValidNumber,
                                        boolean setsPrevRetVal,
                                        boolean canChangeChaosBit)

limitMyfuel

public boolean limitMyfuel()
true if this.DForProxy(f) chooses to execute f or not depending on if f.myFuel is positive. If positive, decrements it and returns the exec value. Else returns prevExec. Default: FALSE


limitFuel

public boolean limitFuel()
true if this.DForProxy(f) chooses to execute f or not depending on the fuel contained in f's fuel() object. Executing depletes that fuel by f.cost(). If positive, any amount of fuel can be consumed one time, but not if its negative first.
If it can not execute, returns prevExec. Default: FALSE


limitValidNumber

public boolean limitValidNumber()
true if this.DForProxy(f) chooses to execute f or not depending on if f.DForProxy() is NaN, -infinity, or infinity. If it is one of those 3, returns prevExec. Else returns exec normally. Default: FALSE


setsPrevExec

public boolean setsPrevExec()
true if this.DForProxy(f) always sets (or returns) f's prevExec. Default: FALSE


canChangeChaosBit

public boolean canChangeChaosBit()
There is 1 static boolean variable that many Execs modify each time they execute. After some random time (like when System.currentTimeMillis() changes), the bit should be in a truly random state and can be read. This function returns false by default.


L

public java.lang.Object L(java.lang.Class castToThisType)
Description copied from class: CS
Optionally execute this CS, and definitely try to CAST it to the specified Java type. If fail, throw a ClassCastException.

It is preferred not to return CSs from this function. If you have a CS to return, the standard is to put it in param0... setP(0,returnValue), where the function caller should get the output from... P(0).

The functions: V Z B C S I J F D and L , usually EXECUTE this CS and CAST its value to the specified type.
L does not have to execute this CS, but all the others do. The other difference is L can throw a CSCastException (extends ClassCastException).

No pattern of L()'s behavior is guaranteed except for primitive wrappers and 1D arrays.
The L's of some some CSs are more predictable than others, often written about in javadoc of a class.
If it casts correctly, it could fail later. If it fails many times, and you try again, it could still succeed.

These 10 function names are also used by a core part of Java (but not as function names): java.lang.Class.name() . Example: new int[7][6][5].getClass().getName() returns "[[[I".

EXAMPLES:
JButton b = (JButton) new ButtonCS().L(Component.class); //JButton inherits from Component
int fiveFiftyFive = new N(555).I();
double charValues[] = (double[]) new S("arraySize11").L(double[].class);

Overrides:
L in class CS
See Also:
CS.Z(), CS.B(), CS.C(), CS.S(), CS.I(), CS.J(), CS.F(), CS.D()

LForProxy

public java.lang.Object LForProxy(java.lang.Class castToThisType)
reversed

Overrides:
LForProxy in class DefaultCS
See Also:
execProxy(), setExecProxy(CS)

L

public java.lang.Object L(int startIndex,
                          java.lang.Class castToThisType,
                          int indexQuantity)
Description copied from class: CS
same as L(Class) except only uses a subset of param indexs.
Like many other L functions, allows converting CSs to specific Object types.
Example: new S("abcdefg").L(2,String.class,3) returns "cde".

Overrides:
L in class CS

LForProxy

public java.lang.Object LForProxy(int startIndex,
                                  java.lang.Class castToThisType,
                                  int indexQuantity)
reversed

Overrides:
LForProxy in class DefaultCS
See Also:
CS.L(int,Class,int)

keyword

public java.lang.String keyword()
return "exec."+getClass().getName();

Overrides:
keyword in class DefaultCS
See Also:
CS.parent(), CS.newInstance(), CS.name()

DForProxy

public double DForProxy()
reversed. FastExec would normally call exec, but this DForProxy() calls D().

This, combined with the subclasses implementing fastExec instead of exec,
does not prevent an instance of X from replacing an Exec,
where X is a subclass of CS but not a subclass of Exec.
A non-Exec that whose execHacker()==false can do the job of an Exec.
This execHacker stuff is just for efficiency.

Specified by:
DForProxy in class DefaultCS
See Also:
execHacker()

getSubclass

public static java.lang.Class getSubclass(Exec.SubclassDescription sd)
Returns a subclass of Exec, probably automatically generated by javaCode(), with the specified options.

Subclasses should have been automatically generated for every valid combination, by javaCode().
4/05 working on this... If you add more subclasses to this file, they will be automatically found (by using java.lang.reflect).

Returns null if not found.


addSubclass

public static void addSubclass(java.lang.Class subclassOfExec)
Add a new subclass of Exec at any time.
For any subDesc where subDesc.equals(subclassInstance.getClassDescription()),
Exec.getSubclass(subDesc) returns subclassInstance.getClass().


getClassDescription

public Exec.SubclassDescription getClassDescription()

toString

public java.lang.String toString()
Description copied from class: DefaultCS
problem: toString() does not return the same as L(String.class). toString returns code and L returns params as char values. Maybe only decompile() should be used for code instead.

Overrides:
toString in class DefaultCS

instantiateSubclass

public static Exec instantiateSubclass(Exec.SubclassDescription sd)
returns a new instance of the subclass you describe, or null if class for that description not found