Java 类com.facebook.FacebookGraphObjectException 实例源码

项目:AndroidBackendlessChat    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:chat-sdk-android-push-firebase    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:yelo-android    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:yelo-android    文件:FacebookDialog.java   
void updateObjectAttachmentUrls(String objectProperty, List<String> attachmentUrls, boolean isUserGenerated) {
    final OpenGraphObject object;
    try {
        object = action.getPropertyAs(objectProperty, OpenGraphObject.class);
        if (object == null) {
            throw new IllegalArgumentException("Action does not contain a property '" + objectProperty + "'");
        }
    } catch (FacebookGraphObjectException exception) {
        throw new IllegalArgumentException("Property '" + objectProperty + "' is not a graph object");
    }
    if (!object.getCreateObject()) {
        throw new IllegalArgumentException(
                "The Open Graph object in '" + objectProperty + "' is not marked for creation");
    }

    GraphObjectList<GraphObject> attachments = object.getImage();
    if (attachments == null) {
        attachments = GraphObject.Factory.createList(GraphObject.class);
    }
    for (String url : attachmentUrls) {
        GraphObject graphObject = GraphObject.Factory.create();
        graphObject.setProperty(NativeProtocol.IMAGE_URL_KEY, url);
        if (isUserGenerated) {
            graphObject.setProperty(NativeProtocol.IMAGE_USER_GENERATED_KEY, true);
        }
        attachments.add(graphObject);
    }
    object.setImage(attachments);
}
项目:BrillaMXAndroid    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:aquaplay    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:TP-Formation-Android    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:AutoTimeHelper    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:snake-game-aws    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:BrainStudio    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:FacebookImageShareIntent    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadPropertyNameOverrides() {
    try {
        GraphObject.Factory.create(BadPropertyOverrideInterfaceGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:QuizUpWinner    文件:GraphObject.java   
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> paramClass)
{
  if (GraphObject.class.isAssignableFrom(this.itemType))
  {
    if (paramClass.isAssignableFrom(this.itemType))
      return this;
    return GraphObject.Factory.createList(this.state, paramClass);
  }
  throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type " + this.itemType);
}
项目:FacebookImageShareIntent    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadGetterName() {
    try {
        GraphObject.Factory.create(BadGetterNameGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:stepout    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:Shorcial    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:Abelana-Android    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:Team-Alice    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:FacebookImageShareIntent    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadZeroParameterMethodName() {
    try {
        GraphObject.Factory.create(BadNoParameterMethodNameGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:CampusFeedv2    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:WatsiAndroidApp    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:Qtino.SharingKit    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:FacebookImageShareIntent    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadSetterName() {
    try {
        GraphObject.Factory.create(BadSetterNameGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:kaorisan    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:maven-multilib-sample-app    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:p2psafety    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:FacebookImageShareIntent    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadGetterParams() {
    try {
        GraphObject.Factory.create(BadGetterParamsGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:ShopAfter    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:MeNextAndroid    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:FacebookImageShareIntent    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadBaseInterface() {
    try {
        GraphObject.Factory.create(BadBaseInterfaceGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:MisterWok    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:CanYouSinkMe    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:ClassParticipation2    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:FacebookImageShareIntent    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadSingleParameterMethodName() {
    try {
        GraphObject.Factory.create(BadSingleParameterMethodNameGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:ClassParticipation2    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:Klyph    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:ClosedCirclesAndroid    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:Wabbit-Messenger---android-client    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:LostAndFound    文件:GraphObject.java   
@Override
public final <U extends GraphObject> GraphObjectList<U> castToListOf(Class<U> graphObjectClass) {
    if (GraphObject.class.isAssignableFrom(itemType)) {
        if (graphObjectClass.isAssignableFrom(itemType)) {
            @SuppressWarnings("unchecked")
            GraphObjectList<U> result = (GraphObjectList<U>)this;
            return result;
        }

        return createList(state, graphObjectClass);
    } else {
        throw new FacebookGraphObjectException("Can't cast GraphObjectCollection of non-GraphObject type "
                + itemType);
    }
}
项目:LostAndFound    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapNonInterface() {
    try {
        GraphObject.Factory.create(GraphObjectClass.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}
项目:LostAndFound    文件:GraphObjectFactoryTests.java   
@SmallTest
@MediumTest
@LargeTest
public void testCantWrapBadZeroParameterMethodName() {
    try {
        GraphObject.Factory.create(BadNoParameterMethodNameGraphObject.class);
        fail("Expected exception");
    } catch (FacebookGraphObjectException exception) {
    }
}