repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/maven-plugin-tools
1,128
maven-plugin-plugin/src/it/mplugin-299_no-configuration/src/main/java/test/MyMojo.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package test; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; @Mojo(name = "test") public class MyMojo extends AbstractMojo { @Parameter private String empyAnnotatedParameter; public void execute() {} }
apache/maven-plugins
1,131
maven-checkstyle-plugin/src/it/MCHECKSTYLE-253-jdk8/src/main/java/org/MyClass.java
package org; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import java.lang.String; import java.util.ArrayList; import java.util.stream.Stream; public class MyClass { public List<String> collection () { final ArrayList<String> result = new ArrayList<>(); Stream.of( "a", "b", "c" ).forEach( s -> result.add( s ) ); return result; } }
apache/maven
1,139
its/core-it-suite/src/test/resources/mng-3259/module4/src/main/java/mng/Module4Home.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package mng; /** * Home interface for Module4. */ public interface Module4Home extends javax.ejb.EJBHome { public static final String COMP_NAME = "java:comp/env/ejb/Module4"; public static final String JNDI_NAME = "mng/Module4"; public Module4 create() throws javax.ejb.CreateException, java.rmi.RemoteException; }
apache/myfaces
1,161
api/src/main/java/jakarta/faces/view/StateManagementStrategy.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package jakarta.faces.view; import jakarta.faces.component.UIViewRoot; import jakarta.faces.context.FacesContext; /** * @since 2.0 */ public abstract class StateManagementStrategy { public abstract UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId); public abstract Object saveView(FacesContext context); }
apache/nifi-registry
1,100
nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/extension/bundle/BundleTypeValues.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.registry.extension.bundle; public class BundleTypeValues { public static final String NIFI_NAR_VALUE = "nifi-nar"; public static final String MINIFI_CPP_VALUE = "minifi-cpp"; public static final String ALL_VALUES = NIFI_NAR_VALUE + ", " + MINIFI_CPP_VALUE; }
apache/nifi
1,065
nifi-extension-bundles/nifi-standard-services/nifi-database-dialect-service-api/src/main/java/org/apache/nifi/database/dialect/service/api/StandardStatementResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.database.dialect.service.api; /** * Standard implementation of Statement Response with required properties * * @param sql SQL Statement */ public record StandardStatementResponse( String sql ) implements StatementResponse { }
apache/nifi
1,089
nifi-extension-bundles/nifi-py4j-extension-bundle/nifi-py4j-bridge/src/main/java/org/apache/nifi/python/processor/FlowFileTransformResult.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.python.processor; import org.apache.nifi.python.PythonObjectProxy; import java.util.Map; public interface FlowFileTransformResult extends PythonObjectProxy { String getRelationship(); byte[] getContents(); Map<String, String> getAttributes(); }
apache/nifi
1,096
nifi-extension-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/services/slack/SlackRestServiceException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.services.slack; class SlackRestServiceException extends Exception { SlackRestServiceException(final String message) { super(message); } SlackRestServiceException(final String message, final Throwable cause) { super(message, cause); } }
apache/nutch
1,182
src/java/org/apache/nutch/indexer/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Index content, configure and run indexing and cleaning jobs to * add, update, and delete documents from an index. Two tasks are * delegated to plugins: * <ul> * <li>indexing filters, which fill index fields of each document</li> * <li>index writer plugins; which send documents to index back-ends (Solr, etc.).</li> * </ul> */ package org.apache.nutch.indexer;
apache/openjpa
1,120
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.inheritance.entity; import jakarta.persistence.Entity; import jakarta.persistence.Id; /** * This class has the same name as {@link * org.apache.openjpa.persistence.inheritance.embeddable.SharedName2} */ @Entity public class SharedName2 { @Id private long id; }
apache/openwebbeans
1,126
webbeans-impl/src/test/java/org/apache/webbeans/test/injection/generics/zoo/Stable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.injection.generics.zoo; import jakarta.enterprise.inject.Typed; /** * A stable for horses, pigs, etc */ @Typed public class Stable<PET> { private PET pet; public PET getPet() { return pet; } public void setPet(PET pet) { this.pet = pet; } }
apache/pekko-http
1,143
http-core/src/main/java/org/apache/pekko/http/javadsl/model/headers/ContentRange.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: * * https://www.apache.org/licenses/LICENSE-2.0 * * This file is part of the Apache Pekko project, which was derived from Akka. */ /* * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com> */ package org.apache.pekko.http.javadsl.model.headers; /** * Model for the `Content-Range` header. Specification: * http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-26#section-4.2 */ public abstract class ContentRange extends org.apache.pekko.http.scaladsl.model.HttpHeader { public abstract RangeUnit rangeUnit(); public abstract org.apache.pekko.http.javadsl.model.ContentRange contentRange(); public static ContentRange create( RangeUnit rangeUnit, org.apache.pekko.http.javadsl.model.ContentRange contentRange) { return new org.apache.pekko.http.scaladsl.model.headers.Content$minusRange( ((org.apache.pekko.http.scaladsl.model.headers.RangeUnit) rangeUnit), ((org.apache.pekko.http.scaladsl.model.ContentRange) contentRange)); } }
apache/pinot
1,091
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/logicaltable/LogicalTableWithOneRealtimeTableIntegrationTest.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pinot.integration.tests.logicaltable; import java.util.List; public class LogicalTableWithOneRealtimeTableIntegrationTest extends BaseLogicalTableIntegrationTest { @Override protected List<String> getRealtimeTableNames() { return List.of("r_1"); } }
apache/pinot
1,127
pinot-controller/src/main/java/org/apache/pinot/controller/api/exception/UserAlreadyExistsException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pinot.controller.api.exception; public class UserAlreadyExistsException extends RuntimeException { public UserAlreadyExistsException(String message) { super(message); } public UserAlreadyExistsException(String message, Throwable cause) { super(message, cause); } }
apache/polygene-java
1,137
core/api/src/main/java/org/apache/polygene/api/query/grammar/PropertyReference.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.api.query.grammar; import java.util.function.Function; import org.apache.polygene.api.composite.Composite; import org.apache.polygene.api.property.Property; /** * Property Reference. */ public interface PropertyReference { <T> Function<Composite, Property<T>> reference(); }
apache/polygene-java
1,149
core/spi/src/main/java/org/apache/polygene/spi/type/ValueTypeFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.spi.type; import org.apache.polygene.api.structure.ModuleDescriptor; import org.apache.polygene.api.type.ValueType; public interface ValueTypeFactory { ValueType valueTypeOf( ModuleDescriptor module, Object object ); ValueType valueTypeOf( ModuleDescriptor module, Class<?> type ); }
apache/pulsar
1,126
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/state/DefaultStateStore.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.functions.instance.state; import org.apache.pulsar.functions.api.state.ByteBufferStateStore; import org.apache.pulsar.functions.api.state.CounterStateStore; /** * The default state store interface. */ public interface DefaultStateStore extends ByteBufferStateStore, CounterStateStore { }
apache/pulsar
1,130
pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/EntryFilters.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.common.policies.data; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class EntryFilters { /** * Entry filters class names separated by a comma. */ private String entryFilterNames; }
apache/qpid-jms
1,140
qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderSynchronization.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.qpid.jms.provider; /** * Synchronization callback interface used to execute state updates * or similar tasks in the thread context where the associated * ProviderFuture is managed. */ public interface ProviderSynchronization { void onPendingSuccess(); void onPendingFailure(ProviderException cause); }
apache/ranger
1,146
authz-api/src/main/java/org/apache/ranger/authz/api/RangerAuthzErrorCode.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ranger.authz.api; import java.text.MessageFormat; public interface RangerAuthzErrorCode { int getHttpStatusCode(); String getCode(); String getMessage(); default String getFormattedMessage(Object... params) { return new MessageFormat(getCode() + ": " + getMessage()).format(params); } }
apache/ratis
1,140
ratis-test/src/test/java/org/apache/ratis/grpc/cli/TestElectionCommandIntegrationWithGrpc.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ratis.grpc.cli; import org.apache.ratis.grpc.MiniRaftClusterWithGrpc; import org.apache.ratis.shell.cli.sh.ElectionCommandIntegrationTest; public class TestElectionCommandIntegrationWithGrpc extends ElectionCommandIntegrationTest<MiniRaftClusterWithGrpc> implements MiniRaftClusterWithGrpc.FactoryGet{ }
apache/ratis
1,140
ratis-test/src/test/java/org/apache/ratis/grpc/cli/TestSnapshotCommandIntegrationWithGrpc.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ratis.grpc.cli; import org.apache.ratis.grpc.MiniRaftClusterWithGrpc; import org.apache.ratis.shell.cli.sh.SnapshotCommandIntegrationTest; public class TestSnapshotCommandIntegrationWithGrpc extends SnapshotCommandIntegrationTest<MiniRaftClusterWithGrpc> implements MiniRaftClusterWithGrpc.FactoryGet{ }
apache/rocketmq-mqtt
1,142
mqtt-common/src/main/java/org/apache/rocketmq/mqtt/common/facade/WillMsgSender.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.mqtt.common.facade; import io.netty.handler.codec.mqtt.MqttPublishMessage; import org.apache.rocketmq.mqtt.common.model.StoreResult; import java.util.concurrent.CompletableFuture; public interface WillMsgSender { CompletableFuture<StoreResult> sendWillMsg(String clientId, MqttPublishMessage message); }
apache/rocketmq
1,156
remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientHook.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.remoting.rpc; public abstract class RpcClientHook { //if the return is not null, return it public abstract RpcResponse beforeRequest(RpcRequest rpcRequest) throws RpcException; //if the return is not null, return it public abstract RpcResponse afterResponse(RpcResponse rpcResponse) throws RpcException; }
apache/seatunnel-web
1,111
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/job/TableSchemaRes.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.app.domain.response.job; import org.apache.seatunnel.datasource.plugin.api.model.TableField; import lombok.Data; import lombok.RequiredArgsConstructor; import java.util.List; @Data @RequiredArgsConstructor public class TableSchemaRes { private List<TableField> fields; }
apache/seatunnel
1,099
seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryLogsConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.engine.common.config.server; import lombok.Data; import java.io.Serializable; @Data public class TelemetryLogsConfig implements Serializable { private boolean enabled = ServerConfigOptions.TELEMETRY_LOGS_SCHEDULED_DELETION_ENABLE.defaultValue(); }
apache/seatunnel
1,108
seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/ContainerExtendedFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.e2e.common.container; import org.testcontainers.containers.GenericContainer; import java.io.IOException; @FunctionalInterface public interface ContainerExtendedFactory { void extend(GenericContainer<?> engineMasterContainer) throws IOException, InterruptedException; }
apache/servicecomb-java-chassis
1,081
transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/GlobalRestFailureHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.transport.rest.vertx; import org.apache.servicecomb.foundation.common.utils.SPIOrder; import io.vertx.core.Handler; import io.vertx.ext.web.RoutingContext; public interface GlobalRestFailureHandler extends Handler<RoutingContext>, SPIOrder { }
apache/servicecomb-java-chassis
1,090
swagger/swagger-generator/generator-core/src/test/java/org/apache/servicecomb/swagger/generator/core/schema/ArrayType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.swagger.generator.core.schema; import org.apache.servicecomb.foundation.test.scaffolding.model.User; public class ArrayType { public byte[] testBytes(byte[] value) { return null; } public User[] testUsers(User[] value) { return null; } }
apache/servicecomb-java-chassis
1,095
demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/third/HeartBeatService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.demo.springmvc.third; import org.apache.servicecomb.provider.rest.common.RestSchema; @RestSchema(schemaId = "health", schemaInterface = HealthSchema.class) public class HeartBeatService implements HealthSchema { @Override public void heartbeat() { } }
apache/servicecomb-java-chassis
1,121
demo/demo-consul/provider/src/main/java/org/apache/servicecomb/samples/User.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.samples; public class User { private Long id; private String name; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
apache/servicecomb-java-chassis
1,122
demo/demo-etcd/consumer/src/main/java/org/apache/servicecomb/samples/User.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.samples; public class User { private Long id; private String name; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
apache/servicecomb-pack
1,105
acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/java/org/apache/servicecomb/pack/RunCucumberIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.pack; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(plugin = {"pretty", "html:target/cucumber"}, features = "src/test/resources") public class RunCucumberIT { }
apache/shardingsphere
1,091
kernel/authority/distsql/statement/src/main/java/org/apache/shardingsphere/authority/distsql/statement/ShowAuthorityRuleStatement.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.authority.distsql.statement; import org.apache.shardingsphere.distsql.statement.type.rql.rule.global.ShowGlobalRulesStatement; /** * Show authority rule statement. */ public final class ShowAuthorityRuleStatement extends ShowGlobalRulesStatement { }
apache/shardingsphere
1,116
jdbc/src/main/java/org/apache/shardingsphere/driver/executor/callback/keygen/GeneratedKeyCallback.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.driver.executor.callback.keygen; import java.sql.SQLException; /** * Generated key callback. */ public interface GeneratedKeyCallback { /** * generate keys. * * @throws SQLException SQL exception */ void generateKeys() throws SQLException; }
apache/shenyu
1,154
shenyu-spi/src/main/java/org/apache/shenyu/spi/ExtensionFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.spi; /** * The interface Extension factory. */ @SPI("spi") public interface ExtensionFactory { /** * Gets Extension. * * @param <T> the type parameter * @param key the key * @param clazz the clazz * @return the extension */ <T> T getExtension(String key, Class<T> clazz); }
apache/sis
1,150
endorsed/src/org.apache.sis.util/main/org/apache/sis/util/internal/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * A set of helper classes for the {@code org.apache.sis.util} module. * * <STRONG>Do not use!</STRONG> * * This package is for internal use by SIS only. Classes in this package * may change in incompatible ways in any future version without notice. * * @author Martin Desruisseaux (Geomatys) */ package org.apache.sis.util.internal;
apache/sis
1,170
incubator/src/org.apache.sis.storage.gsf/main/module-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * LibGSF Panama binding. * * @author Johann Sorel (Geomatys) */ module org.apache.sis.storage.gsf { // Dependencies used in public API. requires transitive org.apache.sis.referencing; requires transitive org.apache.sis.storage; provides org.apache.sis.storage.DataStoreProvider with org.apache.sis.storage.gsf.GSFStoreProvider; }
apache/skywalking-java
1,082
test/plugin/scenarios/vertx-eventbus-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxeventbus/util/CustomMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.testcase.vertxeventbus.util; public class CustomMessage { private final String message; public CustomMessage(String message) { this.message = message; } public String getMessage() { return message; } }
apache/skywalking
1,128
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/remote/Serializable.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.remote; import org.apache.skywalking.oap.server.core.remote.grpc.proto.RemoteData; /** * Covert the interface implementation to {@link RemoteData.Builder}, in order to send the data through network. */ public interface Serializable { RemoteData.Builder serialize(); }
apache/sling-org-apache-sling-app-cms
1,094
archetype/src/main/resources/archetype-resources/src/main/java/__packageInPathFormat__/HelloWorldModel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ${package}; import org.apache.sling.api.resource.Resource; import org.apache.sling.models.annotations.Model; /** * Service for greeting the world */ @Model(adaptables={Resource.class}) public class HelloWorldModel { public String getMessage(){ return "Hello World!"; } }
apache/solr
1,139
solr/test-framework/src/java/org/apache/solr/search/similarities/CustomSimilarityFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.search.similarities; import org.apache.lucene.search.similarities.Similarity; import org.apache.solr.schema.SimilarityFactory; public class CustomSimilarityFactory extends SimilarityFactory { @Override public Similarity getSimilarity() { return new MockConfigurableSimilarity(params.get("echo")); } }
apache/solr
1,168
solr/core/src/java/org/apache/solr/handler/NestedRequestHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.handler; import org.apache.solr.request.SolrRequestHandler; /** An interface for RequestHandlers need to handle all paths under its registered path */ public interface NestedRequestHandler { /** Return a RequestHandler to handle a subpath from the path this handler is registered. */ SolrRequestHandler getSubHandler(String subPath); }
apache/stanbol
1,110
reasoners/servicesapi/src/main/java/org/apache/stanbol/reasoners/servicesapi/UnboundReasoningServiceException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.stanbol.reasoners.servicesapi; /** * To be thrown when a missing reasoning service is requested * * @author enridaga * */ public class UnboundReasoningServiceException extends Exception { /** * */ private static final long serialVersionUID = -6670383378475916819L; }
apache/streampipes
1,115
streampipes-model/src/main/java/org/apache/streampipes/model/extensions/svcdiscovery/SpServiceTagPrefix.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.model.extensions.svcdiscovery; public enum SpServiceTagPrefix { SP_GROUP, CUSTOM, // Is used for user-defined service tags provided via Envs.SP_SERVICE_TAGS ADAPTER, DATA_STREAM, DATA_PROCESSOR, DATA_SINK; public String asString() { return this.name(); } }
apache/streampipes
1,130
streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/util/DirectoryManager.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.smp.util; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class DirectoryManager { public static void createIfNotExists(Path directory) throws IOException { if (!Files.exists(directory)) { Files.createDirectories(directory); } } }
apache/struts-examples
1,142
crud/src/main/java/org/apache/struts/crud/model/Country.java
package org.apache.struts.crud.model; /** * Model a country. * * @author bruce phillips * @author antonio sánchez */ public class Country { private String countryId; private String countryName; public Country(String countryId, String countryName) { setCountryId(countryId); setCountryName(countryName); } public void setCountryId(String countryId) { if (countryId == null) throw new IllegalArgumentException("Country ID must be non-null."); this.countryId = countryId; } public String getCountryId() { return countryId; } public void setCountryName(String countryName) { this.countryName = countryName; } public String getCountryName() { return countryName; } @Override public String toString() { return getCountryId(); } @Override public boolean equals(Object o) { return (o!=null) && (o instanceof Country) && (((Country) o).getCountryId() != null) && (countryId.equals(((Country) o).getCountryId())); } }
apache/tajo
1,158
tajo-client/src/main/java/org/apache/tajo/client/v2/QueryState.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.client.v2; public enum QueryState { /** successfully submitted */ SCHEDULED, /** Running */ RUNNING, /** Error before a query execution */ ERROR, /** Failure after a query launches */ FAILED, /** Killed */ KILLED, /** Wait for completely kill */ KILLING, /** Successfully completed */ COMPLETED }
apache/tapestry-5
1,118
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/PublicFieldAccessDemo.java
// Copyright 2010 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.integration.app1.data.ResourcesHolder; import org.apache.tapestry5.ioc.annotations.Inject; public class PublicFieldAccessDemo { @Inject private ComponentResources resources; private ResourcesHolder holder; void setupRender() { holder = new ResourcesHolder("success"); } public String getMessage() { return holder.resources; } }
apache/tomee
1,078
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/producer/AssemblyLine.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.arquillian.tests.cdi.producer; import jakarta.enterprise.inject.Produces; /** * @version $Rev$ $Date$ */ public class AssemblyLine { @Produces public Car createFancyCar() { return new Car("Lexus", "IS 350", 2011); } }
apache/tomee
1,088
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestHome.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.arquillian.tests.bmp.local; import java.rmi.RemoteException; import jakarta.ejb.CreateException; import jakarta.ejb.EJBLocalHome; public interface FinderTestHome extends EJBLocalHome { FinderTest create() throws CreateException, RemoteException; }
apache/tomee
1,139
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/WebAppBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.assembler.classic; import java.util.Map; import java.util.Set; public interface WebAppBuilder { void deployWebApps(AppInfo appInfo, ClassLoader classLoader) throws Exception; void undeployWebApps(AppInfo appInfo) throws Exception; Map<ClassLoader, Map<String, Set<String>>> getJsfClasses(); }
apache/trafodion
1,126
core/conn/trafci/src/main/java/org/trafodion/ci/DuplicateParamException.java
// @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // @@@ END COPYRIGHT @@@ package org.trafodion.ci; public class DuplicateParamException extends Exception { /** * */ private static final long serialVersionUID = -3661178727942088670L; DuplicateParamException() { } DuplicateParamException(String msg) { super(msg); } }
apache/xmlgraphics-fop
1,145
fop-core/src/main/java/org/apache/fop/accessibility/StructureTreeElement.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id$ */ package org.apache.fop.accessibility; /** * An object that represents the structure of the document in the output format. * In PDF, an implementation of this interface will typically result into the * creation of a structure element dictionary (a dictionary of type StructElem). */ public interface StructureTreeElement { }
apache/xmlgraphics-fop
1,155
fop-core/src/main/java/org/apache/fop/area/inline/Anchor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id$ */ package org.apache.fop.area.inline; /** * Anchor area for footnote or float. * Not sure if this is needed. */ public class Anchor extends InlineArea { private static final long serialVersionUID = 5227798744787823499L; // has a keep with adjacent area // has reference to associated footnote or float out-of-line area }
apache/zeppelin
1,141
zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/TextBox.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zeppelin.display.ui; import org.apache.zeppelin.display.Input; /** * Html TextBox control */ public class TextBox extends Input<String> { public TextBox() { } public TextBox(String name, String defaultValue) { this.name = name; this.displayName = name; this.defaultValue = defaultValue; } }
google/j2cl
1,138
junit/generator/javatests/com/google/j2cl/junit/integration/testing/async/Thenable.java
/* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.junit.integration.testing.async; import jsinterop.annotations.JsFunction; import jsinterop.annotations.JsType; /** A Thenable contract for testing purposes. */ @JsType public interface Thenable { // We are defining two different callback types here so that we can reproduce b/32406287 @JsFunction interface FullFilledCallback { void execute(Object o); } @JsFunction interface RejectedCallback { void execute(Object o); } void then(FullFilledCallback onFulfilled, RejectedCallback onRejected); }
google/nomulus
1,135
core/src/main/java/google/registry/model/domain/fee11/FeeCreateResponseExtensionV11.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.model.domain.fee11; import google.registry.model.domain.fee.FeeTransformResponseExtension; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; /** * An XML data object that represents a fee extension that may be present on the response to EPP * domain create commands. */ @XmlRootElement(name = "creData") @XmlType(propOrder = {"currency", "fees", "credits"}) public class FeeCreateResponseExtensionV11 extends FeeTransformResponseExtension {}
google/nomulus
1,135
core/src/main/java/google/registry/model/domain/fee11/FeeUpdateResponseExtensionV11.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.model.domain.fee11; import google.registry.model.domain.fee.FeeTransformResponseExtension; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; /** * An XML data object that represents a fee extension that may be present on the response to EPP * domain update commands. */ @XmlRootElement(name = "updData") @XmlType(propOrder = {"currency", "fees", "credits"}) public class FeeUpdateResponseExtensionV11 extends FeeTransformResponseExtension {}
google/nomulus
1,135
core/src/main/java/google/registry/model/domain/fee12/FeeCreateResponseExtensionV12.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.model.domain.fee12; import google.registry.model.domain.fee.FeeTransformResponseExtension; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; /** * An XML data object that represents a fee extension that may be present on the response to EPP * domain create commands. */ @XmlRootElement(name = "creData") @XmlType(propOrder = {"currency", "fees", "credits"}) public class FeeCreateResponseExtensionV12 extends FeeTransformResponseExtension {}
google/nomulus
1,135
core/src/main/java/google/registry/model/domain/fee12/FeeUpdateResponseExtensionV12.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.model.domain.fee12; import google.registry.model.domain.fee.FeeTransformResponseExtension; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; /** * An XML data object that represents a fee extension that may be present on the response to EPP * domain update commands. */ @XmlRootElement(name = "updData") @XmlType(propOrder = {"currency", "fees", "credits"}) public class FeeUpdateResponseExtensionV12 extends FeeTransformResponseExtension {}
google/tsunami-security-scanner-plugins
1,033
google/detectors/credentials/cve20177615/src/main/java/com/google/tsunami/plugins/detectors/credentials/cve20177615/MantisBTAuthenticationBypassDetectorBootstrapModule.java
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.tsunami.plugins.detectors.credentials.cve20177615; import com.google.tsunami.plugin.PluginBootstrapModule; /** A Guice module that bootstraps the {@link MantisBTAuthenticationBypassDetector}. */ public final class MantisBTAuthenticationBypassDetectorBootstrapModule extends PluginBootstrapModule { @Override protected void configurePlugin() { registerPlugin(MantisBTAuthenticationBypassDetector.class); } }
google/tsunami-security-scanner
1,114
plugin/src/main/java/com/google/tsunami/plugin/testing/FakeRemoteVulnDetectorBootstrapModule.java
/* * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.tsunami.plugin.testing; import com.google.tsunami.plugin.PluginBootstrapModule; /** * Bootstrapping module for {@link FakeRemoteVulnDetector}. Use this if there is need for only one * fake RemoteVulnDetector, otherwise prefer making a fake RemoteVulnDetectorLoadingModule to load * multiple instances. */ public final class FakeRemoteVulnDetectorBootstrapModule extends PluginBootstrapModule { @Override protected void configurePlugin() { registerPlugin(FakeRemoteVulnDetector.class); } }
googleapis/discovery-artifact-manager
1,120
toolkit/src/main/java/com/google/api/codegen/discogapic/DiscoGapicProviderFactory.java
/* Copyright 2017 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.codegen.discogapic; import com.google.api.codegen.config.GapicProductConfig; import com.google.api.codegen.config.PackageMetadataConfig; import com.google.api.codegen.discovery.Document; import com.google.api.codegen.gapic.GapicGeneratorConfig; import java.util.List; public interface DiscoGapicProviderFactory { List<DiscoGapicProvider> create( Document document, GapicProductConfig productConfig, GapicGeneratorConfig generatorConfig, PackageMetadataConfig packageConfig); }
googleapis/google-cloud-java
1,047
java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/IngestConversationsResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contactcenterinsights.v1; public interface IngestConversationsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.IngestConversationsResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,062
java-marketingplatformadminapi/proto-admin-v1alpha/src/main/java/com/google/ads/marketingplatform/admin/v1alpha/SetPropertyServiceLevelResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto // Protobuf Java Version: 3.25.8 package com.google.ads.marketingplatform.admin.v1alpha; public interface SetPropertyServiceLevelResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse) com.google.protobuf.MessageOrBuilder {}
googlearchive/gwt-google-apis
1,123
ajaxloader/ajaxloader/src/com/google/gwt/ajaxloader/client/AjaxKeyConstants.java
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.ajaxloader.client; import com.google.gwt.i18n.client.Constants; import java.util.Map; /** * For retrieving host:port/key pairs from a file. */ public interface AjaxKeyConstants extends Constants { @DefaultStringMapValue({ "localhost:8080", "ABQIAAAAG8LzhtshQCjpSshU_uJjmxTwM0brOpm-All5BF6PoaKBxRWWERTZER2lJ4GnsG8nvhKLOQ20degaEQ", "127.0.0.1:8080", "ABQIAAAAG8LzhtshQCjpSshU_uJjmxTBfUk9TZrBRaIteybtnU2KziHEpRQvhPNTjo7DMczjrRD3yBPRJ_BSQQ"}) Map<String, String> ajaxKeys(); }
googlearchive/gwt-google-apis
1,127
gadgets/gadgets/src/com/google/gwt/gadgets/client/AdsUserPreferences.java
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.gadgets.client; import com.google.gwt.gadgets.client.UserPreferences.PreferenceAttributes.Options; /** * UserPreferences required for a Gadget Ads. */ public interface AdsUserPreferences extends UserPreferences { @PreferenceAttributes(display_name = "clickurl", // default_value = "", // options = Options.HIDDEN) StringPreference clickurl(); @PreferenceAttributes(display_name = "aiturl", // default_value = "", // options = Options.HIDDEN) StringPreference aiturl(); }
googlearchive/gwt-google-apis
1,130
gears/gears/src/com/google/gwt/gears/client/httprequest/ProgressEvent.java
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.gears.client.httprequest; import com.google.gwt.core.client.JavaScriptObject; /** * Encapsulates the information associated with an upload in progress. */ public final class ProgressEvent extends JavaScriptObject { protected ProgressEvent() { // Required for overlay types } public native int getLoaded()/*-{ return this.loaded; }-*/; public native int getTotal()/*-{ return this.total; }-*/; public native int isLengthComputable()/*-{ return this.lengthComputable; }-*/; }
googlearchive/gwt-google-apis
1,144
search/search/src/com/google/gwt/search/jsio/client/Global.java
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.search.jsio.client; import com.google.gwt.search.jsio.client.impl.MetaDataName; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Target; /** * This annotation is used on a JSWrapper class in a manner similar to * {@link Constructor} although the value is interpreted as a value reference * rather than a function. */ @Documented @MetaDataName("gwt.global") @Target(value = {ElementType.METHOD, ElementType.TYPE}) public @interface Global { String value(); }
googlearchive/science-journal
1,069
OpenScienceJournal/whistlepunk_library/src/robolectricTest/java/com/google/android/apps/forscience/whistlepunk/devicemanager/TestFlag.java
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.apps.forscience.whistlepunk.devicemanager; import static org.junit.Assert.assertTrue; /** Little utility class for when you want to be sure a callback was called. */ public class TestFlag { private boolean set = false; private String title; public TestFlag(String title) { this.title = title; } public void set() { set = true; } public void assertSet() { assertTrue(title, set); } }
hibernate/hibernate-ogm
1,074
infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/dialect/impl/InfinispanTupleSnapshot.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.infinispan.dialect.impl; import java.util.Set; import org.hibernate.ogm.model.spi.TupleSnapshot; import org.infinispan.atomic.FineGrainedAtomicMap; /** * @author Emmanuel Bernard &lt;emmanuel@hibernate.org&gt; */ public final class InfinispanTupleSnapshot implements TupleSnapshot { private final FineGrainedAtomicMap<String, Object> atomicMap; public InfinispanTupleSnapshot(FineGrainedAtomicMap<String,Object> atomicMap) { this.atomicMap = atomicMap; } @Override public Object get(String column) { return atomicMap.get( column ); } @Override public boolean isEmpty() { return atomicMap.isEmpty(); } @Override public Set<String> getColumnNames() { return atomicMap.keySet(); } public FineGrainedAtomicMap<String, Object> getAtomicMap() { return atomicMap; } }
hibernate/hibernate-orm
1,056
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/classification/set/EntityWithSet.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.collections.classification.set; /** * @author Steve Ebersole */ import java.util.Set; import org.hibernate.orm.test.mapping.collections.classification.Name; import jakarta.persistence.Basic; import jakarta.persistence.ElementCollection; import jakarta.persistence.Entity; import jakarta.persistence.Id; //tag::collections-set-ex[] @Entity public class EntityWithSet { // ... //end::collections-set-ex[] @Id private Integer id; @Basic private String name; //tag::collections-set-ex[] @ElementCollection private Set<Name> names; //end::collections-set-ex[] private EntityWithSet() { // for Hibernate use } public EntityWithSet(Integer id, String name) { this.id = id; this.name = name; } public Integer getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } //tag::collections-set-ex[] } //end::collections-set-ex[]
hibernate/hibernate-orm
1,076
hibernate-core/src/test/java/org/hibernate/orm/test/locking/B.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.locking; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; import org.hibernate.annotations.GenericGenerator; @Entity @Table(name = "T_LOCK_B") public class B { private Long id; private A a; private String value; public B() { } public B(String value) { this.value = value; } @Id @GeneratedValue(generator = "increment") @GenericGenerator(name = "increment", strategy = "increment") public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name = "b_value") public String getValue() { return value; } public void setValue(String value) { this.value = value; } @OneToOne @JoinColumn(name = "a_id") public A getA() { return a; } public void setA(A a) { this.a = a; } }
hibernate/hibernate-orm
1,130
hibernate-core/src/main/java/org/hibernate/sql/ast/spi/ParameterMarkerStrategy.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.sql.ast.spi; import org.hibernate.service.Service; import org.hibernate.type.descriptor.jdbc.JdbcType; /** * Strategy for generating parameter markers used in {@linkplain java.sql.PreparedStatement preparable} SQL strings. * <p/> * Generally Hibernate will use the JDBC standard marker - {@code ?}. Many JDBC drivers support the * use of the "native" marker syntax of the underlying database - e.g. {@code $n}, {@code ?n}, ... * * @implNote Originally developed as an extension point for use from Hibernate Reactive * for Vert.X PostgreSQL drivers which only support the native {@code $n} syntax. * * @see org.hibernate.cfg.AvailableSettings#DIALECT_NATIVE_PARAM_MARKERS * * @author Steve Ebersole */ public interface ParameterMarkerStrategy extends Service { /** * Create a parameter marker * * @param position The 1-based position of the parameter. * @param jdbcType The type of the parameter, if known - may be {@code null}. */ String createMarker(int position, JdbcType jdbcType); }
hibernate/hibernate-search
1,062
documentation/src/test/java/org/hibernate/search/documentation/backend/elasticsearch/type/asnative/CompanyServer.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.documentation.backend.elasticsearch.type.asnative; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.ValueBinderRef; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.NonStandardField; // tag::include[] @Entity @Indexed public class CompanyServer { @Id @GeneratedValue private Integer id; @NonStandardField( // <1> valueBinder = @ValueBinderRef(type = IpAddressValueBinder.class) // <2> ) private String ipAddress; // Getters and setters // ... // tag::getters-setters[] public Integer getId() { return id; } public String getIpAddress() { return ipAddress; } public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; } // end::getters-setters[] } // end::include[]
hibernate/hibernate-search
1,073
mapper/orm-jakarta-batch/core/src/main/java/org/hibernate/search/jakarta/batch/core/massindexing/step/impl/ProgressCollector.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.jakarta.batch.core.massindexing.step.impl; import java.io.Serializable; import jakarta.batch.api.partition.PartitionCollector; import jakarta.batch.runtime.context.StepContext; import jakarta.inject.Inject; /** * Progress collectors run on the partitioned step threads and there's one collector per partition. They collect the * partition progress and send it to the partition analyzer. * * @author Mincong Huang */ public class ProgressCollector implements PartitionCollector { @Inject private StepContext stepContext; /** * The collectPartitionData method receives control periodically during partition processing. This method receives * control on each thread processing a partition as lucene document production, once at the end of the process. */ @Override public Serializable collectPartitionData() throws Exception { return ( (PartitionContextData) stepContext.getTransientUserData() ) .getPartitionProgress(); } }
hibernate/hibernate-search
1,085
mapper/orm/src/main/java/org/hibernate/search/mapper/orm/mapping/impl/AutomaticIndexingStrategyStartContextImpl.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.orm.mapping.impl; import org.hibernate.search.engine.cfg.ConfigurationPropertySource; import org.hibernate.search.engine.environment.bean.BeanResolver; import org.hibernate.search.engine.mapper.mapping.spi.MappingStartContext; import org.hibernate.search.mapper.orm.automaticindexing.impl.AutomaticIndexingStrategyStartContext; public class AutomaticIndexingStrategyStartContextImpl implements AutomaticIndexingStrategyStartContext { private final MappingStartContext delegate; private final ConfigurationPropertySource configurationPropertySource; public AutomaticIndexingStrategyStartContextImpl(MappingStartContext delegate) { this.delegate = delegate; this.configurationPropertySource = delegate.configurationPropertySource(); } @Override public BeanResolver beanResolver() { return delegate.beanResolver(); } @Override public ConfigurationPropertySource configurationPropertySource() { return configurationPropertySource; } }
hibernate/hibernate-search
1,103
engine/src/main/java/org/hibernate/search/engine/search/projection/dsl/ExtendedSearchProjectionFactory.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.search.projection.dsl; import org.hibernate.search.util.common.annotation.Incubating; /** * A base interface for subtypes of {@link TypedSearchProjectionFactory} allowing to * easily override the self type for all relevant methods. * <p> * <strong>Warning:</strong> Generic parameters of this type are subject to change, * so this type should not be referenced directly in user code. * * @param <SR> Scope root type. * @param <S> The self type, i.e. the exposed type of this factory. */ public interface ExtendedSearchProjectionFactory<SR, S extends ExtendedSearchProjectionFactory<SR, ?, R, E>, R, E> extends TypedSearchProjectionFactory<SR, R, E> { @Override S withRoot(String objectFieldPath); /** * @throws org.hibernate.search.util.common.SearchException In case the current factory cannot be rescoped for the {@code scopeRootType}. */ @Incubating <SR2> ExtendedSearchProjectionFactory<SR2, ?, R, E> withScopeRoot(Class<SR2> scopeRootType); }
hibernate/hibernate-search
1,121
engine/src/main/java/org/hibernate/search/engine/common/timing/Deadline.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.common.timing; import org.hibernate.search.util.common.SearchTimeoutException; import org.hibernate.search.util.common.annotation.Incubating; /** * Common interface providing a deadline through the method {@link #checkRemainingTimeMillis}. */ @Incubating public interface Deadline { /** * @return The remaining time to the deadline in milliseconds. * @throws org.hibernate.search.util.common.SearchTimeoutException If the deadline was reached * and it's a hard deadline requiring immediate failure. */ long checkRemainingTimeMillis(); /** * @param cause The cause of the timeout, or {@code null}. * @throws org.hibernate.search.util.common.SearchTimeoutException If the deadline is * a hard deadline requiring immediate failure. */ void forceTimeout(Exception cause); /** * @param cause The cause of the timeout, or {@code null}. * @return An exception to be thrown on timeout. */ SearchTimeoutException forceTimeoutAndCreateException(Exception cause); }
hibernate/hibernate-test-case-templates
1,079
validator/validator-6/src/test/java/org/hibernate/validator/bugs/YourTestCase.java
package org.hibernate.validator.bugs; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Set; import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; import javax.validation.ValidatorFactory; import org.hibernate.validator.testutil.TestForIssue; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; class YourTestCase { private static Validator validator; @BeforeAll public static void setUp() { ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); validator = factory.getValidator(); } @Test @TestForIssue(jiraKey = "HV-NNNNN") // Please fill in the JIRA key of your issue void testYourBug() { YourAnnotatedBean yourEntity1 = new YourAnnotatedBean( null, "example" ); Set<ConstraintViolation<YourAnnotatedBean>> constraintViolations = validator.validate( yourEntity1 ); assertEquals( 1, constraintViolations.size() ); assertEquals( "must not be null", constraintViolations.iterator().next().getMessage() ); } }
openjdk/jdk8
1,173
langtools/test/tools/javac/diags/examples/ArrayAndVarargs.java
/* * Copyright (c) 2010, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.array.and.varargs class ArrayAndVarags { void m(int[] array) { } void m(int... args) { } }
openjdk/jdk8
1,176
langtools/test/tools/javac/diags/examples/Orphaned.java
/* * Copyright (c) 2010, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.orphaned class Orphaned { void m() { case 3: System.out.println("3"); } }
openjdk/jdk8
1,186
jdk/test/sun/rmi/rmic/newrmic/equivalence/G1.java
/* * Copyright (c) 2003, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import java.rmi.Remote; import java.rmi.RemoteException; public interface G1 extends Remote { void m() throws RemoteException; }
openjdk/jtreg
1,178
test/modlibs/libs/usermods/lum1/lum1_p1/lum1_p1_C.java
/* * Copyright (c) 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package lum1_p1; public class lum1_p1_C { public void run() { System.out.println(getClass().getName()); } }
openjdk/jtreg
1,178
test/modlibs/libs/usermods/lum2/lum2_p1/lum2_p1_C.java
/* * Copyright (c) 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package lum2_p1; public class lum2_p1_C { public void run() { System.out.println(getClass().getName()); } }
openjdk/jtreg
1,178
test/modlibs/libs/usermods/lum3/lum3_p1/lum3_p1_C.java
/* * Copyright (c) 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package lum3_p1; public class lum3_p1_C { public void run() { System.out.println(getClass().getName()); } }
openjdk/skara
1,165
forge/src/main/java/org/openjdk/skara/forge/CheckAnnotationLevel.java
/* * Copyright (c) 2018, 2019, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.skara.forge; public enum CheckAnnotationLevel { NOTICE, WARNING, FAILURE }
apache/curator
1,147
curator-framework/src/main/java/org/apache/curator/framework/api/SetDataBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.curator.framework.api; import org.apache.zookeeper.data.Stat; public interface SetDataBuilder extends BackgroundPathAndBytesable<Stat>, Versionable<BackgroundPathAndBytesable<Stat>>, Compressible<SetDataBackgroundVersionable>, Idempotentable<SetDataBuilder> {}
apache/cxf
1,122
rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/aegis/Vegetable.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.javascript.fortest.aegis; /** * */ public class Vegetable { private String family; public Vegetable() { family = "brasica"; } public String getFamily() { return family; } public void setFamily(String family) { this.family = family; } }
apache/cxf
1,123
distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package demo.service.impl; import jakarta.jws.WebService; import demo.service.HelloWorld; @WebService public class HelloWorldImpl implements HelloWorld { /* * (non-Javadoc) * @see test.IHello#sayHi(java.lang.String) */ public String sayHi(String name) { return "Hello " + name; } }
apache/cxf
1,139
rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveListener.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.binding.corba.types; public class CorbaPrimitiveListener extends AbstractCorbaTypeListener { public CorbaPrimitiveListener(CorbaObjectHandler handler) { super(handler); } public void processCharacters(String text) { ((CorbaPrimitiveHandler) handler).setValueFromData(text); } }
apache/cxf
1,149
core/src/main/java/org/apache/cxf/validation/ClientBeanValidationOutInterceptor.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.validation; import org.apache.cxf.phase.Phase; public class ClientBeanValidationOutInterceptor extends AbstractBeanValidationInterceptor { public ClientBeanValidationOutInterceptor() { super(Phase.PRE_LOGICAL); } public ClientBeanValidationOutInterceptor(String phase) { super(phase); } }
apache/cxf
1,151
rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaStreamable.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.binding.corba; import org.apache.cxf.binding.corba.types.CorbaObjectHandler; import org.omg.CORBA.portable.Streamable; public interface CorbaStreamable extends Streamable { CorbaObjectHandler getObject(); void setObject(CorbaObjectHandler obj); int getMode(); void setMode(int md); String getName(); }
apache/deltaspike
1,104
deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/service/ExtendedRepositoryAbstractInherited.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.data.test.service; import org.apache.deltaspike.data.api.Repository; import org.apache.deltaspike.data.test.domain.Simple5; @Repository public abstract class ExtendedRepositoryAbstractInherited extends ExtendedRepositoryAbstractIntermediate<Simple5, Long> { }
apache/deltaspike
1,105
deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/PageBean004.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.test.jsf.impl.config.view.custom.uc004; import org.apache.deltaspike.core.api.config.view.ViewConfig; import jakarta.enterprise.inject.Model; @Model class PageBean004 { public Class<? extends ViewConfig> item() { return Pages.Public.Index.class; } }
apache/deltaspike
1,130
deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/category/DeltaSpikeTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.test.category; /** * This class contains a few constants and utility methods. */ public class DeltaSpikeTest { public static final String DELTASPIKE_PROPERTIES = "META-INF/apache-deltaspike.properties"; private DeltaSpikeTest() { // just to prevent initialisation! } }
apache/directory-scimple
1,105
scim-spec/scim-spec-schema/src/main/java/org/apache/directory/scim/spec/exception/UnsupportedFilterException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.directory.scim.spec.exception; public class UnsupportedFilterException extends RuntimeException { public UnsupportedFilterException(String message) { super(message); } public UnsupportedFilterException(String message, Throwable cause) { super(message, cause); } }
apache/directory-server
1,110
server-integ/src/test/java/org/apache/directory/server/operations/extended/HelloWorldProcedure.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.directory.server.operations.extended; public class HelloWorldProcedure { public static String sayHello() { return "Hello World!"; } public static String sayHelloTo( String name ) { return "Hello " + name + "!"; } }
apache/druid
1,117
extensions-core/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/PeonLifecycleFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.k8s.overlord; import org.apache.druid.indexing.common.task.Task; import org.apache.druid.k8s.overlord.common.K8sTaskId; public interface PeonLifecycleFactory { KubernetesPeonLifecycle build(Task task, K8sTaskId taskId, KubernetesPeonLifecycle.TaskStateListener stateListener); }