org.xwiki.rendering.block.match
Class ClassBlockMatcher

java.lang.Object
  extended by org.xwiki.rendering.block.match.ClassBlockMatcher
All Implemented Interfaces:
BlockMatcher
Direct Known Subclasses:
MacroBlockMatcher, MetadataBlockMatcher

public class ClassBlockMatcher
extends java.lang.Object
implements BlockMatcher

Implementation of BlockMatcher which match any Block with the provided class.

Since:
3.0M3
Version:
$Id$

Constructor Summary
ClassBlockMatcher(java.lang.Class<? extends Block> blockClass)
           
 
Method Summary
 boolean match(Block block)
          True if the provided block is matched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassBlockMatcher

public ClassBlockMatcher(java.lang.Class<? extends Block> blockClass)
Parameters:
blockClass - the class of the block to match
Method Detail

match

public boolean match(Block block)
True if the provided block is matched.

Specified by:
match in interface BlockMatcher
Parameters:
block - the block to match
Returns:
true if the provided block is matched, false otherwise
See Also:
BlockMatcher.match(org.xwiki.rendering.block.Block)


Copyright © 2004-2011 XWiki. All Rights Reserved.