jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JVar.java
changeset 27837 86d4f46e622a
parent 25871 b80b84e87032
equal deleted inserted replaced
27581:9fffb959eb41 27837:86d4f46e622a
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   173         return annotate(type.owner().ref(clazz));
   173         return annotate(type.owner().ref(clazz));
   174     }
   174     }
   175 
   175 
   176     public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
   176     public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
   177         return TypedAnnotationWriter.create(clazz,this);
   177         return TypedAnnotationWriter.create(clazz,this);
       
   178     }
       
   179 
       
   180     public boolean removeAnnotation(JAnnotationUse annotation) {
       
   181         return this.annotations.remove(annotation);
   178     }
   182     }
   179 
   183 
   180     public Collection<JAnnotationUse> annotations() {
   184     public Collection<JAnnotationUse> annotations() {
   181         if (annotations == null)
   185         if (annotations == null)
   182             annotations = new ArrayList<JAnnotationUse>();
   186             annotations = new ArrayList<JAnnotationUse>();