本文整理了Java中com.strobel.core.ArrayUtilities.asUnmodifiableList()
方法的一些代码示例,展示了ArrayUtilities.asUnmodifiableList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ArrayUtilities.asUnmodifiableList()
方法的具体详情如下:
包路径:com.strobel.core.ArrayUtilities
类名称:ArrayUtilities
方法名:asUnmodifiableList
暂无
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
@Override
public final List<Node> getChildren() {
final int size = _caseBlocks.size() + (_condition != null ? 1 : 0);
final Node[] children = new Node[size];
int i = 0;
if (_condition != null) {
children[i++] = _condition;
}
for (final CaseBlock caseBlock : _caseBlocks) {
children[i++] = caseBlock;
}
return ArrayUtilities.asUnmodifiableList(children);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-compilertools
@Override
public final List<Node> getChildren() {
final int size = _caseBlocks.size() + (_condition != null ? 1 : 0);
final Node[] children = new Node[size];
int i = 0;
if (_condition != null) {
children[i++] = _condition;
}
for (final CaseBlock caseBlock : _caseBlocks) {
children[i++] = caseBlock;
}
return ArrayUtilities.asUnmodifiableList(children);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-compilertools
public ExceptionsAttribute(final TypeReference... exceptionTypes) {
super(
AttributeNames.Exceptions,
2 * (1 + VerifyArgument.noNullElements(exceptionTypes, "exceptionTypes").length)
);
_exceptionTypes = ArrayUtilities.asUnmodifiableList(exceptionTypes);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-compilertools
protected final void setEnumConstants(final Enum... values) {
VerifyArgument.notNull(values, "values");
_enumConstants = values.length == 0 ? null
: ArrayUtilities.asUnmodifiableList(values);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
protected final void setEnumConstants(final Enum... values) {
VerifyArgument.notNull(values, "values");
_enumConstants = values.length == 0 ? null
: ArrayUtilities.asUnmodifiableList(values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-compilertools
public ExceptionsAttribute(final TypeReference... exceptionTypes) {
super(
AttributeNames.Exceptions,
2 * (1 + VerifyArgument.noNullElements(exceptionTypes, "exceptionTypes").length)
);
_exceptionTypes = ArrayUtilities.asUnmodifiableList(exceptionTypes);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-compilertools
public BootstrapMethodsAttribute(final BootstrapMethodsTableEntry... bootstrapMethods) {
super(AttributeNames.BootstrapMethods, computeSize(bootstrapMethods));
_bootstrapMethods = ArrayUtilities.isNullOrEmpty(bootstrapMethods) ? Collections.<BootstrapMethodsTableEntry>emptyList()
: ArrayUtilities.asUnmodifiableList(bootstrapMethods);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
public BootstrapMethodsTableEntry(final MethodHandle method, final Object... arguments) {
_method = VerifyArgument.notNull(method, "method");
_arguments = ArrayUtilities.isNullOrEmpty(arguments) ? Collections.emptyList()
: ArrayUtilities.asUnmodifiableList(arguments);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-compilertools
public Frame(final FrameType frameType, final FrameValue[] localValues, final FrameValue[] stackValues) {
_frameType = VerifyArgument.notNull(frameType, "frameType");
_localValues = ArrayUtilities.asUnmodifiableList(VerifyArgument.notNull(localValues, "localValues").clone());
_stackValues = ArrayUtilities.asUnmodifiableList(VerifyArgument.notNull(stackValues, "stackValues").clone());
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
public LineNumberTableAttribute(final LineNumberTableEntry[] entries) {
super(AttributeNames.LineNumberTable, 2 + (VerifyArgument.notNull(entries, "entries").length * 4));
_entries = ArrayUtilities.asUnmodifiableList(entries.clone());
int max = Integer.MIN_VALUE;
for (final LineNumberTableEntry entry : entries) {
final int offset = entry.getOffset();
if (offset > max) {
max = offset;
}
}
_maxOffset = max;
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-compilertools
public final void setName(final String name) {
if (name == null) {
getChildrenByRole(Roles.IDENTIFIER).clear();
return;
}
final String[] parts = name.split("\\.");
final Identifier[] identifiers = new Identifier[parts.length];
for (int i = 0; i < identifiers.length; i++) {
identifiers[i] = Identifier.create(parts[i]);
}
getChildrenByRole(Roles.IDENTIFIER).replaceWith(ArrayUtilities.asUnmodifiableList(identifiers));
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
public final void setName(final String name) {
if (name == null) {
getChildrenByRole(Roles.IDENTIFIER).clear();
return;
}
final String[] parts = name.split("\\.");
final Identifier[] identifiers = new Identifier[parts.length];
for (int i = 0; i < identifiers.length; i++) {
identifiers[i] = Identifier.create(parts[i]);
}
getChildrenByRole(Roles.IDENTIFIER).replaceWith(ArrayUtilities.asUnmodifiableList(identifiers));
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-compilertools
public static List<BytecodeAstLanguage> getDebugLanguages() {
final AstOptimizationStep[] steps = AstOptimizationStep.values();
final BytecodeAstLanguage[] languages = new BytecodeAstLanguage[steps.length];
languages[0] = new BytecodeAstLanguage("Bytecode AST (Unoptimized)", false, steps[0]);
String nextName = "Bytecode AST (Variable Splitting)";
for (int i = 1; i < languages.length; i++) {
languages[i] = new BytecodeAstLanguage(nextName, true, steps[i - 1]);
nextName = "Bytecode AST (After " + steps[i - 1].name() + ")";
}
return ArrayUtilities.asUnmodifiableList(languages);
}
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
public static CustomAnnotation read(final IMetadataScope scope, final Buffer input) {
final int typeToken = input.readUnsignedShort();
final int parameterCount = input.readUnsignedShort();
final TypeReference annotationType = scope.lookupType(typeToken);
final AnnotationParameter[] parameters = new AnnotationParameter[parameterCount];
readParameters(parameters, scope, input, true);
return new CustomAnnotation(annotationType, ArrayUtilities.asUnmodifiableList(parameters));
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-compilertools
public static CustomAnnotation read(final IMetadataScope scope, final Buffer input) {
final int typeToken = input.readUnsignedShort();
final int parameterCount = input.readUnsignedShort();
final TypeReference annotationType = scope.lookupType(typeToken);
final AnnotationParameter[] parameters = new AnnotationParameter[parameterCount];
readParameters(parameters, scope, input, true);
return new CustomAnnotation(annotationType, ArrayUtilities.asUnmodifiableList(parameters));
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
public static CustomAnnotation read(final IMetadataScope scope, final Buffer input) {
final int typeToken = input.readUnsignedShort();
final int parameterCount = input.readUnsignedShort();
final TypeReference annotationType = scope.lookupType(typeToken);
final AnnotationParameter[] parameters = new AnnotationParameter[parameterCount];
readParameters(parameters, scope, input, true);
return new CustomAnnotation(annotationType, ArrayUtilities.asUnmodifiableList(parameters));
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-compilertools
public static CustomAnnotation read(final IMetadataScope scope, final Buffer input) {
final int typeToken = input.readUnsignedShort();
final int parameterCount = input.readUnsignedShort();
final TypeReference annotationType = scope.lookupType(typeToken);
final AnnotationParameter[] parameters = new AnnotationParameter[parameterCount];
readParameters(parameters, scope, input, true);
return new CustomAnnotation(annotationType, ArrayUtilities.asUnmodifiableList(parameters));
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-compilertools
public static CustomAnnotation read(final IMetadataScope scope, final Buffer input) {
final int typeToken = input.readUnsignedShort();
final int parameterCount = input.readUnsignedShort();
final TypeReference annotationType = scope.lookupType(typeToken);
final AnnotationParameter[] parameters = new AnnotationParameter[parameterCount];
readParameters(parameters, scope, input, true);
return new CustomAnnotation(annotationType, ArrayUtilities.asUnmodifiableList(parameters));
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-compilertools
public ControlFlowGraph(final ControlFlowNode... nodes) {
_nodes = ArrayUtilities.asUnmodifiableList(VerifyArgument.noNullElements(nodes, "nodes"));
assert nodes.length >= 3;
assert getEntryPoint().getNodeType() == ControlFlowNodeType.EntryPoint;
assert getRegularExit().getNodeType() == ControlFlowNodeType.RegularExit;
assert getExceptionalExit().getNodeType() == ControlFlowNodeType.ExceptionalExit;
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-compilertools
public ControlFlowGraph(final ControlFlowNode... nodes) {
_nodes = ArrayUtilities.asUnmodifiableList(VerifyArgument.noNullElements(nodes, "nodes"));
assert nodes.length >= 3;
assert getEntryPoint().getNodeType() == ControlFlowNodeType.EntryPoint;
assert getRegularExit().getNodeType() == ControlFlowNodeType.RegularExit;
assert getExceptionalExit().getNodeType() == ControlFlowNodeType.ExceptionalExit;
}
内容来源于网络,如有侵权,请联系作者删除!