Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/main/java/org/spongepowered/asm/util/ClassSignature.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static interface IToken {
* @param array arrayness flag
* @return this token
*/
public abstract IToken setArray(boolean array);
public abstract IToken setArray(int array);

/**
* Set the wildcard on this token, only accepted if one of the valid
Expand Down Expand Up @@ -192,9 +192,9 @@ static class Token implements IToken {
private final boolean inner;

/**
* True if this token represents an array type
* Array depth of this token
*/
private boolean array;
private int array;

/**
* Symbol (wildcard, unbound or base type)
Expand Down Expand Up @@ -279,8 +279,8 @@ boolean hasInterfaceBound() {
}

@Override
public IToken setArray(boolean array) {
this.array |= array;
public IToken setArray(int array) {
this.array = array;
return this;
}

Expand Down Expand Up @@ -487,7 +487,7 @@ public String asType() {
public String asType(boolean raw) {
StringBuilder sb = new StringBuilder();

if (this.array) {
for (int i = this.array; i > 0; i--) {
sb.append('[');
}

Expand Down Expand Up @@ -557,9 +557,9 @@ class TokenHandle implements IToken {
final Token token;

/**
* True if this handle is an array type
* Array depth of this handle
*/
boolean array;
int array;

/**
* Wildcard for this handle
Expand All @@ -576,11 +576,11 @@ class TokenHandle implements IToken {

/* (non-Javadoc)
* @see org.spongepowered.asm.util.ClassSignature.IToken
* #setArray(boolean)
* #setArray(int)
*/
@Override
public IToken setArray(boolean array) {
this.array |= array;
public IToken setArray(int array) {
this.array = array;
return this;
}

Expand Down Expand Up @@ -615,7 +615,7 @@ public String asType() {
sb.append(this.wildcard);
}

if (this.array) {
for (int i = this.array; i > 0; i--) {
sb.append('[');
}

Expand Down Expand Up @@ -678,9 +678,9 @@ abstract class TokenElement extends SignatureElement {
protected Token token;

/**
* True if the next element to be appended is an array element
* Array depth of the next element to be appended
*/
private boolean array;
private int array;

public Token getToken() {
if (this.token == null) {
Expand All @@ -690,12 +690,12 @@ public Token getToken() {
}

protected void setArray() {
this.array = true;
this.array++;
}

private boolean getArray() {
boolean array = this.array;
this.array = false;
private int getArray() {
int array = this.array;
this.array = 0;
return array;
}

Expand Down
Loading