• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DeveloperError类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.novoda.notils.exception.DeveloperError的典型用法代码示例。如果您正苦于以下问题:Java DeveloperError类的具体用法?Java DeveloperError怎么用?Java DeveloperError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DeveloperError类属于com.novoda.notils.exception包,在下文中一共展示了DeveloperError类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onCreateViewHolder

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Override
public MessageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    MessageBubbleDrawable bubbleDrawable;
    MessageView messageView;
    if (viewType == VIEW_TYPE_MESSAGE_THIS_USER) {
        bubbleDrawable = new MessageBubbleDrawable(parent.getContext(), R.color.colorPrimaryLight, Gravity.END);
        messageView = (MessageView) inflater.inflate(R.layout.self_message_item_layout, parent, false);
    } else if (viewType == VIEW_TYPE_MESSAGE_OTHER_USERS) {
        bubbleDrawable = new MessageBubbleDrawable(parent.getContext(), R.color.bubble_grey, Gravity.START);
        messageView = (MessageView) inflater.inflate(R.layout.message_item_layout, parent, false);
    } else {
        throw new DeveloperError("There is an unknown view type, you should inflate a view for it.");
    }
    messageView.setTextBackground(bubbleDrawable);
    return new MessageViewHolder(messageView);
}
 
开发者ID:novoda,项目名称:bonfire-firebase-sample,代码行数:17,代码来源:ChatAdapter.java


示例2: getOrder

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
protected String getOrder() {
    QUERY query = (QUERY) getArguments().get("query");
    switch (query) {
        case top:
            return HNewsContract.StoryEntry.RANK + " ASC" +
                    ", " + HNewsContract.StoryEntry.TIMESTAMP + " DESC";
        case newest:
            return HNewsContract.StoryEntry.TIME_AGO + " DESC";
        case best:
            return HNewsContract.StoryEntry.SCORE + " DESC" +
                    ", " + HNewsContract.StoryEntry.TIMESTAMP + " DESC";
        default:
            new DeveloperError("Bad Query type");
            return null;
    }
}
 
开发者ID:malmstein,项目名称:yahnac,代码行数:17,代码来源:TopStoriesFragment.java


示例3: init

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Override
public void init() {
    synchronized (this) {
        if (initialised) {
            throw new DeveloperError("You don't really want init this if it was already initialised");
        }
        initialised = true;
        configureDrawer();
        flowerDrawer.init();
    }
}
 
开发者ID:juankysoriano,项目名称:Zen,代码行数:12,代码来源:BranchPerformer.java


示例4: init

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Override
public void init() {
    synchronized (this) {
        if (initialised) {
            throw new DeveloperError("You don't really want init this if it was already initialised");
        }
        initialised = true;
        configureDrawer();
    }
}
 
开发者ID:juankysoriano,项目名称:Zen,代码行数:11,代码来源:InkPerformer.java


示例5: setOrientation

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Override
public void setOrientation(int orientation) {
    if (orientation != VERTICAL) {
        throw new DeveloperError("CroutonView supports only vertical orientation");
    }
    super.setOrientation(orientation);
}
 
开发者ID:malmstein,项目名称:yahnac,代码行数:8,代码来源:SnackBarView.java


示例6: getType

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
public Story.FILTER getType() {
    QUERY query = (QUERY) getArguments().get("query");
    switch (query) {
        case top:
            return Story.FILTER.top_story;
        case newest:
            return Story.FILTER.new_story;
        case best:
            return Story.FILTER.top_story;
        default:
            new DeveloperError("Bad Query type");
            return null;
    }
}
 
开发者ID:malmstein,项目名称:yahnac,代码行数:15,代码来源:TopStoriesFragment.java


示例7: getStory

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
private Story getStory() {
    if (activity.getIntent().getExtras().containsKey(CommentsActivity.ARG_STORY)) {
        return (Story) activity.getIntent().getExtras().getSerializable(CommentsActivity.ARG_STORY);
    } else {
        throw new DeveloperError("Missing argument");
    }
}
 
开发者ID:malmstein,项目名称:yahnac,代码行数:8,代码来源:CommentsOperator.java


示例8: createIntent

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
/**
 * TODO Allow intent creation without connection. Might be useful to re-customise a current session.
 */
public CustomTabsIntent createIntent() {
    if (connection.isDisconnected()) {
        throw new DeveloperError("An active connection to custom tabs service is required for intent creation");
    }

    Session session = connection.getSession();

    CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(session.getCustomTabsSession());
    for (Composer composer : composers) {
        builder = composer.compose(builder);
    }

    return builder.build();
}
 
开发者ID:novoda,项目名称:simple-chrome-custom-tabs,代码行数:18,代码来源:SimpleChromeCustomTabsIntentBuilder.java


