org.apache.felix.dm.annotation.plugin.bnd
Class Patterns

java.lang.Object
  extended by org.apache.felix.dm.annotation.plugin.bnd.Patterns

public class Patterns
extends Object


Field Summary
static Pattern BIND_CLASS
           
static Pattern CLASS
           
static Pattern COMPOSITION
           
static Pattern Runnable
           
static Pattern VOID
           
 
Constructor Summary
Patterns()
           
 
Method Summary
static String parseClass(String clazz, Pattern pattern, int group)
          Parses a class.
static void parseField(String field, String descriptor, Pattern pattern)
          Checks if a field descriptor matches a given pattern.
static void parseMethod(String method, String descriptor, Pattern pattern)
          Checks if a method descriptor matches a given pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VOID

public static final Pattern VOID

COMPOSITION

public static final Pattern COMPOSITION

BIND_CLASS

public static final Pattern BIND_CLASS

CLASS

public static final Pattern CLASS

Runnable

public static final Pattern Runnable
Constructor Detail

Patterns

public Patterns()
Method Detail

parseClass

public static String parseClass(String clazz,
                                Pattern pattern,
                                int group)
Parses a class.

Parameters:
clazz - the class to be parsed (the package is "/" separated).
pattern - the pattern used to match the class.
group - the pattern group index where the class can be retrieved.
Returns:
the parsed class.

parseMethod

public static void parseMethod(String method,
                               String descriptor,
                               Pattern pattern)
Checks if a method descriptor matches a given pattern.

Parameters:
the - method whose signature descriptor is checked
pattern - the pattern used to check the method signature descriptor
Throws:
IllegalArgumentException - if the method signature descriptor does not match the given pattern.

parseField

public static void parseField(String field,
                              String descriptor,
                              Pattern pattern)
Checks if a field descriptor matches a given pattern.

Parameters:
field - the field whose type descriptor is checked
descriptor - the field descriptor to be checked
pattern - the pattern to use
Throws:
IllegalArgumentException - if the method signature descriptor does not match the given pattern.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.