Node method = JavaContext.findSurroundingMethod(call); if (method == null) { return;
Node method = JavaContext.findSurroundingMethod(node); if (method == null) { return;
private static String getThreadContext(@NonNull JavaContext context, @NonNull MethodInvocation methodCall) { Node node = findSurroundingMethod(methodCall); if (node != null) { ResolvedNode resolved = context.resolve(node);
Node method = JavaContext.findSurroundingMethod(node.getParent()); if (method == null) { return;
@NonNull private static PermissionHolder addLocalPermissions( @NonNull JavaContext context, @NonNull PermissionHolder permissions, @NonNull Node node) { // Accumulate @RequirePermissions available in the local context Node methodNode = JavaContext.findSurroundingMethod(node); if (methodNode == null) { return permissions; } ResolvedNode resolved = context.resolve(methodNode); if (!(resolved instanceof ResolvedMethod)) { return permissions; } ResolvedMethod method = (ResolvedMethod) resolved; ResolvedAnnotation annotation = method.getAnnotation(PERMISSION_ANNOTATION); permissions = mergeAnnotationPermissions(context, permissions, annotation); annotation = method.getContainingClass().getAnnotation(PERMISSION_ANNOTATION); permissions = mergeAnnotationPermissions(context, permissions, annotation); return permissions; }
Node method = JavaContext.findSurroundingMethod(node); if (method == null) { return true;
Node method = JavaContext.findSurroundingMethod(parent); if (method == null) { return;
Node method = JavaContext.findSurroundingMethod(node); if (method == null) { return true;
Node method = JavaContext.findSurroundingMethod(call); if (method != null) { ConcreteTypeVisitor v = new ConcreteTypeVisitor(context, call);
Node methodNode = JavaContext.findSurroundingMethod(node); if (methodNode != null) { CheckPermissionVisitor visitor = new CheckPermissionVisitor(node);