21 | * A collection of annotation literals for all annotations from the Contexts and Dependency Injection 22 | * specification and from Solder. 23 | *
24 | */ 25 | package org.jboss.solder.literal; 26 | 27 | -------------------------------------------------------------------------------- /impl/src/main/java/org/jboss/solder/bean/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2010, Red Hat Middleware LLC, and individual contributors 4 | * by the @authors tag. See the copyright.txt in the distribution for a 5 | * full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | /** 20 | *21 | * A collection of base classes and builders for working with {@link javax.enterprise.inject.spi.Bean} metadata objects. 22 | *
23 | * 24 | * @author Pete Muir 25 | */ 26 | package org.jboss.solder.bean; 27 | 28 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/test/defaultbean/BigLaptopHardDrive.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.test.defaultbean; 18 | 19 | @LaptopHardDrive 20 | public class BigLaptopHardDrive implements HardDrive { 21 | 22 | public String size() { 23 | return "200MB"; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /impl/src/test/java/org/jboss/solder/test/util/SimpleAnnotation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.test.util; 18 | 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface SimpleAnnotation { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/config/xml/test/common/interceptor/InterceptedBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.config.xml.test.common.interceptor; 18 | 19 | @Binding 20 | public class InterceptedBean { 21 | 22 | public String method() { 23 | return "hello"; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /impl/src/main/java/org/jboss/solder/config/xml/core/VirtualProducerField.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.config.xml.core; 18 | 19 | /** 20 | * The class used to register virtual producer fields 21 | * 22 | * @author stuart 23 | */ 24 | public class VirtualProducerField { 25 | public Object field; 26 | } 27 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/test/core/InstalledService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.test.core; 18 | 19 | import org.jboss.solder.core.Requires; 20 | 21 | @Requires({"org.jboss.solder.test.core.Greyhound", "org.jboss.solder.test.core.CoreTest"}) 22 | public class InstalledService { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/config/xml/test/common/producer/Reciever.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.config.xml.test.common.producer; 18 | 19 | 20 | public class Reciever { 21 | public int val1; 22 | 23 | public int val2; 24 | 25 | public int meth1; 26 | 27 | public int meth2; 28 | } 29 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/test/unwraps/MPType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.test.unwraps; 18 | 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface MPType { 24 | String value(); 25 | } 26 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/config/xml/test/common/fieldset/MapFieldValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.config.xml.test.common.fieldset; 18 | 19 | import java.util.Map; 20 | 21 | public class MapFieldValue { 22 | public Map21 | * Provides stateless producer methods where each method invocation on the produced object will cause the annotated 22 | * method to be invoked to produce the object. 23 | *
24 | * 25 | * @author Pete Muir 26 | * 27 | * @see org.jboss.solder.unwraps.Unwraps 28 | */ 29 | package org.jboss.solder.unwraps; 30 | 31 | -------------------------------------------------------------------------------- /testsuite/src/test/resources/org/jboss/solder/config/xml/test/common/simple/empty-root-namespace-beans.xml: -------------------------------------------------------------------------------- 1 | 2 |21 | * A collection of base classes and builders for working with {@link javax.enterprise.inject.spi.AnnotatedType} 22 | * metadata objects. 23 | *
24 | * 25 | * @author Pete Muir 26 | * 27 | * @see org.jboss.solder.reflection.annotated.AnnotatedTypeBuilder 28 | */ 29 | package org.jboss.solder.reflection.annotated; 30 | 31 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/config/xml/test/common/producer/ProducerQualifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.config.xml.test.common.producer; 18 | 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | 22 | import javax.inject.Qualifier; 23 | 24 | @Retention(RetentionPolicy.RUNTIME) 25 | @Qualifier 26 | public @interface ProducerQualifier { 27 | int value(); 28 | } 29 | -------------------------------------------------------------------------------- /impl/src/main/java/org/jboss/solder/config/xml/parser/namespace/InvalidElementException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.config.xml.parser.namespace; 18 | 19 | /** 20 | * Exception thrown when both a method and a field have the same name 21 | */ 22 | public class InvalidElementException extends Exception { 23 | public InvalidElementException(String message) { 24 | super(message); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/test/bean/generic/tooManyGenericConfigurations/Bar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.test.bean.generic.tooManyGenericConfigurations; 18 | 19 | import org.jboss.solder.bean.generic.GenericConfiguration; 20 | 21 | /** 22 | * A generic bean for the config annotation Message 23 | * 24 | * @author pmuir 25 | */ 26 | 27 | @GenericConfiguration(Message.class) 28 | public class Bar { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /api/src/main/java/org/jboss/solder/literal/InjectLiteral.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.literal; 18 | 19 | import javax.enterprise.util.AnnotationLiteral; 20 | import javax.inject.Inject; 21 | 22 | 23 | public class InjectLiteral extends AnnotationLiteral21 | * A set of utility classes for working with JavaBean properties, allowing properties backed 22 | * by getter/setter methods or fields to be treated identically. 23 | *
24 | * 25 | * @author Pete Muir 26 | * 27 | * @see org.jboss.solder.properties.Property 28 | * @see org.jboss.solder.properties.Properties 29 | */ 30 | package org.jboss.solder.properties; 31 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/config/xml/test/common/constructor/ConstructedBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.config.xml.test.common.constructor; 18 | 19 | public class ConstructedBean { 20 | public ConstructedBean(int val) { 21 | this.value = val; 22 | } 23 | 24 | public ConstructedBean() { 25 | 26 | } 27 | 28 | int value; 29 | 30 | public int getValue() { 31 | return value; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /testsuite/src/test/java/org/jboss/solder/test/logging/Sparrow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.test.logging; 18 | 19 | import javax.inject.Inject; 20 | 21 | import org.jboss.solder.logging.Logger; 22 | 23 | 24 | class Sparrow { 25 | @Inject 26 | private Logger log; 27 | 28 | public void generateLogMessage() { 29 | log.info("Sparrow"); 30 | } 31 | 32 | public Logger getLogger() { 33 | return log; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /api/src/main/java/org/jboss/solder/literal/DefaultLiteral.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.jboss.solder.literal; 18 | 19 | import javax.enterprise.inject.Default; 20 | import javax.enterprise.util.AnnotationLiteral; 21 | 22 | 23 | public class DefaultLiteral extends AnnotationLiteral