Packagejp.nium.utils
Classpublic final class ClassUtil
InheritanceClassUtil Inheritance Object

ClassUtil クラスは、クラス操作のためのユーティリティクラスです。 ClassUtil クラスを直接インスタンス化することはできません。 new ClassUtil() コンストラクタを呼び出すと、ArgumentError 例外がスローされます。 The ClassUtil class is an utility class for class operation. ClassUtil class can not instanciate directly. When call the new ClassUtil() constructor, the ArgumentError exception will be thrown.



Public Methods
 MethodDefined By
  
getClassName(target:*):String
[static] 対象のクラス名を返します。 Returns the class name of the object.
ClassUtil
  
getClassPath(target:*):String
[static] 対象のクラスパスを返します。 Returns the class path of the object.
ClassUtil
  
getPackage(target:*):String
[static] 対象のパッケージを返します。 Returns the package of the object.
ClassUtil
  
isDynamic(target:*):Boolean
[static] 対象のクラスに dynamic 属性が設定されているかどうかを返します。 Returns if the dynamic attribute is set to the class object.
ClassUtil
  
isFinal(target:*):Boolean
[static] 対象のクラスに final 属性が設定されているかどうかを返します。 Returns if the final attribute is set to the class object.
ClassUtil
Method Detail
getClassName()method
public static function getClassName(target:*):String

対象のクラス名を返します。 Returns the class name of the object.

Parameters

target:*クラス名を取得する対象です。 The object to get the class name.

Returns
Stringクラス名です。 The class name.

Example
         trace( ClassUtil.getClassName( MovieClip ) ); // MovieClip
         trace( ClassUtil.getClassName( new MovieClip() ) ); // MovieClip
         
getClassPath()method 
public static function getClassPath(target:*):String

対象のクラスパスを返します。 Returns the class path of the object.

Parameters

target:*クラスパスを取得する対象です。 The class path of the object.

Returns
Stringクラスパスです。 The class path.

Example
         trace( ClassUtil.getClassPath( MovieClip ) ); // flash.display.MovieClip
         trace( ClassUtil.getClassPath( new MovieClip() ) ); // flash.display.MovieClip
         
getPackage()method 
public static function getPackage(target:*):String

対象のパッケージを返します。 Returns the package of the object.

Parameters

target:*パッケージを取得する対象です。 The object to get the package.

Returns
Stringパッケージです。 The package.

Example
         trace( ClassUtil.getPackage( MovieClip ) ); // flash.display
         trace( ClassUtil.getPackage( new MovieClip() ) ); // flash.display
         
isDynamic()method 
public static function isDynamic(target:*):Boolean

対象のクラスに dynamic 属性が設定されているかどうかを返します。 Returns if the dynamic attribute is set to the class object.

Parameters

target:*dynamic 属性の有無を調べる対象です。 The object to check if the dynamic attribute is set or not.

Returns
Booleandynamic 属性があれば true を、違っていれば false を返します。 Returns true if dynamic attribute is set, otherwise return false.

Example
         trace( ClassUtil.isDynamic( new Sprite() ) ); // false
         trace( ClassUtil.isDynamic( new MovieClip() ) ); // true
         
isFinal()method 
public static function isFinal(target:*):Boolean

対象のクラスに final 属性が設定されているかどうかを返します。 Returns if the final attribute is set to the class object.

Parameters

target:*final 属性の有無を調べる対象です。 The object to check if the final attribute is set or not.

Returns
Booleanfinal 属性があれば true を、違っていれば false を返します。 Returns true if final attribute is set, otherwise return false.

Example
         trace( ClassUtil.isFinal( new MovieClip() ) ); // false
         trace( ClassUtil.isFinal( new String() ) ); // true