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

public class Type extends Object
Reflection ???@?\????????????????????? ?^?????????????[?e?B???e?B?N???X?B
 -- revision history --
 $Log: Type.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 Summary

    Modifier and Type
    Method
    Description
    static boolean
    match(Class type, Object obj)
    obj ?? type ?????????????????????B obj ?? Type.parse( type, obj ) ?????????\?????? true???????B
    static boolean
    matchAll(Class[] types, Object[] args)
    args ?? Type.parse ?????????????????? types ?????v?????????????B
    static boolean
    matchFull(Class type, Object obj)
    obj ???????????? type ?????v?????????????B
    static boolean
    matchFullAll(Class[] types, Object[] args)
    args ???????????? types ?????v?????????????B
    static boolean
    obj ?? type ?????????????????????B type ?????l???????v???~?e?B?u?^ ( byte, short, int, long, float, double ????????? )?? ???????A???? obj ???????????v???~?e?B?u?????b?p?^?A ( Byte, Short, Integer, Long, Float, Double ????????? ) ???C???X?^???X?????????? ???????\?????f???? true ???????B
    static boolean
    matchRestrictAll(Class[] types, Object[] args)
    args ?? Type.parse ?????????????????? types ?????v?????????????B matchAll() ??????????????????B
    static Object
    parse(Class type, Object obj)
    Factory.match( type, obj ) ???}?b?`???? obj ?? type ???????????^???????????B
    static Object[]
    parseAll(Class[] types, Object[] args)
    Factory.matchAll( types, args ) ???}?b?`???? args ?? ???????? types ???????????^???????????B

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • matchFullAll

      public static boolean matchFullAll(Class[] types, Object[] args)
      args ???????????? types ?????v?????????????B
      Parameters:
      types - ?^?????z??
      args - ???????????I?u?W?F?N?g?z??
      Returns:
      args ?? types ?????v?????? true?B
      ?????? flase?B
    • matchRestrictAll

      public static boolean matchRestrictAll(Class[] types, Object[] args)
      args ?? Type.parse ?????????????????? types ?????v?????????????B matchAll() ??????????????????B
      Parameters:
      types - ?^?????z??
      args - ???????????I?u?W?F?N?g?z??
      Returns:
      args ?? types ?????v?????? true?B
      ?????? flase?B
    • matchAll

      public static boolean matchAll(Class[] types, Object[] args)
      args ?? Type.parse ?????????????????? types ?????v?????????????B
      Parameters:
      types - ?^?????z??
      args - ???????????I?u?W?F?N?g?z??
      Returns:
      args ?? types ?????v?????? true?B
      ?????? flase?B
    • matchFull

      public static boolean matchFull(Class type, Object obj)
      obj ???????????? type ?????v?????????????B
      Parameters:
      type - ?^????
      obj - ???????????I?u?W?F?N?g
      Returns:
      obj ?? type ?????????????? true?B
      ?????? false?B
    • matchRestrict

      public static boolean matchRestrict(Class type, Object obj)
      obj ?? type ?????????????????????B type ?????l???????v???~?e?B?u?^ ( byte, short, int, long, float, double ????????? )?? ???????A???? obj ???????????v???~?e?B?u?????b?p?^?A ( Byte, Short, Integer, Long, Float, Double ????????? ) ???C???X?^???X?????????? ???????\?????f???? true ???????B
      Parameters:
      type - ?^????
      obj - ???????????I?u?W?F?N?g
      Returns:
      obj ?? type ?????????????? true?B
      ?????? false?B
    • match

      public static boolean match(Class type, Object obj)
      obj ?? type ?????????????????????B obj ?? Type.parse( type, obj ) ?????????\?????? true???????B
      Parameters:
      type - ?^????
      obj - ???????????I?u?W?F?N?g
      Returns:
      obj ?? type ?????????????? true?B
      ?????? false?B
    • parseAll

      public static Object[] parseAll(Class[] types, Object[] args)
      Factory.matchAll( types, args ) ???}?b?`???? args ?? ???????? types ???????????^???????????B
      Parameters:
      types - ?????????^?????z??
      args - ???????????I?u?W?F?N?g?z??
      Returns:
      ?????????I?u?W?F?N?g?z??
      Throws:
      IllegalAccessError - args ?? types ???????s???\???????B
    • parse

      public static Object parse(Class type, Object obj)
      Factory.match( type, obj ) ???}?b?`???? obj ?? type ???????????^???????????B
      Parameters:
      type - ?????????^????
      obj - ???????????I?u?W?F?N?g
      Returns:
      ?????????I?u?W?F?N?g
      Throws:
      IllegalArgumentException - Factory.match( type, obj ) ???}?b?`???????? obj ?? ?????????????????????B