示例9: newSession

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
public Session newSession() {
    if (!stillConnected()) {
        throw new DeveloperError("Cannot start session on a disconnected client. Use stillConnected() to check connection");
    }

    warmup();

    return SimpleChromeCustomTabsSession.newSessionFor(customTabsClient);
}
 
开发者ID:novoda,项目名称:simple-chrome-custom-tabs,代码行数:10,代码来源:ConnectedClient.java


示例10: givenThatClientIsDisconnected_whenStartingNewSession_thenClientIsNotWarmedUp

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Test(expected = DeveloperError.class)
public void givenThatClientIsDisconnected_whenStartingNewSession_thenClientIsNotWarmedUp() {
    connectedClient.disconnect();

    connectedClient.newSession();

    verify(mockCustomTabsClient, never()).warmup(anyInt());
}
 
开发者ID:novoda,项目名称:simple-chrome-custom-tabs,代码行数:9,代码来源:ConnectedClientTest.java


示例11: from

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static <T> T from(Object implementor) {
    try {
        return (T) implementor;
    } catch (ClassCastException e) {
        throw new DeveloperError(implementor.toString() + " does not inherit / implement the wanted interface", e);
    }
}
 
开发者ID:novoda,项目名称:notils,代码行数:9,代码来源:Classes.java


示例12: shouldShowLogs

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
/**
 * Returns the active status of the log switch
 *
 * @return {@code true} if logs are active, {@code false} if deactivated
 */
public static boolean shouldShowLogs() {
    if (INITIALISED) {
        return SHOW_LOGS;
    } else {
        throw new DeveloperError("#rekt - To use simple logger you need to have called setShowLogs(boolean). "
                + "The typical way is to use Log.setShowLogs(BuildConfig.DEBUG) "
                + "in onCreate() of your class that extends Application."
                + "(It's ok we've all been there.)");
    }
}
 
开发者ID:novoda,项目名称:notils,代码行数:16,代码来源:Log.java


示例13: setOrientation

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Override
public final void setOrientation(int orientation) {
    throw new DeveloperError("This layout only supports horizontal orientation");
}
 
开发者ID:novoda,项目名称:no-player,代码行数:5,代码来源:AndroidControllerView.java


示例14: setOrientation

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Override
public void setOrientation(int orientation) {
    throw new DeveloperError("This view only supports vertical orientation");
}
 
开发者ID:novoda,项目名称:bonfire-firebase-sample,代码行数:5,代码来源:MessageView.java


示例15: instance

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
private static Inject instance() {
    if (INSTANCE == null) {
        throw new DeveloperError("You need to setup Inject to use a valid DependenciesFactory");
    }
    return INSTANCE;
}
 
开发者ID:malmstein,项目名称:yahnac,代码行数:7,代码来源:Inject.java


示例16: checkLibraryInstantiation

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
private static void checkLibraryInstantiation() {
    if (actManipulator == null) {
        throw new DeveloperError("Please call create(Context) first to initialise this library."); // TODO use arrow logger
    }
}
 
开发者ID:blundell,项目名称:QuickSand,代码行数:6,代码来源:Quicksand.java


示例17: Creator

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
private Creator() {
    throw new DeveloperError("Shouldn't be instantiated");
}
 
开发者ID:novoda,项目名称:simple-chrome-custom-tabs,代码行数:4,代码来源:WebNavigator.java


示例18: givenThereIsNoConnection_whenCreatingIntent_thenDeveloperErrorIsThrown

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Test(expected = DeveloperError.class)
public void givenThereIsNoConnection_whenCreatingIntent_thenDeveloperErrorIsThrown() {
    givenIsDisconnected();

    simpleChromeCustomTabsIntentBuilder.createIntent();
}
 
开发者ID:novoda,项目名称:simple-chrome-custom-tabs,代码行数:7,代码来源:SimpleChromeCustomTabsIntentBuilderTest.java


示例19: givenThatClientIsDisconnected_whenStartingNewSession_thenDeveloperErrorIsThrown

import com.novoda.notils.exception.DeveloperError; //导入依赖的package包/类
@Test(expected = DeveloperError.class)
public void givenThatClientIsDisconnected_whenStartingNewSession_thenDeveloperErrorIsThrown() {
    connectedClient.disconnect();

    connectedClient.newSession();
}
 
开发者ID:novoda,项目名称:simple-chrome-custom-tabs,代码行数:7,代码来源:ConnectedClientTest.java



注:本文中的com.novoda.notils.exception.DeveloperError类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AbstractSequenceDescription类代码示例发布时间:2022-05-22
下一篇:
Java Listen类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap