Interface IClassReferenceOwner

    • Method Detail

      • getClassReferenceAtom

        Atom getClassReferenceAtom​(java.lang.String id)
        Gets the ClassReference atom name.
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        The class reference atom name for the ID.
      • getClassReference

        ClassReference getClassReference​(java.lang.String id,
                                         boolean doCreateIfNotPresent)
        Gets or creates the ClassReference in the property container.
        Parameters:
        id - ID for the class reference if several exist, null for default.
        doCreateIfNotPresent - Flag to create the property (this flag can only be true in Designer)!
        Returns:
        The resolved class reference instance, null if the ClassReference doesn't exist if the create flag is false. If flag is true, an orphan unresolved EditorClassReference instance (ONLY for the Designer).
      • isClassReferenceAnnotationBackReferenceRequired

        boolean isClassReferenceAnnotationBackReferenceRequired​(java.lang.String id)
        Checks if the ClassReference require an annotation back-reference.
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        true if the annotation is required to have a back-reference on the "ref" member value pair to the ClassReference owner.
      • getClassReferenceImplementsInterface

        java.lang.String getClassReferenceImplementsInterface​(java.lang.String id)
        Returns the required Interface.
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        The fully qualified name of the interface for the class, or null for none.
      • getClassReferenceRequiredAnnotation

        java.lang.String getClassReferenceRequiredAnnotation​(java.lang.String id)
        Returns the required annotation, or null for none.
        Parameters:
        id - ID for the class reference if several exist, null for default.
        Returns:
        The fully qualified name of the interface for the class, or null for none.
      • getRuntimeClassInstance

        default <T> T getRuntimeClassInstance​(java.lang.Class<T> clazz)
        Gets the class runtime instance that is connected to the object using the default class reference ID (if many exist). This is typically used from a panel to access the class that is connected to a VirtualSpace.
        Parameters:
        clazz - The requested class type.
        Returns:
        The class instance, or null if none is set.
        Throws:
        java.lang.ClassCastException - If the object is not null and is not assignable to the type T.
      • getRuntimeClassInstance

        default <T> T getRuntimeClassInstance​(java.lang.String id,
                                              java.lang.Class<T> clazz)
        Gets the class runtime instance that is connected to the object using the default class reference ID (if many exist). This is typically used from a panel to access the class that is connected to a VirtualSpace.
        Parameters:
        id - ID for the class reference if several exist, null for default.
        clazz - The requested class type.
        Returns:
        The class instance, or null if none is set.
        Throws:
        java.lang.ClassCastException - If the object is not null and is not assignable to the type T.