javafx.reflect
Class ClassRef

java.lang.Object
  extended by javafx.reflect.TypeRef
      extended by javafx.reflect.ClassRef

public abstract class ClassRef
extends TypeRef

A run-time representation of a JavaFX class. Corresponds to java.lang.Class.


Field Summary
protected static int COMPOUND_CLASS
           
protected static int FX_CLASS
           
protected  int modifiers
           
 
Constructor Summary
protected ClassRef(ReflectionContext context, int modifiers)
           
 
Method Summary
abstract  ObjectRef allocate()
          Return raw uninitialized object.
 boolean equals(ClassRef other)
           
abstract  AttributeRef getAttribute(java.lang.String name)
          Get the attribute (field) of this class with a given name.
 java.util.List<AttributeRef> getAttributes(boolean all)
           
abstract  MemberRef getMember(java.lang.String name, TypeRef type)
          Get a member with the matching name and type.
 java.util.List<MemberRef> getMembers(boolean all)
           
abstract  void getMembers(MemberHandler handler, boolean all)
           
abstract  MethodRef getMethod(java.lang.String name, TypeRef... argType)
          Find the function that (best) matches the name and argument types.
 java.lang.String getName()
           
 ReflectionContext getReflectionContect()
           
abstract  java.util.List<ClassRef> getSuperClasses(boolean all)
          Get list of super-classes.
 boolean isAssignableFrom(ClassRef cls)
           
 boolean isCompoundClass()
           
 boolean isJfxType()
           
 ObjectRef newInstance()
          Create a new initialized object.
 java.lang.String toString()
           
 
Methods inherited from class javafx.reflect.TypeRef
getSequenceType, isAssignableFrom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modifiers

protected int modifiers

COMPOUND_CLASS

protected static final int COMPOUND_CLASS
See Also:
Constant Field Values

FX_CLASS

protected static final int FX_CLASS
See Also:
Constant Field Values
Constructor Detail

ClassRef

protected ClassRef(ReflectionContext context,
                   int modifiers)
Method Detail

getName

public java.lang.String getName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(ClassRef other)

getSuperClasses

public abstract java.util.List<ClassRef> getSuperClasses(boolean all)
Get list of super-classes. Note we don't distinguish between classes and interfaces.

Parameters:
all - if true include all ancestor classes (including this class).
Returns:
the list of super-classes. It sorted by class name for convenience and consistency.

isCompoundClass

public boolean isCompoundClass()

isJfxType

public boolean isJfxType()
Overrides:
isJfxType in class TypeRef

isAssignableFrom

public boolean isAssignableFrom(ClassRef cls)

getMembers

public abstract void getMembers(MemberHandler handler,
                                boolean all)

getMembers

public java.util.List<MemberRef> getMembers(boolean all)

getAttributes

public java.util.List<AttributeRef> getAttributes(boolean all)

getReflectionContect

public ReflectionContext getReflectionContect()

allocate

public abstract ObjectRef allocate()
Return raw uninitialized object.


newInstance

public ObjectRef newInstance()
Create a new initialized object. This is just allocate+ObjectRef.initialize.


getMember

public abstract MemberRef getMember(java.lang.String name,
                                    TypeRef type)
Get a member with the matching name and type.


getAttribute

public abstract AttributeRef getAttribute(java.lang.String name)
Get the attribute (field) of this class with a given name.


getMethod

public abstract MethodRef getMethod(java.lang.String name,
                                    TypeRef... argType)
Find the function that (best) matches the name and argument types.