Example usage for org.objectweb.asm Opcodes ACC_FINAL

List of usage examples for org.objectweb.asm Opcodes ACC_FINAL

Introduction

In this page you can find the example usage for org.objectweb.asm Opcodes ACC_FINAL.

Prototype

int ACC_FINAL

To view the source code for org.objectweb.asm Opcodes ACC_FINAL.

Click Source Link

Usage

From source file:org.formulacompiler.compiler.internal.bytecode.CellMethodCompiler.java

License:Open Source License

CellMethodCompiler(SectionCompiler _section, CellModel _cell) throws CompilerException {
    super(_section, Opcodes.ACC_FINAL, getMethodName(_section, _cell), "", _cell.getDataType());
    this.cell = _cell;
    validate();//from  w w w  .j  ava 2 s . c  o m
}

From source file:org.formulacompiler.compiler.internal.bytecode.ClassCompiler.java

License:Open Source License

protected Type initializeClass(Class _parentClassOrInterface, Type _parentTypeOrInterface,
        Type _otherInterface) {/*ww w . ja  v  a 2  s.com*/
    final Type parentType;
    final String[] interfaces;
    if (_parentClassOrInterface == null) {
        parentType = Type.getType(Object.class);
        interfaces = new String[] { _otherInterface.getInternalName() };
    } else if (_parentClassOrInterface.isInterface()) {
        parentType = Type.getType(Object.class);
        interfaces = new String[] { _otherInterface.getInternalName(),
                _parentTypeOrInterface.getInternalName() };
    } else {
        parentType = _parentTypeOrInterface;
        interfaces = new String[] { _otherInterface.getInternalName() };
    }
    final int access = Opcodes.ACC_FINAL | (this.classPublic ? Opcodes.ACC_PUBLIC : 0);
    cw().visit(Opcodes.V1_4, access, classInternalName(), null, parentType.getInternalName(), interfaces);

    if (_parentClassOrInterface != null) {
        compileClassRef(_parentClassOrInterface, _parentTypeOrInterface);
    }

    cw().visitSource(null, null);

    return parentType;
}

From source file:org.formulacompiler.compiler.internal.bytecode.FactoryCompiler.java

License:Open Source License

private void buildEnvironmentField() {
    newField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL, ByteCodeEngineCompiler.ENV_MEMBER_NAME,
            ByteCodeEngineCompiler.ENV_DESC);
}

From source file:org.formulacompiler.compiler.internal.bytecode.FactoryCompiler.java

License:Open Source License

private GeneratorAdapter newMethod(String _name, String _signature) {
    final int access = Opcodes.ACC_FINAL | Opcodes.ACC_PUBLIC;
    return new GeneratorAdapter(cw().visitMethod(access, _name, _signature, null, null), access, _name,
            _signature);/*from w  w  w.  j a v  a 2s . c o  m*/
}

From source file:org.formulacompiler.compiler.internal.bytecode.HelperCompiler.java

License:Open Source License

HelperCompiler(SectionCompiler _section, ExpressionNode _node, Iterable<LetEntry<Compilable>> _closure) {
    this(_section, Opcodes.ACC_FINAL, _node, _closure);
}

From source file:org.formulacompiler.compiler.internal.bytecode.HelperCompilerForDatabaseMatch.java

License:Open Source License

public HelperCompilerForDatabaseMatch(SectionCompiler _section, ExpressionNode _node,
        Iterable<LetEntry<Compilable>> _closure) {
    super(_section, Opcodes.ACC_FINAL, _section.newGetterName(), "(" + descriptorOf(_section, _closure) + ")Z");
    this.node = _node;
    addClosureToLetDict(_closure);/*from  www.  jav  a2s  . co m*/
}

From source file:org.formulacompiler.compiler.internal.bytecode.IndexerCompiler.java

License:Open Source License

IndexerCompiler(SectionCompiler _section, String _name, ExpressionNodeForArrayReference _node) {
    super(_section, Opcodes.ACC_FINAL, "$idx$" + _name,
            "(I)" + _section.engineCompiler().typeCompiler(_node.getDataType()).typeDescriptor());
    this.node = _node;
}

From source file:org.formulacompiler.compiler.internal.bytecode.LinearizerCompiler.java

License:Open Source License

LinearizerCompiler(SectionCompiler _section, int _rows, int _cols) {
    super(_section, Opcodes.ACC_FINAL, "$lin$" + _rows + "$" + _cols, "(II)I");
    this.rows = _rows;
    this.cols = _cols;
}

From source file:org.formulacompiler.compiler.internal.bytecode.OutputDistributorCompiler.java

License:Open Source License

OutputDistributorCompiler(SectionCompiler _section, Method _method) {
    super();/*  w  w w  .  ja v  a2  s.  c  o  m*/
    this.section = _section;
    this.method = _method;
    this.caseMethodPrefix = _method.getName() + "__";

    this.name = this.method.getName();
    this.params = this.method.getParameterTypes();

    this.paramTypes = new Type[this.params.length];
    this.returnType = Type.getType(this.method.getReturnType());
    for (int i = 0; i < this.params.length; i++) {
        this.paramTypes[i] = Type.getType(this.params[i]);
    }
    this.methodType = new org.objectweb.asm.commons.Method(this.name, this.returnType, this.paramTypes);
    this.getterDescriptor = "()" + this.returnType.getDescriptor();

    final int access = Opcodes.ACC_FINAL | Opcodes.ACC_PUBLIC;
    this.mv = new GeneratorAdapter(access, this.methodType, null, null, _section.cw());
}

From source file:org.formulacompiler.compiler.internal.bytecode.OutputMethodCompiler.java

License:Open Source License

public OutputMethodCompiler(SectionCompiler _section, String _methodName, String _methodSignature,
        CellMethodCompiler _cellMethodCompiler, Method _implements) {
    super(_section, Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, _methodName, _methodSignature,
            _cellMethodCompiler.dataType());
    this.implementedMethod = _implements;
    this.cellMethodCompiler = _cellMethodCompiler;
}