Search in sources :

Example 6 with StringMemory

use of php.runtime.memory.StringMemory in project jphp by jphp-compiler.

the class ReflectionParameter method setEntity.

public void setEntity(ParameterEntity entity) {
    this.entity = entity;
    getProperties().put("name", new StringMemory(entity.getName()));
}
Also used : StringMemory(php.runtime.memory.StringMemory)

Example 7 with StringMemory

use of php.runtime.memory.StringMemory in project jphp by jphp-compiler.

the class ReflectionProperty method setEntity.

public void setEntity(PropertyEntity entity) {
    this.entity = entity;
    getProperties().put("name", new StringMemory(entity.getName()));
    getProperties().put("class", new StringMemory(entity.getClazz().getName()));
}
Also used : StringMemory(php.runtime.memory.StringMemory)

Example 8 with StringMemory

use of php.runtime.memory.StringMemory in project jphp by jphp-compiler.

the class JavaException method setThrowable.

public void setThrowable(Throwable throwable) {
    this.throwable = throwable;
    clazz.setProperty(this, "message", new StringMemory(throwable.toString()));
}
Also used : StringMemory(php.runtime.memory.StringMemory)

Example 9 with StringMemory

use of php.runtime.memory.StringMemory in project jphp by jphp-compiler.

the class Reflection method exception.

protected final void exception(Environment env, String message, Object... args) {
    ReflectionException e = new ReflectionException(env);
    e.__construct(env, new StringMemory(String.format(message, args)));
    env.__throwException(e, false);
}
Also used : StringMemory(php.runtime.memory.StringMemory)

Example 10 with StringMemory

use of php.runtime.memory.StringMemory in project jphp by jphp-compiler.

the class BaseBaseException method getTraceAsString.

@Signature
public Memory getTraceAsString(Environment env, Memory... args) {
    int i = 0;
    StringBuilder sb = new StringBuilder();
    if (callStack != null) {
        for (CallStackItem e : getCallStack()) {
            if (i != 0)
                sb.append("\n");
            sb.append("#").append(i).append(" ").append(e.toString(false));
            i++;
        }
        if (i != 0)
            sb.append("\n");
        sb.append("#").append(i).append(" {main}");
    }
    return new StringMemory(sb.toString());
}
Also used : CallStackItem(php.runtime.env.CallStackItem) StringMemory(php.runtime.memory.StringMemory) Signature(php.runtime.annotation.Reflection.Signature)

Aggregations

StringMemory (php.runtime.memory.StringMemory)47 ArrayMemory (php.runtime.memory.ArrayMemory)14 Memory (php.runtime.Memory)11 ObjectMemory (php.runtime.memory.ObjectMemory)8 ReferenceMemory (php.runtime.memory.ReferenceMemory)7 BigDecimal (java.math.BigDecimal)5 Invoker (php.runtime.invoke.Invoker)4 ClassEntity (php.runtime.reflection.ClassEntity)4 TraceInfo (php.runtime.env.TraceInfo)3 IObject (php.runtime.lang.IObject)3 LongMemory (php.runtime.memory.LongMemory)3 StringWriter (java.io.StringWriter)2 ComponentProperties (org.develnext.jphp.swing.ComponentProperties)2 UIReader (org.develnext.jphp.swing.loader.UIReader)2 Signature (php.runtime.annotation.Reflection.Signature)2 CallStackItem (php.runtime.env.CallStackItem)2 ConcurrentEnvironment (php.runtime.env.ConcurrentEnvironment)2 CriticalException (php.runtime.exceptions.CriticalException)2 MethodEntity (php.runtime.reflection.MethodEntity)2 BigInteger (java.math.BigInteger)1