本文整理汇总了Java中org.eclipse.dltk.ast.Modifiers.AccPublic方法的典型用法代码示例。如果您正苦于以下问题:Java Modifiers.AccPublic方法的具体用法?Java Modifiers.AccPublic怎么用?Java Modifiers.AccPublic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.dltk.ast.Modifiers
的用法示例。
在下文中一共展示了Modifiers.AccPublic方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reportMethod
import org.eclipse.dltk.ast.Modifiers; //导入方法依赖的package包/类
private String reportMethod(GnMethodDeclaration declaration) {
ASTNode nameNode = declaration.getRef();
if (declaration.getType() == Type.TEMPLATE_CALL) {
SimpleReference originalRef = declaration.getOriginalRef();
fRequestor.acceptMethodReference(originalRef.getName(), declaration.getArguments().size(),
originalRef.sourceStart(), originalRef.sourceEnd());
nameNode = declaration.getFirstArgument();
} else {
nameNode = declaration.getRef();
}
String name = nameNode.toString();
IElementRequestor.MethodInfo info = new IElementRequestor.MethodInfo();
info.declarationStart = nameNode.start();
info.name = name;
info.nameSourceStart = nameNode.start();
info.nameSourceEnd = nameNode.end() - 1;
info.modifiers =
declaration.getType() == Type.TEMPLATE ? Modifiers.AccPublic : Modifiers.AccPrivate;
fRequestor.enterMethod(info);
return name;
}
示例2: visitNamedTypedParam
import org.eclipse.dltk.ast.Modifiers; //导入方法依赖的package包/类
@Override
public ASTNode visitNamedTypedParam(NamedTypedParamContext ctx) {
SimpleReference type = (SimpleReference) visit(ctx.typeExpression());
return new Argument(type, start(ctx), stop(ctx), null, Modifiers.AccPublic);
}
示例3: visitNamedParam
import org.eclipse.dltk.ast.Modifiers; //导入方法依赖的package包/类
@Override
public ASTNode visitNamedParam(NamedParamContext ctx) {
final Token name = ctx.ID().getSymbol();
final SimpleReference reference = new SimpleReference(start(name), stop(name), name.getText());
return new Argument(reference, start(ctx), stop(ctx), null, Modifiers.AccPublic);
}
示例4: visitAnonymousTypedParam
import org.eclipse.dltk.ast.Modifiers; //导入方法依赖的package包/类
@Override
public ASTNode visitAnonymousTypedParam(AnonymousTypedParamContext ctx) {
SimpleReference type = (SimpleReference) visit(ctx.typeExpression());
return new Argument(type, start(ctx), stop(ctx), null, Modifiers.AccPublic);
}