模块 mxlib.api

接口 Reflect<T>

  • 所有已知实现类:
    ObjectReflect

    public interface Reflect<T>
    • 方法详细资料

      • ofObject

        @Contract(pure=true)
        @NotNull
        static <W> @NotNull Reflect<W> ofObject​(W value)
      • ofClass

        @Contract(pure=true)
        @NotNull
        static <W> @NotNull Reflect<W> ofClass​(@NotNull
                                               @NotNull Class<W> clazz)
      • get

        @Contract(pure=true)
        T get()
      • toOptional

        @NotNull
        @Contract(pure=true)
        default @NotNull Optional<T> toOptional()
      • toRoot

        @Contract(pure=true)
        @NotNull
        @NotNull Reflect<T> toRoot()
      • accept

        @NotNull
        default @NotNull Reflect<T> accept​(@NotNull
                                           @NotNull Consumer<T> consumer)
      • cast

        @Contract(pure=true)
        <V> Reflect<V> cast​(Class<V> type)
      • getField

        @Contract(pure=true)
        default RField<T,​?> getField​(@NotNull
                                           @NotNull String name)
      • getField

        @Contract(pure=true)
        <V> RField<T,​V> getField​(@NotNull
                                       @NotNull String name,
                                       @Nullable
                                       @Nullable Class<V> type)
      • getMethods

        RMethod<T,​?>[] getMethods​(@NotNull
                                        @NotNull String name)