All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.pmd.lang.apex.ast.ASTUserTrigger Maven / Gradle / Ivy

There is a newer version: 7.5.0
Show newest version
/*
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.apex.ast;

import java.util.List;
import java.util.stream.Collectors;

import com.google.summit.ast.declaration.TriggerDeclaration;

public final class ASTUserTrigger extends BaseApexClass {

    ASTUserTrigger(TriggerDeclaration triggerDeclaration) {
        super(triggerDeclaration);
    }

    @Override
    protected  R acceptApexVisitor(ApexVisitor visitor, P data) {
        return visitor.visit(this, data);
    }

    public String getTargetName() {
        return node.getTarget().getString();
    }

    public List getUsages() {
        return node.getCases().stream()
                .map(TriggerUsage::of)
                .sorted()
                .collect(Collectors.toList());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy