Search in sources :

Example 1 with JVMNonPrimitiveType

use of st.gravel.support.compiler.jvm.JVMNonPrimitiveType in project gravel by gravel-st.

the class SystemMappingUpdater method compileClass_extensionPostfix_isStatic_identityClass_.

public Class compileClass_extensionPostfix_isStatic_identityClass_(final ClassDescriptionNode _aClassDescriptionNode, final String _extensionPostfix, final boolean _isStatic, final Class _identityClass) {
    final JVMClassCompiler _compiler;
    final Class _extensionClass;
    final JVMClass _jvmClass;
    _compiler = JVMClassCompiler.factory.classDescriptionNode_systemNode_systemMappingUpdater_isStatic_(_aClassDescriptionNode, _systemMapping.systemNode(), this, _isStatic);
    if (_extensionPostfix != null) {
        _compiler.extensionPostfix_(_extensionPostfix);
    }
    if (_identityClass != null) {
        _compiler.selfType_(((JVMNonPrimitiveType) _compilerTools.jvmTypeForClass_(_identityClass)));
    }
    _jvmClass = _compiler.compileClassNode();
    _extensionClass = _compilerTools.writeClass_(_jvmClass);
    _compiler.extraClassesDo_(new st.gravel.support.jvm.Block1<Object, JVMClass>() {

        @Override
        public Object value_(final JVMClass _each) {
            return _compilerTools.writeClass_(_each);
        }
    });
    _compilerTools.runAstInit_(_jvmClass);
    _compiler.extraClassesDo_(new st.gravel.support.jvm.Block1<Object, JVMClass>() {

        @Override
        public Object value_(final JVMClass _each) {
            return _compilerTools.runAstInit_(_each);
        }
    });
    return _extensionClass;
}
Also used : JVMClass(st.gravel.support.compiler.jvm.JVMClass) JVMNonPrimitiveType(st.gravel.support.compiler.jvm.JVMNonPrimitiveType) JVMClassCompiler(st.gravel.support.compiler.jvm.JVMClassCompiler) JVMClass(st.gravel.support.compiler.jvm.JVMClass)

Aggregations

JVMClass (st.gravel.support.compiler.jvm.JVMClass)1 JVMClassCompiler (st.gravel.support.compiler.jvm.JVMClassCompiler)1 JVMNonPrimitiveType (st.gravel.support.compiler.jvm.JVMNonPrimitiveType)1