Interface Reflect

All Known Implementing Classes:
ReflectImpl

public interface Reflect
Reflection API of an object/type. The reflection API of an object can be accessed via the vmf() method:

 VObject o = ...
 Reflect r = o.vmf().reflect()
 
  • Method Summary

    Modifier and Type Method Description
    default java.util.Optional<Annotation> annotationByKey​(java.lang.String key)
    Returns annotation specified by key.
    java.util.List<Annotation> annotations()
    Returns the list of annotations of this object.
    default java.util.List<Annotation> annotationsByKey​(java.lang.String key)
    Returns annotations specified by key.
    java.util.List<Property> properties()
    Returns the list of properties of this object.
    default java.util.Optional<Property> propertyByName​(java.lang.String name)
    Returns the model property specified by name.
    Type type()
    Returns the type of this object.
  • Method Details

    • annotations

      java.util.List<Annotation> annotations()
      Returns the list of annotations of this object.
      Returns:
      the list of annotations of this object
    • annotationByKey

      default java.util.Optional<Annotation> annotationByKey​(java.lang.String key)
      Returns annotation specified by key.
      Parameters:
      key - the key of the annotation to return
      Returns:
      the first annotation with the specified key
      See Also:
      annotationsByKey(String)
    • annotationsByKey

      default java.util.List<Annotation> annotationsByKey​(java.lang.String key)
      Returns annotations specified by key.
      Parameters:
      key - the key of the annotation to return
      Returns:
      annotations specified by key
      See Also:
      annotationByKey(String)
    • properties

      java.util.List<Property> properties()
      Returns the list of properties of this object.
      Returns:
      the list of properties of this object
    • propertyByName

      default java.util.Optional<Property> propertyByName​(java.lang.String name)
      Returns the model property specified by name.
      Parameters:
      name - the model property specified by name
      Returns:
      the model property specified by name
    • type

      Type type()
      Returns the type of this object.