code: protected void initType() {
          try {
              this.type = getEnhancedAnnotated().getJavaClass();
          } catch (ClassCastException e) {
              Type type = Beans.getDeclaredBeanType(getClass());
              throw BeanLogger.LOG.producerCastError(getEnhancedAnnotated().getJavaClass(), (type == null ? " unknown " : type), e);
          }
      }
docs: Initializes the type