Examples of Block


Examples of org.jfree.chart.block.Block

            CompositeTitle ct = (CompositeTitle) title;
            BlockContainer bc = ct.getContainer();
            List blocks = bc.getBlocks();
            Iterator iterator = blocks.iterator();
            while (iterator.hasNext()) {
                Block b = (Block) iterator.next();
                if (b instanceof Title) {
                    applyToTitle((Title) b);
                }
            }
        }
View Full Code Here

Examples of org.jnode.fs.ext2.cache.Block

    public byte[] getBlock(long nr) throws IOException {
        if (isClosed()) throw new IOException("FS closed (fs instance: " + this + ")");
        // log.debug("blockCache size: "+blockCache.size());

        int blockSize = superblock.getBlockSize();
        Block result;

        Integer key = Integer.valueOf((int) nr);
        synchronized (blockCache) {
            // check if the block has already been retrieved
            if (blockCache.containsKey(key)) {
                result = blockCache.get(key);
                return result.getData();
            }
        }

        // perform the time-consuming disk read outside of the synchronized
        // block
        // advantage:
        // -the lock is held for a shorter time, so other blocks that are
        // already in the cache can be returned immediately and
        // do not have to wait for a long disk read
        // disadvantage:
        // -a single block can be retrieved more than once. However,
        // the block will be put in the cache only once in the second
        // synchronized block
        ByteBuffer data = ByteBuffer.allocate(blockSize);
        log.debug("Reading block " + nr + " (offset: " + nr * blockSize + ") from disk");
        getApi().read(nr * blockSize, data);

        // synchronize again
        synchronized (blockCache) {
            // check if the block has already been retrieved
            if (!blockCache.containsKey(key)) {
                result = new Block(this, nr, data.array());
                blockCache.put(key, result);
                return result.getData();
            } else {
                // it is important to ALWAYS return the block that is in
                // the cache (it is used in synchronization)
                result = blockCache.get(key);
                return result.getData();
            }
        }
    }
View Full Code Here

Examples of org.jostraca.Block

    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( new File( "../../../../conf/system.conf" ) );
    BasicTextElementProcessor btep = create( ps, tahs );
    String content   = "content";
    Block  textBlock = new Block( Block.TYPE_text, content );

    assertTrue( btep.isMatch( textBlock ) );

    btep.process( textBlock );
View Full Code Here

Examples of org.jreversepro.ast.block.Block

  public void processMethod(Method method) {
    DecompilationContext ctx = new DecompilationContext(method, clazz
        .getConstantPool());
    Decompiler decompiler = new Decompiler(ctx);
    Block block = decompiler.extractAST();
    SourceEmitter emitter = SourceEmitterFactory
        .getSourceEmitter(JLSSource.JDK14);
    outputString(emitter.emitCode(block));

  }
View Full Code Here

Examples of org.jruby.runtime.Block

   
    public IRubyObject call(ThreadContext context, IRubyObject[] args, IRubyObject self) {
        assert args != null;
       
        Ruby runtime = getRuntime();
        Block newBlock = block.cloneBlock();
        JumpTarget jumpTarget = newBlock.getBinding().getFrame().getJumpTarget();
       
        try {
            if (self != null) newBlock.getBinding().setSelf(self);
           
            return newBlock.call(context, args);
        } catch (JumpException.BreakJump bj) {
            switch(block.type) {
            case LAMBDA: if (bj.getTarget() == jumpTarget) {
                return (IRubyObject) bj.getValue();
            } else {
                throw runtime.newLocalJumpError(RubyLocalJumpError.Reason.BREAK, (IRubyObject)bj.getValue(), "unexpected break");
            }
            case PROC:
                if (newBlock.isEscaped()) {
                    throw runtime.newLocalJumpError(RubyLocalJumpError.Reason.BREAK, (IRubyObject)bj.getValue(), "break from proc-closure");
                } else {
                    throw bj;
                }
            default: throw bj;
View Full Code Here

Examples of org.librebiz.pureport.definition.Block

        }
        cell = null;
    }

    private void startBlock(Attributes attrs) {
        Block block = new Block();
        container = block.getContent();
        setBoxAttributes(block, attrs);
        setTextAttributes(block.getContent(), attrs);
        cell.addBox(block);
        new ContentTextHandler().start();
    }
View Full Code Here

Examples of org.mozilla.javascript.ast.Block

    return binary(BinaryOperator.COMMA, nodes);
  }

  @Override
  public AstNode block(Iterable<AstNode> statements) {
    Block block = new Block();
    for (AstNode stmt : statements) {
      if (stmt != null) {
        block.addStatement(stmt);
      }
    }
    return block;
  }
View Full Code Here

Examples of org.openqa.jetty.html.Block

        LogImpl log = (LogImpl) l;
       
       
        TableForm tf = new TableForm(request.getRequestURI());
        page.add(tf);
        tf.table().newRow().addCell(new Block(Block.Bold)
            .add(new Font(3,true).add(getServletInfo()))).cell().attribute("COLSPAN","2");
        tf.table().add(Break.rule);
       
        tf.addCheckbox("D","Debug On",log.getDebug());
        tf.addTextField("V","Verbosity Level",6,""+log.getVerbose());
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaStatement.Block

        List<JavaExceptionHandler> oldExceptionHandlers = block.getExceptionHandlers();
        for (int i = 0, n = oldExceptionHandlers.size(); i < n; ++i) {
            newExceptionHandlers.add((JavaExceptionHandler)(oldExceptionHandlers.get(i)).accept(this, arg));
        }
       
        Block newBlock = new Block(newExceptionHandlers);
       
        for (int i = 0, n = block.getNBlockStatements(); i < n; ++i) {
            newBlock.addStatement(
                    (JavaStatement)block.getNthBlockStatement(i).accept(this, arg));
        }
       
        return newBlock;
    }
View Full Code Here

Examples of org.pdf4j.saxon.instruct.Block

                base = new AxisExpression(Axis.DESCENDANT, NodeKindTest.makeNodeKindTest(kind));
                break;

            case Type.NODE:
                Expression allChildren = new AxisExpression(Axis.DESCENDANT, NodeKindTest.ELEMENT);
                Block block = new Block();
                Expression[] union = {new ContextItemExpression(),
                                      new AxisExpression(Axis.ATTRIBUTE, AnyNodeTest.getInstance())};
                block.setChildren(union);
                base = new PathExpression(allChildren, block);
                break;

            case Type.NAMESPACE:
               throw new UnsupportedOperationException("Patterns can't match namespace nodes");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.