本文整理汇总了Java中com.intellij.util.containers.LimitedPool类的典型用法代码示例。如果您正苦于以下问题:Java LimitedPool类的具体用法?Java LimitedPool怎么用?Java LimitedPool使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LimitedPool类属于com.intellij.util.containers包,在下文中一共展示了LimitedPool类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: MyTreeStructure
import com.intellij.util.containers.LimitedPool; //导入依赖的package包/类
public MyTreeStructure(@NotNull StartMarker root, @Nullable final MyTreeStructure parentTree) {
if (parentTree == null) {
myPool = new LimitedPool<Token>(1000, new LimitedPool.ObjectFactory<Token>() {
@Override
public void cleanup(@NotNull final Token token) {
token.clean();
}
@NotNull
@Override
public Token create() {
return new TokenNode();
}
});
myLazyPool = new LimitedPool<LazyParseableToken>(200, new LimitedPool.ObjectFactory<LazyParseableToken>() {
@Override
public void cleanup(@NotNull final LazyParseableToken token) {
token.clean();
}
@NotNull
@Override
public LazyParseableToken create() {
return new LazyParseableToken();
}
});
}
else {
myPool = parentTree.myPool;
myLazyPool = parentTree.myLazyPool;
}
myRoot = root;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:PsiBuilderImpl.java
示例2: MyTreeStructure
import com.intellij.util.containers.LimitedPool; //导入依赖的package包/类
public MyTreeStructure(@NotNull StartMarker root, @Nullable final MyTreeStructure parentTree) {
if (parentTree == null) {
myPool = new LimitedPool<Token>(1000, new LimitedPool.ObjectFactory<Token>() {
@Override
public void cleanup(final Token token) {
token.clean();
}
@Override
public Token create() {
return new TokenNode();
}
});
myLazyPool = new LimitedPool<LazyParseableToken>(200, new LimitedPool.ObjectFactory<LazyParseableToken>() {
@Override
public void cleanup(final LazyParseableToken token) {
token.clean();
}
@Override
public LazyParseableToken create() {
return new LazyParseableToken();
}
});
}
else {
myPool = parentTree.myPool;
myLazyPool = parentTree.myLazyPool;
}
myRoot = root;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:32,代码来源:PsiBuilderImpl.java
示例3: MyTreeStructure
import com.intellij.util.containers.LimitedPool; //导入依赖的package包/类
public MyTreeStructure(@Nonnull StartMarker root, @Nullable final MyTreeStructure parentTree) {
if (parentTree == null) {
myPool = new LimitedPool<>(1000, new LimitedPool.ObjectFactory<Token>() {
@Override
public void cleanup(@Nonnull final Token token) {
token.clean();
}
@Nonnull
@Override
public Token create() {
return new TokenNode();
}
});
myLazyPool = new LimitedPool<>(200, new LimitedPool.ObjectFactory<LazyParseableToken>() {
@Override
public void cleanup(@Nonnull final LazyParseableToken token) {
token.clean();
}
@Nonnull
@Override
public LazyParseableToken create() {
return new LazyParseableToken();
}
});
}
else {
myPool = parentTree.myPool;
myLazyPool = parentTree.myLazyPool;
}
myRoot = root;
}
开发者ID:consulo,项目名称:consulo,代码行数:34,代码来源:PsiBuilderImpl.java
注:本文中的com.intellij.util.containers.LimitedPool类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论