use of net.sourceforge.pmd.dcd.asm.TypeSignatureVisitor in project pmd by pmd.
the class ConstructorNode method getMember.
@Override
public Constructor<?> getMember() {
if (ClassLoaderUtil.CLINIT.equals(name)) {
return null;
} else {
Constructor<?> constructor = constructorReference == null ? null : constructorReference.get();
if (constructor == null) {
SignatureReader signatureReader = new SignatureReader(desc);
TypeSignatureVisitor visitor = new TypeSignatureVisitor();
signatureReader.accept(visitor);
constructor = ClassLoaderUtil.getConstructor(super.getClassNode().getType(), name, visitor.getMethodParameterTypes());
constructorReference = new WeakReference<Constructor<?>>(constructor);
}
return constructor;
}
}
use of net.sourceforge.pmd.dcd.asm.TypeSignatureVisitor in project pmd by pmd.
the class MethodNode method getMember.
@Override
public Method getMember() {
Method method = methodReference == null ? null : methodReference.get();
if (method == null) {
SignatureReader signatureReader = new SignatureReader(desc);
TypeSignatureVisitor visitor = new TypeSignatureVisitor();
signatureReader.accept(visitor);
method = ClassLoaderUtil.getMethod(super.getClassNode().getType(), name, visitor.getMethodParameterTypes());
methodReference = new WeakReference<>(method);
}
return method;
}
Aggregations