Package com.google.common.reflect

Examples of com.google.common.reflect.TypeToken$SimpleTypeToken


    * Returns an {@link Iterable} of {@link org.jclouds.management.ViewMBean} for the specified {@link View}.
    * @param view
    * @return
    */
   private static Iterable<ViewMBean> viewManagementOf(final View view) {
      TypeToken type = TypeToken.of(view.getClass());
      return Iterables.transform(ViewMBeanFactories.forType(type), new Function<ViewMBeanFactory, ViewMBean>() {
         @Override
         public ViewMBean apply(@Nullable ViewMBeanFactory factory) {
            return factory.create(view);
         }
View Full Code Here


    * Returns an {@link Iterable} of {@link org.jclouds.management.ViewMBean} for the specified {@link View}.
    * @param view
    * @return
    */
   private static Iterable<ViewMBean> viewManagementOf(final View view) {
      TypeToken type = TypeToken.of(view.getClass());
      return Iterables.transform(ViewMBeanFactories.forType(type), new Function<ViewMBeanFactory, ViewMBean>() {
         @Override
         public ViewMBean apply(@Nullable ViewMBeanFactory factory) {
            return factory.create(view);
         }
View Full Code Here

     * @return The found result. If there is no matching result, it will return <tt>null</tt>. (Nullable)
     */
    @SuppressWarnings("rawtypes")
    private ReturnValue getReturnValueFromHistoryByType(final Type type) {
       
        final TypeToken returnValueType = TypeToken.of(getTypeFromReturnValue(type));
        for (ReturnValue returnValue : returnValueHistory) {
            if (returnValueType.isAssignableFrom(returnValue.getType())) {
                return returnValue;
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.google.common.reflect.TypeToken$SimpleTypeToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.