public ServiceImplBeanImpl(String linkName, AnnotationModelHelper helper, TypeElement typeElement) { this.linkName=linkName; Map<String, ? extends AnnotationMirror> annByType = helper.getAnnotationsByType(typeElement.getAnnotationMirrors()); AnnotationMirror ejbAnnotation = annByType.get("javax.ejb.Stateless"); // NOI18N isEjb = (ejbAnnotation!=null); }
@Override public boolean refresh( TypeElement type ) { List<? extends AnnotationMirror> allAnnotationMirrors = getHelper().getCompilationController().getElements(). getAllAnnotationMirrors(type); Map<String, ? extends AnnotationMirror> annotationsByType = getHelper().getAnnotationsByType( allAnnotationMirrors ); return annotationsByType.get( myStereotype) != null ; }
@Override public boolean refresh( TypeElement type ) { List<? extends AnnotationMirror> allAnnotationMirrors = getHelper().getCompilationController().getElements(). getAllAnnotationMirrors(type); Map<String, ? extends AnnotationMirror> annotationsByType = getHelper().getAnnotationsByType( allAnnotationMirrors ); return annotationsByType.get( INTERCEPTOR ) != null ; }
private void fillDeclaredAnnotations( AnnotationParser parser, Element subjectElement ) { List<? extends AnnotationMirror> annotationMirrors = getController().getElements().getAllAnnotationMirrors( subjectElement ); AnnotationMirror annotationMirror = getHelper().getAnnotationsByType( annotationMirrors).get(INTERCEPTORS); if ( annotationMirror != null ){ parser.parse(annotationMirror); } }
@Override public boolean refresh( TypeElement type ) { List<? extends AnnotationMirror> allAnnotationMirrors = getHelper().getCompilationController().getElements(). getAllAnnotationMirrors(type); Map<String, ? extends AnnotationMirror> annotationsByType = getHelper().getAnnotationsByType( allAnnotationMirrors ); return annotationsByType.get( EnableBeansFilter.DECORATOR) != null ; }
private boolean checkMember( ExecutableElement exec, AnnotationValue value, Element elementWithBinding, Iterator<? extends Element> iterator, String annotationName ) { List<? extends AnnotationMirror> allAnnotationMirrors = getImplementation() .getHelper().getCompilationController().getElements() .getAllAnnotationMirrors(elementWithBinding); AnnotationMirror annotationMirror = getImplementation().getHelper() .getAnnotationsByType(allAnnotationMirrors).get(annotationName); if ( annotationMirror == null ){ return false; } Map<? extends ExecutableElement, ? extends AnnotationValue> elementValues = annotationMirror.getElementValues(); AnnotationValue valueForType = elementValues.get(exec); if (!equals(value, valueForType)) { iterator.remove(); } return true; }
boolean refresh(TypeElement typeElement) { if (typeElement.getKind() == ElementKind.INTERFACE) { // don't consider interfaces (SEI classes) return false; } AnnotationModelHelper helper = getHelper(); Map<String, ? extends AnnotationMirror> annByType = helper.getAnnotationsByType(typeElement.getAnnotationMirrors()); AnnotationMirror webServiceAnn = annByType.get("javax.jws.WebService"); // NOI18N if (webServiceAnn == null) { webServiceAnn = annByType.get("javax.xml.ws.WebServiceProvider"); // NOI18N isProvider = true; } if (webServiceAnn == null) { return false; } AnnotationParser parser = AnnotationParser.create(helper); parser.expectString("serviceName", AnnotationParser.defaultValue(typeElement.getSimpleName().toString() + "Service")); // NOI18N parser.expectString("wsdlLocation", AnnotationParser.defaultValue("")); // NOI18N ParseResult parseResult = parser.parse(webServiceAnn); //NOI18N serviceName = parseResult.get("serviceName", String.class); // NOI18N wsdlLocation = parseResult.get("wsdlLocation", String.class); // NOI18N return true; }
public boolean refresh( TypeElement type ) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController(). getElements().getAllAnnotationMirrors(type)); AnnotationMirror annotationMirror = types.get( "javax.faces.component.behavior.FacesBehavior"); // NOI18N if (annotationMirror == null) { return false; } AnnotationParser parser = AnnotationParser.create(getHelper()); parser.expectString( "value", null); // NOI18N ParseResult parseResult = parser.parse(annotationMirror); myId = parseResult.get( "value" , String.class ); // NOI18N myClass = type.getQualifiedName().toString(); return true; }
@Override public List<BindingQualifier> createObjects( TypeElement type ) { final List<BindingQualifier> result = new ArrayList<BindingQualifier>(); Map<String, ? extends AnnotationMirror> annotationsByType = getHelper().getAnnotationsByType(getHelper().getCompilationController(). getElements().getAllAnnotationMirrors( type )); AnnotationMirror annotationMirror = annotationsByType.get( getAnnotationName()); if (annotationMirror != null ) { result.add( new BindingQualifier(getHelper(), type, getAnnotationName())); } if ( annotationMirror == null || !getHelper().hasAnnotation( annotationMirror. getAnnotationType().asElement(). getAnnotationMirrors(), Inherited.class.getCanonicalName())) { if ( checkSuper( type , getAnnotationName() , getHelper())!= null ){ result.add( new BindingQualifier( getHelper(), type, getAnnotationName()) ); } } return result; }
@Override public boolean refresh( TypeElement type ) { List<? extends AnnotationMirror> allAnnotationMirrors = getHelper().getCompilationController().getElements(). getAllAnnotationMirrors(type); Map<String, ? extends AnnotationMirror> annotationsByType = getHelper().getAnnotationsByType( allAnnotationMirrors ); boolean isStereotype = annotationsByType.get( StereotypeChecker.STEREOTYPE) != null ; if ( !isStereotype ){ return false; } boolean hasNamed = NamedStereotypeObjectProvider.hasNamed(type, getHelper()); return hasNamed; }
@Override public boolean refresh(TypeElement typeElement) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType( getHelper().getCompilationController().getElements().getAllAnnotationMirrors(typeElement)); AnnotationMirror annotationMirror = types.get("javax.faces.component.FacesComponent"); //NOI18N
boolean refresh( TypeElement type ) { List<? extends AnnotationMirror> allAnnotationMirrors = getHelper().getCompilationController().getElements(). getAllAnnotationMirrors(type); Map<String, ? extends AnnotationMirror> annotationsByType = getHelper().getAnnotationsByType( allAnnotationMirrors ); if ( annotationsByType.get( getAnnotationName()) != null ){ return true; } return AnnotationObjectProvider.checkSuper(type, getAnnotationName(), getHelper())!= null; }
public boolean refresh( TypeElement type ) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController(). getElements().getAllAnnotationMirrors(type)); AnnotationMirror annotationMirror = types.get( "javax.faces.convert.FacesConverter"); // NOI18N if (annotationMirror == null) { return false; } AnnotationParser parser = AnnotationParser.create(getHelper()); parser.expectString("value", AnnotationParser.defaultValue(""));// NOI18N parser.expectClass( "forClass", // NOI18N AnnotationParser.defaultValue(Object.class.getCanonicalName())); ParseResult parseResult = parser.parse(annotationMirror); myId = parseResult.get( "value" , String.class ); // NOI18N myForClass = parseResult.get( "forClass" , String.class ); // NOI18N myClass = type.getQualifiedName().toString(); return true; }
Map<String, ? extends AnnotationMirror> annByType = helper.getAnnotationsByType(typeElement.getAnnotationMirrors()); AnnotationParser parser = AnnotationParser.create(helper); parser.expectString("portName", AnnotationParser.defaultValue(typeElement.getSimpleName().toString()+"Port")); // NOI18N
public boolean refresh( TypeElement type ) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController(). getElements().getAllAnnotationMirrors( type )); AnnotationMirror annotationMirror = types.get( "javax.faces.render.FacesBehaviorRenderer"); // NOI18N if (annotationMirror == null) { return false; } AnnotationParser parser = AnnotationParser.create(getHelper()); parser.expectString("renderKitId", AnnotationParser.defaultValue("HTML_BASIC")); // NOI18N parser.expectString("rendererType", null); // NOI18N ParseResult parseResult = parser.parse(annotationMirror); myKitId = parseResult.get( "renderKitId" , String.class ); // NOI18N myType = parseResult.get( "rendererType" , String.class ); // NOI18N myClass = type.getQualifiedName().toString(); return true; }
public boolean refresh( TypeElement type ) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController() .getElements().getAllAnnotationMirrors(type)); AnnotationMirror annotationMirror = types.get( "javax.faces.event.ListenerFor"); // NOI18N if (annotationMirror == null || !ObjectProviders.SystemEventListenerProvider. isApplicationSystemEventListener(type, getHelper())) { return false; } AnnotationParser parser = AnnotationParser.create(getHelper()); parser.expectClass( "systemEventClass", null); // NOI18N parser.expectClass("sourceClass", AnnotationParser.defaultValue(// NOI18N Void.class.getCanonicalName())); ParseResult parseResult = parser.parse(annotationMirror); myEventClass = parseResult.get( "systemEventClass" , // NOI18N String.class ); mySourceClass = parseResult.get( "sourceClass" , // NOI18N String.class ); myClass = type.getQualifiedName().toString(); return true; }
public boolean refresh( TypeElement type ) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController() .getElements().getAllAnnotationMirrors( type)); AnnotationMirror annotationMirror = types.get( "javax.faces.validator.FacesValidator"); // NOI18N if (annotationMirror == null) { return false; } AnnotationParser parser = AnnotationParser.create(getHelper()); parser.expectString("value", null); // NOI18N parser.expectPrimitive( "isDefault", Boolean.class, // NOI18N AnnotationParser.defaultValue(Boolean.TRUE)); ParseResult parseResult = parser.parse(annotationMirror); myId = parseResult.get( "value" , String.class ); // NOI18N Boolean def = parseResult.get("isDefault" , // NOI18N Boolean.class); if ( def == null ){ isDefault = true; } else { isDefault = def; } myClass = type.getQualifiedName().toString(); return true; }
public boolean refresh( TypeElement type ) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController() .getElements().getAllAnnotationMirrors(type)); AnnotationMirror annotationMirror = types.get(
@Override public final boolean refresh(TypeElement type) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType( getHelper().getCompilationController().getElements().getAllAnnotationMirrors(type)); AnnotationMirror annotationMirror = getAnnotationMirror(types); if (annotationMirror == null) { return false; } AnnotationParser parser = AnnotationParser.create(getHelper()); parser.expectString("value", null); //NOI18N ParseResult parseResult = parser.parse(annotationMirror); className = ElementUtilities.getBinaryName(type); names.clear(); if (parseResult.get("value", String.class) == null) { //NOI18N names.add(getConvertedClassName(className)); } else { names.add(parseResult.get("value", String.class)); //NOI18N } refreshLocation(className); return true; }
public boolean refresh( TypeElement type ) { Map<String, ? extends AnnotationMirror> types = getHelper().getAnnotationsByType(getHelper().getCompilationController() .getElements().getAllAnnotationMirrors(type)); AnnotationMirror annotationMirror = types.get( "javax.faces.render.FacesRenderer"); // NOI18N if (annotationMirror == null) { return false; } AnnotationParser parser = AnnotationParser.create(getHelper()); parser.expectString( "renderKitId", // NOI18N AnnotationParser.defaultValue("HTML_BASIC")); // NOI18N parser.expectString("rendererType", null); // NOI18N parser.expectString("componentFamily", null); // NOI18N ParseResult parseResult = parser.parse(annotationMirror); myKitId = parseResult.get( "renderKitId" , String.class ); // NOI18N myClass = type.getQualifiedName().toString(); myType = parseResult.get( "rendererType" , String.class ); // NOI18N myComponentFamily = parseResult.get( "componentFamily" , // NOI18N String.class ); return true; }