org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util
Class Names

java.lang.Object
  extended by org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util.Names

public class Names
extends java.lang.Object

Author:
Felix Project Team

Constructor Summary
Names()
           
 
Method Summary
static java.lang.String computeEffectiveMethodName(java.lang.String name)
          Computes the real method name.
static java.lang.String getMethodIdentifier(org.objectweb.asm.tree.MethodNode method)
          Extract an identifier from the given method name.
static boolean isCustomAnnotation(java.lang.String desc)
          Check if the given annotation descriptor is an iPOJO custom annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Names

public Names()
Method Detail

computeEffectiveMethodName

public static java.lang.String computeEffectiveMethodName(java.lang.String name)
Computes the real method name. This method is useful when the annotation is collected on an manipulated method (prefixed by __M_). This method just removes the prefix if found.

Parameters:
name - the collected method name
Returns:
the effective method name, can be the collected method name if the method name does not start with the prefix.

getMethodIdentifier

public static java.lang.String getMethodIdentifier(org.objectweb.asm.tree.MethodNode method)
Extract an identifier from the given method name. It removes some pre-defined prefixes (bind, unbind, set, unset, modified).

Parameters:
method - method's name
Returns:
the method's identifier

isCustomAnnotation

public static boolean isCustomAnnotation(java.lang.String desc)
Check if the given annotation descriptor is an iPOJO custom annotation. A valid iPOJO custom annotation must contains 'ipojo' or 'handler' in its qualified name.

Parameters:
desc - annotation descriptor
Returns:
true if the given descriptor is an iPOJO custom annotation


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