Class MethodUtil

java.lang.Object
jp.gr.java_conf.dangan.lang.reflect.MethodUtil

public class MethodUtil extends Object
???\?b?h???????????[?e?B???e?B?N???X?B
 -- revision history --
 $Log: MethodUtil.java,v $
 Revision 1.0  2002/10/01 00:00:00  dangan
 first edition
 add to version control

 
Version:
$Revision: 1.0 $
Author:
$Author: dangan $
  • Method Details

    • invoke

      public static Object invoke(Object obj, String name, Object[] args) throws InvocationTargetException, NoSuchMethodException
      ?C???X?^???Xobj?? name????????O?? ???\?b?h??args???????????????s?????B
      Parameters:
      obj - ?C???X?^???X
      name - ???\?b?h??
      args - ???????z??
      Returns:
      ?????l
      Throws:
      InvocationTargetException - ?R???X?g???N?^?????O?????????????
      NoSuchMethodException - args ?????????????? name ????????O?? ?C???X?^???X???\?b?h???????????????????????B
    • invokeStatic

      public static Object invokeStatic(String classname, String name, Object[] args) throws ClassNotFoundException, InvocationTargetException, NoSuchMethodException
      classname ???????????N???X?? name????????O?? static ???\?b?h??args???????????????s?????B
      Parameters:
      classname - ?N???X??
      name - ???\?b?h??
      args - ???????z??
      Returns:
      ?????l
      Throws:
      ClassNotFoundException - classname ???N???X??????????????????????
      InvocationTargetException - ?R???X?g???N?^?????O?????????????
      NoSuchMethodException - args ?????????????? name ????????O?? ?C???X?^???X???\?b?h???????????????????????B
    • invokeStatic

      public static Object invokeStatic(Class type, String name, Object[] args) throws InvocationTargetException, NoSuchMethodException
      type ???????????N???X?? name????????O?? static ???\?b?h??args???????????????s?????B
      Parameters:
      type - ?^????
      name - ???\?b?h??
      args - ???????z??
      Returns:
      ?????l
      Throws:
      InvocationTargetException - ?R???X?g???N?^?????O?????????????
      NoSuchMethodException - args ?????????????? name ????????O?? ?C???X?^???X???\?b?h???????????????????????B
    • getInstanceMethod

      public static Method getInstanceMethod(String classname, String name, Object[] args) throws ClassNotFoundException
      classname ???????????N???X?? public ???C???X?^???X???\?b?h???????A name ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getInstanceMethod

      public static Method getInstanceMethod(Class type, String name, Object[] args)
      type ?? public ???C???X?^???X???\?b?h???????A name ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
    • getInstanceMethod

      public static Method getInstanceMethod(String classname, String name, Object[] args, boolean all) throws ClassNotFoundException
      classname ???????????N???X?? ?C???X?^???X???\?b?h???????A name ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getInstanceMethod

      public static Method getInstanceMethod(Class type, String name, Object[] args, boolean all)
      type ?? ?C???X?^???X???\?b?h???????Aname ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
    • getMatchFullInstanceMethod

      public static Method getMatchFullInstanceMethod(String classname, String name, Object[] args) throws ClassNotFoundException
      classname ???????????N???X?? public ???C???X?^???X???\?b?h???????A name ????????O?? args ?? ???????????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getMatchFullInstanceMethod

      public static Method getMatchFullInstanceMethod(Class type, String name, Object[] args)
      type ?? public ???C???X?^???X???\?b?h???????A name ????????O?? args ?????????????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
    • getMatchFullInstanceMethod

      public static Method getMatchFullInstanceMethod(String classname, String name, Object[] args, boolean all) throws ClassNotFoundException
      classname ???????????N???X?? ?C???X?^???X???\?b?h???????A name ????????O?? args ?????????????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getMatchFullInstanceMethod

      public static Method getMatchFullInstanceMethod(Class type, String name, Object[] args, boolean all)
      type ?? ?C???X?^???X???\?b?h???????Aname ????????O?? args ?????????????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
    • getStaticMethod

      public static Method getStaticMethod(String classname, String name, Object[] args) throws ClassNotFoundException
      classname ???????????N???X?? public static ???\?b?h???????A name ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getStaticMethod

      public static Method getStaticMethod(Class type, String name, Object[] args)
      type ?? public static?????\?b?h???????A name ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
    • getStaticMethod

      public static Method getStaticMethod(String classname, String name, Object[] args, boolean all) throws ClassNotFoundException
      classname ???????????N???X?? static ???\?b?h???????A name ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getStaticMethod

      public static Method getStaticMethod(Class type, String name, Object[] args, boolean all)
      type ?? static ???\?b?h???????Aname ????????O?? args ?? Type.parse ?????? ???????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
    • getMatchFullStaticMethod

      public static Method getMatchFullStaticMethod(String classname, String name, Object[] args) throws ClassNotFoundException
      classname ???????????N???X?? public static ???\?b?h???????A name ????????O?? args ?? ???????????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getMatchFullStaticMethod

      public static Method getMatchFullStaticMethod(Class type, String name, Object[] args)
      type ?? public static?????\?b?h???????A name ????????O?? args ?????????????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
    • getMatchFullStaticMethod

      public static Method getMatchFullStaticMethod(String classname, String name, Object[] args, boolean all) throws ClassNotFoundException
      classname ???????????N???X?? static ???\?b?h???????A name ????????O?? args ?????????????????}?????????????????????B
      Parameters:
      classname - ?N???X???B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B
      Throws:
      ClassNotFoundException - classname ???????????N???X??????????????
    • getMatchFullStaticMethod

      public static Method getMatchFullStaticMethod(Class type, String name, Object[] args, boolean all)
      type ?? static ???\?b?h???????Aname ????????O?? args ?????????????????}?????????????????????B
      Parameters:
      type - ?^?????B
      name - ???????????\?b?h???B
      args - ?????z???B null ????????????????Anull ???g?p?????????? Object ???T?u?N???X?????????S???}?b?`???????????????A ???I?????\?b?h???O???????????????????\?????????B
      all - public ?????\?b?h?????????????????? false?B public, protected, private, ?p?b?P?[?W?v???C?x?[?g?? ?S???????\?b?h?????????????? true?B
      Returns:
      args ?????????????}?????????? name????????O?? ???\?b?h?B ???????????????? null?B