use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class FieldSignatureVisitor method visitInnerClassType.
@Override
public void visitInnerClassType(final String name) {
final EntryMessage em = log.traceEntry("name={} typeInfo={}", name, this.typeInfo);
this.typeInfo.innerClass = name;
log.traceExit(em);
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class FieldSignatureVisitor method visitFormalTypeParameter.
@Override
public void visitFormalTypeParameter(final String name) {
final EntryMessage em = log.traceEntry("name={}", name);
super.visitFormalTypeParameter(name);
log.traceExit(em);
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class FieldSignatureVisitor method visitArrayType.
@Override
public SignatureVisitor visitArrayType() {
final TypeInfo current = this.currentType.peek();
if (current != null) {
current.isArray = true;
} else {
// on hold array flag
this.holdArray = true;
}
final EntryMessage em = log.traceEntry("name={} current={} currentType={}", this.name, current, this.currentType);
return log.traceExit(em, super.visitArrayType());
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class FieldSignatureVisitor method visitTypeArgument.
@Override
public SignatureVisitor visitTypeArgument(final char c) {
final EntryMessage em = log.traceEntry("name={} typeInfo={} currentType={}", this.name, this.typeInfo, this.currentType);
this.isInstance = false;
this.isExtends = false;
this.isSuper = false;
switch(c) {
case SignatureVisitor.INSTANCEOF:
this.isInstance = true;
break;
case SignatureVisitor.SUPER:
this.isSuper = true;
break;
case SignatureVisitor.EXTENDS:
this.isExtends = true;
break;
}
if (this.currentType.size() == 0) {
return log.traceExit(em, super.visitTypeArgument(c));
}
final TypeInfo typeInfo = this.currentType.peek();
if (typeInfo.typeParameters == null) {
typeInfo.typeParameters = new ArrayList<>(4);
}
return log.traceExit(em, super.visitTypeArgument(c));
}
use of org.apache.logging.log4j.message.EntryMessage in project meghanada-server by mopemope.
the class FieldSignatureVisitor method visitTypeVariable.
@Override
public void visitTypeVariable(String typeVariable) {
final EntryMessage em = log.traceEntry("name={} typeVariable={} typeInfo={} current={}", this.name, typeVariable, this.typeInfo, this.currentType);
TypeInfo typeInfo;
if (this.typeMap != null && typeMap.containsKey(typeVariable)) {
String val = typeMap.get(typeVariable);
if (val.equals(typeVariable)) {
FieldSignatureVisitor.getTopVisitor(this).typeParameters.add(typeVariable);
typeVariable = ClassNameUtils.CLASS_TYPE_VARIABLE_MARK + typeVariable;
} else {
ClassNameUtils.getTypeVariable(val).ifPresent(tv -> FieldSignatureVisitor.getTopVisitor(this).typeParameters.add(tv));
typeVariable = val;
}
} else {
if (this.classTypeParameters.contains(typeVariable)) {
// mark
FieldSignatureVisitor.getTopVisitor(this).typeParameters.add(typeVariable);
typeVariable = ClassNameUtils.CLASS_TYPE_VARIABLE_MARK + typeVariable;
} else {
FieldSignatureVisitor.getTopVisitor(this).typeParameters.add(typeVariable);
typeVariable = ClassNameUtils.FORMAL_TYPE_VARIABLE_MARK + typeVariable;
}
}
typeInfo = getTypeInfo(typeVariable);
if (this.typeInfo == null) {
this.typeInfo = typeInfo;
if (this.holdArray) {
this.typeInfo.isArray = true;
this.holdArray = false;
}
}
if (this.currentType.size() == 0) {
// set main
this.currentType.push(typeInfo);
} else {
TypeInfo current = this.currentType.peek();
if (current != null && current.typeParameters != null) {
current.typeParameters.add(typeInfo);
// swap
this.currentType.push(typeInfo);
}
}
log.traceExit(em);
}
Aggregations