Implement NewIssue in place of Issuable for particular block of code

I want to re-format the given piece of code with the new class. I was trying to initialize new InputComponent but it is not accepting. Can anyone help me with this?

RuleViolation rv1 = (RuleViolation);
Rule rule1 = rv1.getRule();
RuleKey ruleKey = (RuleKey) resultActiveRules.get(rule1.getRuleSetName() + "/" + rule1.getName());
org.sonar.api.resources.File resource1 = org.sonar.api.resources.File.create(rv1.getFilename());
NewIssue newIssue = (NewIssue), resource1);
if(newIssue != null) {
    Issue issue = issuable.forRule(ruleKey).line(rv1.getBeginLine() == 0?null:Integer.valueOf(rv1.getBeginLine())).message(rv1.getDescription()).build();

Hello and welcome to this community forum.

Can you please describe a bit more what you are trying to achieve here, and describe what you already tried?

It is not obvious to me.