use of php.runtime.annotation.Reflection.Signature in project jphp by jphp-compiler.
the class ReflectionFunctionAbstract method getNumberOfRequiredParameters.
@Signature
public Memory getNumberOfRequiredParameters(Environment env, Memory... args) {
int cnt = 0;
ParameterEntity[] parameterEntities = getClosureEntity() == null ? getEntity().getParameters() : getClosureEntity().parameters;
for (ParameterEntity e : parameterEntities) {
if (e.getDefaultValue() == null)
cnt++;
}
return LongMemory.valueOf(cnt);
}
use of php.runtime.annotation.Reflection.Signature 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());
}
use of php.runtime.annotation.Reflection.Signature in project jphp by jphp-compiler.
the class WrapImageView method __construct.
@Override
@Signature
public void __construct(WrapActivity activity) {
__wrappedObject = new ImageView(activity);
__wrappedObject.setId(idCounter.getAndIncrement());
}
use of php.runtime.annotation.Reflection.Signature in project jphp by jphp-compiler.
the class WrapImageView method setImageAsset.
@Signature
public void setImageAsset(String fileName) throws IOException {
InputStream inputStream = AndroidStandaloneLoader.getContext().getAssets().open(fileName);
getWrappedObject().setImageDrawable(Drawable.createFromStream(inputStream, fileName));
}
use of php.runtime.annotation.Reflection.Signature in project jphp by jphp-compiler.
the class WrapTextView method __construct.
@Signature
public void __construct(WrapActivity activity) {
__wrappedObject = new TextView(activity);
__wrappedObject.setId(idCounter.getAndIncrement());
}
Aggregations