protected boolean matchesTypeReference(char[] pattern,TypeReference type){
  if (pattern == null)   return true;
  if (type == null)   return true;
  char[][] compoundName=type.getTypeName();
  char[] simpleName=compoundName[compoundName.length - 1];
  int dimensions=type.dimensions() * 2;
  if (dimensions > 0) {
    int length=simpleName.length;
    char[] result=new char[length + dimensions];
    System.arraycopy(simpleName,0,result,0,length);
    for (int i=length, l=result.length; i < l; ) {
      result[i++]='[';
      result[i++]=']';
    }
    simpleName=result;
  }
  return matchesName(pattern,simpleName);
}

protected boolean matchesTypeReference ( char [ ] pattern , TypeReference type ) { if ( pattern == null ) return true ; if ( type == null ) return true ; char [ ] [ ] compoundName = type . getTypeName ( ) ; char [ ] simpleName = compoundName [ compoundName . length - 1 ] ; int dimensions = type . dimensions ( ) * 2 ; if ( dimensions > 0 ) { int length = simpleName . length ; char [ ] result = new char [ length + dimensions ] ; System . arraycopy ( simpleName , 0 , result , 0 , length ) ; for ( int i = length , l = result . length ; i < l ; ) { result [ i ++ ] = '[' ; result [ i ++ ] = ']' ; } simpleName = result ; } return matchesName ( pattern , simpleName ) ; }
returns whether the given type reference matches the given pattern .
