Class EvalExpression

    • Field Detail

      • _capturedForBytecode

        private java.util.List<ICapturedSymbol> _capturedForBytecode
      • _cacheProgramByFingerprint

        private java.util.Map<java.lang.String,​IGosuProgramInternal> _cacheProgramByFingerprint
      • _refreshChecksum

        private int _refreshChecksum
    • Constructor Detail

      • EvalExpression

        public EvalExpression​(ITypeUsesMap typeUsesMap)
        Constructs an 'eval' expression.
    • Method Detail

      • setCapturedSymbolsForBytecode

        public void setCapturedSymbolsForBytecode​(java.util.List<ICapturedSymbol> captured)
      • getCapturedForBytecode

        public java.util.List<ICapturedSymbol> getCapturedForBytecode()
      • cacheProgram

        public void cacheProgram​(java.lang.String strTypeName,
                                 IGosuProgramInternal gsClass)
      • clearCacheOnChecksumChange

        private void clearCacheOnChecksumChange()
      • setExpression

        public void setExpression​(Expression expression)
        The string expression containing Gosu code to evaluate/execute.
      • evaluate

        public java.lang.Object evaluate()
        Evaluates/executes the Gosu in the expression.
        Specified by:
        evaluate in interface IExpression
        Overrides:
        evaluate in class Expression
        Returns:
        The value of an expression or the return value of a program.
      • toString

        public java.lang.String toString()
        Description copied from class: Expression
        Subclasses should return a String representing the parsed expression.
        Specified by:
        toString in class Expression
      • setCapturedTypeVars

        public void setCapturedTypeVars​(java.util.Map<java.lang.String,​ITypeVariableDefinition> typeVariables)