# HG changeset patch # User Roland Schatz # Date 1431510897 -7200 # Node ID 88e4916f246a8543dc6c66942b51961e758c44c1 # Parent c4b87ad2c4c8b553be64508e15416884c517e039 Allow private node inputs and data fields. diff -r c4b87ad2c4c8 -r 88e4916f246a graal/com.oracle.graal.nodeinfo.processor/src/com/oracle/graal/nodeinfo/processor/GraphNodeVerifier.java --- a/graal/com.oracle.graal.nodeinfo.processor/src/com/oracle/graal/nodeinfo/processor/GraphNodeVerifier.java Wed May 13 11:53:17 2015 +0200 +++ b/graal/com.oracle.graal.nodeinfo.processor/src/com/oracle/graal/nodeinfo/processor/GraphNodeVerifier.java Wed May 13 11:54:57 2015 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -123,8 +123,8 @@ if (modifiers.contains(FINAL)) { throw new ElementException(field, "Input list field must not be final"); } - if (modifiers.contains(PUBLIC) || modifiers.contains(PRIVATE)) { - throw new ElementException(field, "Input list field must be protected or package-private"); + if (modifiers.contains(PUBLIC)) { + throw new ElementException(field, "Input list field must not be public"); } } else { if (!isAssignableWithErasure(field, Node) && field.getKind() == ElementKind.INTERFACE) { @@ -133,8 +133,8 @@ if (modifiers.contains(FINAL)) { throw new ElementException(field, "Input field must not be final"); } - if (modifiers.contains(PUBLIC) || modifiers.contains(PRIVATE)) { - throw new ElementException(field, "Input field must be protected or package-private"); + if (modifiers.contains(PUBLIC)) { + throw new ElementException(field, "Input field must not be public"); } } } else if (isSuccessor) { @@ -152,8 +152,8 @@ if (modifiers.contains(FINAL)) { throw new ElementException(field, "Successor field must not be final"); } - if (modifiers.contains(PUBLIC) || modifiers.contains(PRIVATE)) { - throw new ElementException(field, "Successor field must be protected or package-private"); + if (modifiers.contains(PUBLIC)) { + throw new ElementException(field, "Successor field must not be public"); } } @@ -167,12 +167,8 @@ if (isAssignableWithErasure(field, NodeSuccessorList)) { throw new ElementException(field, "NodeSuccessorList field must be annotated with @" + Successor.getSimpleName()); } - if (modifiers.contains(PUBLIC)) { - if (!modifiers.contains(FINAL)) { - throw new ElementException(field, "Data field must be final if public otherwise it must be protected"); - } - } else if (!modifiers.contains(PROTECTED)) { - throw new ElementException(field, "Data field must be protected"); + if (modifiers.contains(PUBLIC) && !modifiers.contains(FINAL)) { + throw new ElementException(field, "Data field must be final if public"); } } }