Search in sources :

Example 6 with DocumentComment

use of php.runtime.reflection.DocumentComment in project jphp by jphp-compiler.

the class ConstantDumper method save.

@Override
public void save(ConstantEntity entity, OutputStream output) throws IOException {
    DumpOutputStream dump = new DumpOutputStream(output);
    DocumentComment docComment = entity.getDocComment();
    if (docComment != null) {
        dump.writeUTF(docComment.toString());
    } else {
        dump.writeUTF("");
    }
    dump.writeBoolean(entity.isCaseSensitise());
    dump.writeEnum(entity.getModifier());
    dump.writeName(entity.getName());
    dump.writeTrace(debugInformation ? null : entity.getTrace());
    dump.writeMemory(entity.getValue());
    dump.writeRawData(null);
}
Also used : DocumentComment(php.runtime.reflection.DocumentComment) DumpOutputStream(php.runtime.loader.dump.io.DumpOutputStream)

Example 7 with DocumentComment

use of php.runtime.reflection.DocumentComment in project jphp by jphp-compiler.

the class PropertyDumper method save.

@Override
public void save(PropertyEntity entity, OutputStream output) throws IOException {
    DumpOutputStream print = new DumpOutputStream(output);
    DocumentComment docComment = entity.getDocComment();
    if (docComment != null) {
        print.writeUTF(docComment.toString());
    } else {
        print.writeUTF("");
    }
    // static
    print.writeBoolean(entity.isStatic());
    // modifier
    print.writeEnum(entity.getModifier());
    // name
    print.writeName(entity.getName());
    // trace
    print.writeTrace(debugInformation ? entity.getTrace() : null);
    // ?nullable
    print.writeBoolean(entity.isNullable());
    // hint type
    print.writeEnum(entity.getType());
    // hint class type
    print.writeName(entity.getTypeClass());
    // def
    print.writeBoolean(entity.isDefault());
    // def value
    print.writeMemory(entity.getDefaultValue());
    // raw
    print.writeRawData(null);
}
Also used : DocumentComment(php.runtime.reflection.DocumentComment) DumpOutputStream(php.runtime.loader.dump.io.DumpOutputStream)

Aggregations

DocumentComment (php.runtime.reflection.DocumentComment)7 DumpInputStream (php.runtime.loader.dump.io.DumpInputStream)3 DumpOutputStream (php.runtime.loader.dump.io.DumpOutputStream)3 ParameterEntity (php.runtime.reflection.ParameterEntity)3 Memory (php.runtime.Memory)2 TokenMeta (org.develnext.jphp.core.tokenizer.TokenMeta)1 NameToken (org.develnext.jphp.core.tokenizer.token.expr.value.NameToken)1 StaticAccessExprToken (org.develnext.jphp.core.tokenizer.token.expr.value.StaticAccessExprToken)1 Modifier (php.runtime.common.Modifier)1 TraceInfo (php.runtime.env.TraceInfo)1 DumpException (php.runtime.loader.dump.io.DumpException)1 ArrayMemory (php.runtime.memory.ArrayMemory)1 ObjectMemory (php.runtime.memory.ObjectMemory)1 ClassConstantMemory (php.runtime.memory.helper.ClassConstantMemory)1 ConstantMemory (php.runtime.memory.helper.ConstantMemory)1 ConstantEntity (php.runtime.reflection.ConstantEntity)1 MethodEntity (php.runtime.reflection.MethodEntity)1 PropertyEntity (php.runtime.reflection.PropertyEntity)1