Class As.Type<T>

  • Enclosing interface:
    As

    public static final class As.Type<T>
    extends java.lang.Object
    A type reference for roles that can be used in place of a class literal, especially when roles with generics are used. Example of usage:
    
         interface DataRetriever<T>
           {
             public List<T> retrieve();
           }
    
         class CodeSample
           {
             private static final As.Type<DataRetriever<String>> _StringRetriever_ = As.type(DataRetriever.class);
    
             public void method (As object)
               {
                 List<String> f3 = object.as(_StringRetriever_).retrieve();
               }
           }
     
    Since:
    3.2-ALPHA-12
    • Constructor Summary

      Constructors 
      Constructor Description
      Type()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<T> getType()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Type

        public Type()
    • Method Detail

      • getType

        @Nonnull
        public java.lang.Class<T> getType()