repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/ozone | 1,104 | hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/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.
*/
/**
* Ozone supports the notion of different kind of pipelines.
* That means that we can have a replication pipeline build on
* Ratis, Simple or some other protocol. All Pipeline managers
* the entities in charge of pipelines reside in the package.
*/
package org.apache.hadoop.hdds.scm.pipeline;
|
apache/paimon-webui | 1,097 | paimon-web-server/src/main/java/org/apache/paimon/web/server/mapper/JobMapper.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.paimon.web.server.mapper;
import org.apache.paimon.web.server.data.model.JobInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/** Job mapper. */
@Mapper
public interface JobMapper extends BaseMapper<JobInfo> {}
|
apache/parquet-java | 1,101 | parquet-hadoop/src/main/java/org/apache/parquet/crypto/AesMode.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.parquet.crypto;
public enum AesMode {
GCM("AES/GCM/NoPadding"),
CTR("AES/CTR/NoPadding");
private final String cipherName;
private AesMode(String cipherName) {
this.cipherName = cipherName;
}
public String getCipherName() {
return cipherName;
}
}
|
apache/phoenix-omid | 1,098 | transaction-client/src/main/java/org/apache/omid/tso/client/ClosingException.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.omid.tso.client;
/**
* Thrown when an error is produced when performing the actions required
* to close the communication with the TSO server
*/
public class ClosingException extends Exception {
private static final long serialVersionUID = -5681694952053689884L;
}
|
apache/phoenix | 1,093 | phoenix-core-client/src/main/java/org/apache/phoenix/util/json/JsonDataFormatFactory.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.phoenix.util.json;
public class JsonDataFormatFactory {
public enum DataFormat {
BSON,
STRING
}
public static JsonDataFormat getJsonDataFormat(DataFormat type) {
if (type == DataFormat.BSON) return new BsonDataFormat();
else return null;
}
}
|
apache/phoenix | 1,095 | phoenix-pherf/src/main/java/org/apache/phoenix/pherf/exception/PherfRuntimeException.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.phoenix.pherf.exception;
public class PherfRuntimeException extends RuntimeException {
public PherfRuntimeException(String message) throws Exception {
super(message);
}
public PherfRuntimeException(String message, Exception e) {
super(message, e);
}
}
|
apache/pig | 1,144 | src/org/apache/pig/builtin/TANH.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.pig.builtin;
/**
* TANH implements a binding to the Java function
* {@link java.lang.Math#tanh(double) Math.tanh(double)}.
* Given a single data atom it Returns the hyperbolic tangent
* of the argument.
*
*/
public class TANH extends DoubleBase{
Double compute(Double input){
return Math.tanh(input);
}
}
|
apache/pinot | 1,101 | pinot-spi/src/main/java/org/apache/pinot/spi/stream/PartitionLevelStreamConfig.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.spi.stream;
import java.util.Map;
@Deprecated
public class PartitionLevelStreamConfig extends StreamConfig {
public PartitionLevelStreamConfig(String tableNameWithType, Map<String, String> streamConfigMap) {
super(tableNameWithType, streamConfigMap);
}
}
|
apache/polygene-java | 1,082 | libraries/shiro-web/src/main/java/org/apache/polygene/library/shiro/web/ShiroFilterService.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.library.shiro.web;
import javax.servlet.Filter;
import org.apache.polygene.api.mixin.Mixins;
import org.apache.shiro.web.servlet.ShiroFilter;
@Mixins( ShiroFilter.class )
public interface ShiroFilterService extends Filter
{
}
|
apache/polygene-java | 1,093 | core/bootstrap/src/main/java/org/apache/polygene/bootstrap/MixinDeclaration.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.bootstrap;
/**
* Fluent API for declaring information about properties
*
* @param <T> Parameterized mixin type
*/
public interface MixinDeclaration<T>
{
T declareDefaults();
MixinDeclaration<T> setMetaInfo( Object info );
}
|
apache/qpid-broker-j | 1,087 | broker-core/src/main/java/org/apache/qpid/server/plugin/ConfiguredObjectRegistration.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.server.plugin;
import java.util.Collection;
import org.apache.qpid.server.model.ConfiguredObject;
public interface ConfiguredObjectRegistration extends Pluggable
{
Collection<Class<? extends ConfiguredObject>> getConfiguredObjectClasses();
}
|
apache/reef | 1,089 | lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/context/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.
*/
/**
* Implementations of Driver-Side representations of Contexts running on an Evaluator.
*/
@DriverSide
@Private
package org.apache.reef.runtime.common.driver.context;
import org.apache.reef.annotations.audience.DriverSide;
import org.apache.reef.annotations.audience.Private;
|
apache/rocketmq-connect | 1,079 | rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/errors/Operation.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.connect.runtime.errors;
import java.util.concurrent.Callable;
/**
* A recoverable operation evaluated in the connector pipeline.
*
* @param <V> return type of the result of the operation.
*/
public interface Operation<V> extends Callable<V> {
}
|
apache/seatunnel-web | 1,073 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/engine/Engine.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.engine;
import org.apache.seatunnel.app.common.EngineType;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class Engine {
private EngineType name;
private String version;
}
|
apache/servicecomb-java-chassis | 1,044 | swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/ClassAnnotationProcessor.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;
import java.lang.reflect.Type;
public interface ClassAnnotationProcessor<ANNOTATION> {
Type getProcessType();
void process(SwaggerGenerator swaggerGenerator, ANNOTATION annotation);
}
|
apache/servicecomb-java-chassis | 1,061 | demo/demo-pojo/pojo-server/src/main/java/org/apache/servicecomb/demo/pojo/server/SchemaInterfaceImpl.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.pojo.server;
public class SchemaInterfaceImpl implements SchemaInterface {
@Override
public String echo(String content) {
return content;
}
public String echoError(String content) {
return content;
}
}
|
apache/servicecomb-java-chassis | 1,102 | core/src/main/java/org/apache/servicecomb/core/SCBStatus.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.core;
//DOWN -> STARTING -> UP -> STOPPING -> DOWN
public enum SCBStatus {
//Chassis is Down
DOWN,
//Chassis is Starting (progressing)
STARTING,
//Chassis is Running
UP,
//Chassis is Stopping (progressing)
STOPPING,
//Chassis Init Failed
FAILED
}
|
apache/servicecomb-saga-actuator | 1,077 | saga-core/src/main/java/org/apache/servicecomb/saga/core/TransactionFailedException.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.saga.core;
public class TransactionFailedException extends RuntimeException {
public TransactionFailedException(Throwable throwable) {
super(throwable);
}
public TransactionFailedException(String cause) {
super(cause);
}
}
|
apache/shenyu | 1,108 | shenyu-spi/src/test/java/org/apache/shenyu/spi/fixture/TreeListSPI.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.fixture;
import org.apache.shenyu.spi.Join;
import java.util.Collections;
import java.util.List;
/**
* TreeListSPI .
*/
@Join
public class TreeListSPI implements ListSPI {
@Override
public List<Object> getList() {
return Collections.emptyList();
}
}
|
apache/shiro | 1,105 | support/cdi/src/main/java/org/apache/shiro/cdi/ShiroSecureAnnotation.java | /*
* 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.shiro.cdi;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
import javax.interceptor.InterceptorBinding;
/**
* CDI Marker Annotation to use Shiro
* to secure the bean
*/
@Inherited
@InterceptorBinding
@Target({TYPE, METHOD})
@Retention(RUNTIME)
@interface ShiroSecureAnnotation {
}
|
apache/sis | 1,100 | endorsed/src/org.apache.sis.util/main/org/apache/sis/util/resources/Vocabulary_en.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.sis.util.resources;
/**
* Resource in English language.
*/
public class Vocabulary_en extends Vocabulary {
/**
* Constructs a new resource bundle loading data from
* the resource file of the same name as this class.
*/
public Vocabulary_en() {
}
}
|
apache/skywalking-java | 1,034 | apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/client/Constants.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.plugin.jetty.v9.client;
public class Constants {
public final static String SW_JETTY_EXIT_SPAN_KEY = "SW_JETTY_EXIT_SPAN";
public final static String PLUGIN_NAME = "JettyClient9.x";
}
|
apache/skywalking-java | 1,052 | apm-sniffer/apm-sdk-plugin/jsonrpc4j-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jsonrpc4j/JsonRpcConstants.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.plugin.jsonrpc4j;
import org.apache.skywalking.apm.agent.core.context.tag.StringTag;
public class JsonRpcConstants {
public static final StringTag JSON_RPC_METHOD_TAG = new StringTag(1, "jsonrpc.method");
} |
apache/solr | 1,094 | solr/solrj-zookeeper/src/java/org/apache/solr/client/solrj/cloud/NotEmptyException.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.client.solrj.cloud;
/** */
public class NotEmptyException extends Exception {
private final String path;
public NotEmptyException(String path) {
super("Path not empty: " + path);
this.path = path;
}
public String getPath() {
return path;
}
}
|
apache/stratos | 1,028 | components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/cluster/status/ClusterStatusClusterInstanceCreatedEventListener.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.stratos.messaging.listener.cluster.status;
import org.apache.stratos.messaging.listener.EventListener;
public abstract class ClusterStatusClusterInstanceCreatedEventListener extends EventListener {
}
|
apache/stratos | 1,061 | components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/exception/InvalidLockRequestedException.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.stratos.common.exception;
/**
* Invalid lock requested exception.
*/
public class InvalidLockRequestedException extends RuntimeException {
public InvalidLockRequestedException(String message) {
super(message);
}
}
|
apache/streampark | 1,054 | streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/DockerImageService.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.streampark.console.core.service;
public interface DockerImageService {
/**
* Check the validity of the Docker image
*
* @param imageName
* @return
*/
Boolean isDockerImageExist(String imageName);
}
|
apache/streampipes | 1,059 | streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/connect/context/IAdapterRuntimeContext.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.extensions.api.connect.context;
import org.apache.streampipes.extensions.api.monitoring.IExtensionsLogger;
public interface IAdapterRuntimeContext extends IAdapterGuessSchemaContext {
IExtensionsLogger getLogger();
}
|
apache/streampipes | 1,068 | streampipes-messaging-kafka/src/main/java/org/apache/streampipes/messaging/kafka/config/KafkaConfigAppender.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.messaging.kafka.config;
import org.apache.streampipes.commons.exceptions.SpRuntimeException;
import java.util.Properties;
public interface KafkaConfigAppender {
void appendConfig(Properties props) throws SpRuntimeException;
}
|
apache/streampipes | 1,082 | streampipes-wrapper-flink/src/main/java/org/apache/streampipes/wrapper/flink/IDataSinkProgram.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.wrapper.flink;
import org.apache.streampipes.model.runtime.Event;
import org.apache.flink.streaming.api.datastream.DataStream;
public interface IDataSinkProgram extends IFlinkProgram {
void getSink(DataStream<Event>... convertedStream1);
}
|
apache/streampipes | 1,094 | streampipes-client-api/src/main/java/org/apache/streampipes/client/api/IFileApi.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.client.api;
public interface IFileApi {
byte[] getFileContent(String filename);
String getFileContentAsString(String filename);
void writeToFile(String file, String fileLocation);
boolean checkFileContentChanged(String filename, String hash);
}
|
apache/syncope | 1,073 | core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/attrvalue/DropdownValueProvider.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.syncope.core.persistence.api.attrvalue;
import java.util.List;
import org.apache.syncope.common.lib.to.AttributableTO;
@FunctionalInterface
public interface DropdownValueProvider {
List<String> getChoices(AttributableTO attributableTO);
}
|
apache/syncope | 1,083 | core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/MailTemplate.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.syncope.core.persistence.api.entity;
public interface MailTemplate extends ProvidedKeyEntity {
String getTextTemplate();
void setTextTemplate(String textTemplate);
String getHTMLTemplate();
void setHTMLTemplate(String htmlTemplate);
}
|
apache/syncope | 1,099 | common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/search/GroupProperty.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.syncope.common.lib.search;
public interface GroupProperty extends SyncopeProperty<GroupCompleteCondition> {
GroupCompleteCondition withMembers(String member, String... moreMembers);
GroupCompleteCondition withoutMembers(String member, String... moreMembers);
}
|
apache/tajo | 1,098 | tajo-common/src/main/java/org/apache/tajo/validation/JavaStringValidator.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.validation;
public class JavaStringValidator extends PatternValidator {
public JavaStringValidator() {
super("^[\\p{Graph}\\p{L}]+$");
}
@Override
protected <T> String getErrorMessage(T object) {
return object + " is not a valid string";
}
}
|
apache/tajo | 1,126 | tajo-common/src/main/java/org/apache/tajo/type/Char.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.type;
import com.google.common.collect.ImmutableList;
import static org.apache.tajo.common.TajoDataTypes.Type.CHAR;
public class Char extends ValueParamterizedType {
Char(int length) {
super(CHAR, ImmutableList.of(length));
}
public int length() {
return params.get(0);
}
}
|
apache/tomcat | 1,133 | java/jakarta/servlet/jsp/tagext/JspIdConsumer.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.servlet.jsp.tagext;
/**
* Interface that allows tag handlers to be provided with a unique (within the scope of the web application) ID.
*/
public interface JspIdConsumer {
/**
* Set the unique ID for the tag handler.
*
* @param jspId The unique Id
*/
void setJspId(String jspId);
}
|
apache/tomcat80 | 1,133 | java/javax/persistence/PersistenceContexts.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 javax.persistence;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface PersistenceContexts {
PersistenceContext[] value();
}
|
apache/uniffle | 1,105 | common/src/main/java/org/apache/uniffle/common/exception/RssException.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.uniffle.common.exception;
public class RssException extends RuntimeException {
public RssException(String message) {
super(message);
}
public RssException(Throwable e) {
super(e);
}
public RssException(String message, Throwable e) {
super(message, e);
}
}
|
google/bindiff | 1,077 | java/ui/src/main/java/com/google/security/zynamics/bindiff/enums/comparators/MatchStateComparator.java | // Copyright 2011-2024 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.
package com.google.security.zynamics.bindiff.enums.comparators;
import com.google.security.zynamics.bindiff.enums.EMatchState;
import java.util.Comparator;
public class MatchStateComparator implements Comparator<EMatchState> {
@Override
public int compare(final EMatchState o1, final EMatchState o2) {
final int i = EMatchState.getOrdinal(o1) - EMatchState.getOrdinal(o2);
if (i < 0) {
return 1;
}
if (i > 0) {
return -1;
}
return 0;
}
}
|
google/binnavi | 1,064 | src/main/java/com/google/security/zynamics/binnavi/debug/connection/packets/arguments/DebugMessageIntegerArgument.java | // Copyright 2011-2016 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.security.zynamics.binnavi.debug.connection.packets.arguments;
/**
* Class that can be used to add integer values to debug message arguments.
*/
public final class DebugMessageIntegerArgument extends DebugMessageArgument {
/**
* Creates a new integer debug argument.
*
* @param value Value of the integer argument.
*/
public DebugMessageIntegerArgument(final int value) {
super(DebugArgumentType.INTEGER);
appendInt(value);
}
}
|
google/binnavi | 1,088 | src/main/java/com/google/security/zynamics/binnavi/Gui/Database/DatabaseNameFieldHelp.java | // Copyright 2011-2016 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.security.zynamics.binnavi.Gui.Database;
import com.google.security.zynamics.binnavi.Help.CHelpFunctions;
import com.google.security.zynamics.binnavi.Help.IHelpInformation;
import java.net.URL;
public class DatabaseNameFieldHelp implements IHelpInformation {
@Override
public String getText() {
return "The name of the PostgreSQL database to connect to.";
}
@Override
public URL getUrl() {
return CHelpFunctions.urlify(CHelpFunctions.MAIN_WINDOW_FILE);
}
}
|
google/binnavi | 1,103 | src/main/java/com/google/security/zynamics/binnavi/disassembly/IBlockNode.java | // Copyright 2011-2016 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.security.zynamics.binnavi.disassembly;
import com.google.security.zynamics.zylib.disassembly.ICodeContainer;
import com.google.security.zynamics.zylib.types.graphs.IGraphNode;
/**
* Interface for basic blocks of functions.
*/
public interface IBlockNode extends IGraphNode<IBlockNode>, ICodeContainer<INaviInstruction> {
/**
* Returns the basic block represented by the block node.
*
* @return The basic block represented by the code node.
*/
INaviBasicBlock getBlock();
}
|
google/binnavi | 1,115 | src/main/java/com/google/security/zynamics/binnavi/API/plugins/_Doc.java | // Copyright 2011-2016 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.security.zynamics.binnavi.API.plugins;
/**
* \namespace com.google.security.zynamics.binnavi.API.plugins \brief Contains interfaces for BinNavi plugins
*
* The package com.google.security.zynamics.binnavi.API.plugins contains interfaces that can be implemented by BinNavi plugins.
* These interfaces determine how the plugins are used in com.google.security.zynamics.binnavi, how they access internal
* information, and how they give feedback to the user of com.google.security.zynamics.binnavi.
*/
|
google/copybara | 1,090 | java/com/google/copybara/util/console/AnsiColor.java | /*
* Copyright (C) 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.copybara.util.console;
/**
* Colors to print messages in the console
*/
public enum AnsiColor {
RESET("\u001B[0m"),
BLACK("\u001B[30m"),
RED("\u001B[31m"),
GREEN("\u001B[32m"),
YELLOW("\u001B[33m"),
BLUE("\u001B[34m"),
PURPLE("\u001B[35m"),
CYAN("\u001B[36m"),
WHITE("\u001B[37m");
private final String color;
AnsiColor(String ansiColor) {
this.color = ansiColor;
}
String write(String text) {
return color + text + RESET.color;
}
}
|
google/error-prone | 1,091 | check_api/src/main/java/com/google/errorprone/apply/DiscardingFileDestination.java | /*
* Copyright 2011 The Error Prone Authors.
*
* 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.errorprone.apply;
import java.util.logging.Logger;
/** File destination which simply throws away the generated file. */
public class DiscardingFileDestination implements FileDestination {
private static final Logger log = Logger.getLogger(DiscardingFileDestination.class.toString());
@Override
public void writeFile(SourceFile file) {
log.info(String.format("Altered file %s thrown away", file.getPath()));
}
@Override
public void flush() {}
}
|
google/google-java-format | 1,074 | core/src/main/java/com/google/googlejavaformat/java/javadoc/NestingCounter.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.googlejavaformat.java.javadoc;
/** Mutable integer for tracking the level of nesting. */
final class NestingCounter {
private int value;
int value() {
return value;
}
void increment() {
value++;
}
void incrementIfPositive() {
if (value > 0) {
value++;
}
}
void decrementIfPositive() {
if (value > 0) {
value--;
}
}
boolean isPositive() {
return value > 0;
}
void reset() {
value = 0;
}
}
|
google/gson | 1,109 | extras/src/main/java/com/google/gson/interceptors/JsonPostDeserializer.java | /*
* Copyright (C) 2012 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.gson.interceptors;
import com.google.gson.InstanceCreator;
/**
* This interface is implemented by a class that wishes to inspect or modify an object after it has
* been deserialized. You must define a no-args constructor or register an {@link InstanceCreator}
* for such a class.
*
* @author Inderjeet Singh
*/
public interface JsonPostDeserializer<T> {
/** This method is called by Gson after the object has been deserialized from Json. */
public void postDeserialize(T object);
}
|
google/live-transcribe-speech-engine | 1,090 | app/src/main/java/com/google/audio/asr/AlwaysSpeechPolicy.java | /*
* Copyright 2019 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.
*/
package com.google.audio.asr;
/** A speech detector that always reports hearing speech. */
public class AlwaysSpeechPolicy implements SpeechDetectionPolicy {
public AlwaysSpeechPolicy() {}
@Override
public boolean shouldPassAudioToRecognizer() {
return true;
}
@Override
public void init(int blockSizeSamples) {}
@Override
public void reset() {}
@Override
public void processAudioBytes(byte[] bytes, int offset, int length) {}
@Override
public void stop() {}
}
|
google/skia | 1,081 | platform_tools/android/apps/jetskidemo/src/main/java/org/skia/jetskidemo/samples/ImageShaderSample.java | /*
* Copyright 2021 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
package org.skia.jetskidemo.samples;
import android.content.res.Resources;
import org.skia.jetski.Canvas;
import org.skia.jetski.Image;
import org.skia.jetski.Paint;
import org.skia.jetski.SamplingOptions;
import org.skia.jetski.Shader;
import org.skia.jetski.TileMode;
public class ImageShaderSample implements Sample {
private Paint mPaint = new Paint();
public ImageShaderSample(Resources res, int resId) {
try {
Image image = Image.fromStream(res.openRawResource(resId));
Shader shader =
image.makeShader(TileMode.REPEAT, TileMode.REPEAT,
new SamplingOptions(SamplingOptions.FilterMode.LINEAR));
mPaint.setShader(shader);
} catch (Exception e) {}
}
public void render(Canvas canvas, long t, float left, float top, float right, float bottom) {
canvas.drawRect(left, top, right, bottom, mPaint);
}
}
|
googleapis/discovery-artifact-manager | 1,070 | toolkit/src/main/java/com/google/api/codegen/viewmodel/BatchingPartitionKeyView.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.api.codegen.viewmodel;
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class BatchingPartitionKeyView {
public abstract String fieldGetFunction();
public static Builder newBuilder() {
return new AutoValue_BatchingPartitionKeyView.Builder();
}
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder fieldGetFunction(String val);
public abstract BatchingPartitionKeyView build();
}
}
|
googleapis/discovery-artifact-manager | 1,079 | toolkit/src/main/java/com/google/api/codegen/grpcmetadatagen/PackageType.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.api.codegen.grpcmetadatagen;
/** Indicates the type of the package */
public enum PackageType {
/** Common protos package generated from core protos */
GRPC_COMMON,
/** API client protos package generated from API protos e.g. pubsub */
GRPC_CLIENT;
public static PackageType of(String packageTypeString) {
if (packageTypeString != null) {
return PackageType.valueOf(packageTypeString.toUpperCase());
} else {
return null;
}
}
}
|
googleapis/google-cloud-java | 1,026 | java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveContextChildrenResponseOrBuilder.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/aiplatform/v1beta1/metadata_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.aiplatform.v1beta1;
public interface RemoveContextChildrenResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RemoveContextChildrenResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleworkspace/java-samples | 1,104 | drive/snippets/drive_v2/src/test/java/TestUploadRevision.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.
*/
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.junit.Test;
public class TestUploadRevision extends BaseTest {
@Test
public void uploadRevision() throws IOException, GeneralSecurityException {
String id = UploadBasic.uploadBasic();
assertNotNull(id);
deleteFileOnCleanup(id);
String id2 = UploadRevision.uploadRevision(id);
assertEquals(id, id2);
}
}
|
googleworkspace/java-samples | 1,104 | drive/snippets/drive_v3/src/test/java/TestUploadRevision.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.
*/
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.junit.Test;
public class TestUploadRevision extends BaseTest {
@Test
public void uploadRevision() throws IOException, GeneralSecurityException {
String id = UploadBasic.uploadBasic();
assertNotNull(id);
deleteFileOnCleanup(id);
String id2 = UploadRevision.uploadRevision(id);
assertEquals(id, id2);
}
}
|
googleworkspace/java-samples | 1,113 | classroom/snippets/src/test/java/TestCreateTopic.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
//
// 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.
import com.google.api.services.classroom.model.Topic;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.junit.Assert;
import org.junit.Test;
// Unit test class for Create Topic classroom snippet
public class TestCreateTopic extends BaseTest {
@Test
public void testCreateTopic() throws GeneralSecurityException, IOException {
setup(CreateTopic.SCOPES);
Topic topic = CreateTopic.createTopic(testCourse.getId());
Assert.assertNotNull("Topic not returned.", topic);
}
}
|
hibernate/hibernate-orm | 1,025 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/indexcoll/PaintingPk.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.indexcoll;
import java.io.Serializable;
import jakarta.persistence.Embeddable;
/**
* @author Emmanuel Bernard
*/
@Embeddable
public class PaintingPk implements Serializable {
private String name;
private String painter;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPainter() {
return painter;
}
public void setPainter(String painter) {
this.painter = painter;
}
public boolean equals(Object o) {
if ( this == o ) return true;
if ( o == null || getClass() != o.getClass() ) return false;
final PaintingPk that = (PaintingPk) o;
if ( !name.equals( that.name ) ) return false;
if ( !painter.equals( that.painter ) ) return false;
return true;
}
public int hashCode() {
int result;
result = name.hashCode();
result = 29 * result + painter.hashCode();
return result;
}
}
|
hibernate/hibernate-orm | 1,034 | hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/unit/lockhint/SQLServer2005LockHintsTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.community.dialect.unit.lockhint;
import org.hibernate.LockMode;
import org.hibernate.LockOptions;
import org.hibernate.community.dialect.SQLServerLegacyDialect;
import org.hibernate.dialect.DatabaseVersion;
import org.hibernate.dialect.Dialect;
import org.hibernate.orm.test.dialect.unit.lockhint.AbstractLockHintTest;
import static org.hibernate.Timeouts.NO_WAIT;
/**
* @author Vlad Mihalcea
*/
public class SQLServer2005LockHintsTest extends AbstractLockHintTest {
public static final Dialect DIALECT = new SQLServerLegacyDialect( DatabaseVersion.make( 9 ) );
protected String getLockHintUsed() {
return "with (updlock,holdlock,rowlock,nowait)";
}
protected Dialect getDialectUnderTest() {
return DIALECT;
}
@Override
protected LockOptions lockOptions(String aliasToLock) {
LockOptions lockOptions = new LockOptions( LockMode.PESSIMISTIC_WRITE).setTimeout( NO_WAIT );
return lockOptions;
}
}
|
hibernate/hibernate-orm | 1,048 | hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SqlTypedMapping.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.metamodel.mapping;
import org.hibernate.engine.jdbc.Size;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Models the type of a thing that can be used as an expression in a SQL query
*
* @author Christian Beikov
*/
public interface SqlTypedMapping {
@Nullable String getColumnDefinition();
@Nullable Long getLength();
@Nullable Integer getArrayLength();
@Nullable Integer getPrecision();
@Nullable Integer getScale();
@Nullable Integer getTemporalPrecision();
default boolean isLob() {
return getJdbcMapping().getJdbcType().isLob();
}
JdbcMapping getJdbcMapping();
default Size toSize() {
final Size size = new Size();
size.setArrayLength( getArrayLength() );
size.setLength( getLength() );
if ( getTemporalPrecision() != null ) {
size.setPrecision( getTemporalPrecision() );
}
else {
size.setPrecision( getPrecision() );
}
size.setScale( getScale() );
return size;
}
}
|
hibernate/hibernate-orm | 1,053 | hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SelectableMappings.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.metamodel.mapping;
/**
* A container for multiple selectable (column, formula) mappings.
*
* @author Christian Beikov
*/
public interface SelectableMappings {
/**
* The number of selectables
*/
int getJdbcTypeCount();
/**
* Get the selectable at the given position
*/
SelectableMapping getSelectable(int columnIndex);
/**
* Visit each contained selectable mapping.
*
* As the selectables are iterated, we call `SelectionConsumer`
* passing along `offset` + our current iteration index.
*
* The return is the number of selectables we directly contain
*
* @see SelectableConsumer#accept(int, SelectableMapping)
*/
int forEachSelectable(int offset, SelectableConsumer consumer);
/**
* Same as {@link #forEachSelectable(int, SelectableConsumer)}, with
* an implicit offset of `0`
*/
default int forEachSelectable(SelectableConsumer consumer) {
return forEachSelectable( 0, consumer );
}
}
|
hibernate/hibernate-orm | 1,062 | hibernate-core/src/test/java/org/hibernate/orm/test/internal/util/SessionBuilderFlushModeTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.internal.util;
import org.hibernate.FlushMode;
import org.hibernate.Session;
import org.hibernate.testing.orm.junit.JiraKey;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Michael Spahn
*/
@JiraKey(value = "HHH-13974")
@DomainModel
@SessionFactory
public class SessionBuilderFlushModeTest {
@ParameterizedTest
@EnumSource( FlushMode.class )
public void testFlushModeSettingTakingEffect(FlushMode flushMode, SessionFactoryScope scope) {
try ( final Session session = scope.getSessionFactory().withOptions().flushMode( flushMode ).openSession() ) {
assertThat( session.getHibernateFlushMode() ).isEqualTo( flushMode );
}
}
}
|
hibernate/hibernate-orm | 1,076 | hibernate-core/src/main/java/org/hibernate/query/criteria/JpaCollectionJoin.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query.criteria;
import java.util.Collection;
import org.hibernate.metamodel.model.domain.EntityDomainType;
import jakarta.persistence.criteria.CollectionJoin;
import jakarta.persistence.criteria.Expression;
import jakarta.persistence.criteria.Predicate;
/**
* Specialization of {@link JpaJoin} for {@link java.util.Collection} typed attribute joins
*
* @author Steve Ebersole
*/
public interface JpaCollectionJoin<O, T> extends JpaPluralJoin<O, Collection<T>, T>, CollectionJoin<O, T> {
@Override
JpaCollectionJoin<O, T> on(JpaExpression<Boolean> restriction);
@Override
JpaCollectionJoin<O, T> on(Expression<Boolean> restriction);
@Override
JpaCollectionJoin<O, T> on(JpaPredicate... restrictions);
@Override
JpaCollectionJoin<O, T> on(Predicate... restrictions);
@Override
<S extends T> JpaTreatedJoin<O,T, S> treatAs(Class<S> treatAsType);
@Override
<S extends T> JpaTreatedJoin<O,T, S> treatAs(EntityDomainType<S> treatAsType);
}
|
hibernate/hibernate-search | 1,038 | documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/programmatic/simple/MySearchMappingConfigurer.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.documentation.mapper.orm.programmatic.simple;
import org.hibernate.search.mapper.orm.mapping.HibernateOrmMappingConfigurationContext;
import org.hibernate.search.mapper.orm.mapping.HibernateOrmSearchMappingConfigurer;
import org.hibernate.search.mapper.pojo.mapping.definition.programmatic.ProgrammaticMappingConfigurationContext;
import org.hibernate.search.mapper.pojo.mapping.definition.programmatic.TypeMappingStep;
//tag::include[]
public class MySearchMappingConfigurer implements HibernateOrmSearchMappingConfigurer {
@Override
public void configure(HibernateOrmMappingConfigurationContext context) {
ProgrammaticMappingConfigurationContext mapping = context.programmaticMapping(); // <1>
TypeMappingStep bookMapping = mapping.type( Book.class ); // <2>
bookMapping.indexed(); // <3>
bookMapping.property( "title" ) // <4>
.fullTextField().analyzer( "english" ); // <5>
}
}
//end::include[]
|
hibernate/hibernate-search | 1,050 | engine/src/main/java/org/hibernate/search/engine/search/aggregation/dsl/CompositeAggregationFrom1AsStep.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.engine.search.aggregation.dsl;
import java.util.function.Function;
import org.hibernate.search.util.common.annotation.Incubating;
/**
* The step in a "multi-step" composite aggregation definition
* where a single inner aggregation has been defined
* and the result of the composite aggregation can be defined.
*
* @param <V1> The type of values returned by the single inner aggregation.
*/
@Incubating
public interface CompositeAggregationFrom1AsStep<V1>
extends CompositeAggregationFromAsStep {
/**
* Defines the result of the composite aggregation
* as the result of applying the given function to the single inner aggregation defined so far.
*
* @param transformer A function to transform the values of inner aggregations defined so far.
* @return The next DSL step.
* @param <V> The type of values returned by the transformer.
*/
<V> AggregationFinalStep<V> as(Function<V1, V> transformer);
}
|
hibernate/hibernate-search | 1,060 | v5migrationhelper/engine/src/main/java/org/hibernate/search/spatial/impl/GeometricConstants.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.spatial.impl;
/**
* Geometric constants to use in SpatialHelper calculation
*
* @author Nicolas Helleringer
* @author Mathieu Perez
* @see SpatialHelper
*/
public interface GeometricConstants {
double TO_RADIANS_RATIO = Math.PI / 180.0;
double TO_DEGREES_RATIO = 180.0 / Math.PI;
int WHOLE_CIRCLE_DEGREE_RANGE = 360;
int LONGITUDE_DEGREE_RANGE = WHOLE_CIRCLE_DEGREE_RANGE;
int LONGITUDE_DEGREE_MIN = -LONGITUDE_DEGREE_RANGE / 2;
int LONGITUDE_DEGREE_MAX = LONGITUDE_DEGREE_RANGE / 2;
int LATITUDE_DEGREE_RANGE = WHOLE_CIRCLE_DEGREE_RANGE / 2;
int LATITUDE_DEGREE_MIN = -LATITUDE_DEGREE_RANGE / 2;
int LATITUDE_DEGREE_MAX = LATITUDE_DEGREE_RANGE / 2;
int HEADING_NORTH = 0;
int HEADING_SOUTH = 180;
int HEADING_EAST = 90;
int HEADING_WEST = 270;
double EARTH_MEAN_RADIUS_KM = 6371.0;
Point NORTH_POLE = Point.fromDegrees( LATITUDE_DEGREE_MAX, 0 );
Point SOUTH_POLE = Point.fromDegrees( LATITUDE_DEGREE_MIN, 0 );
}
|
openjdk/jdk8 | 1,102 | langtools/test/tools/javac/diags/examples/DeprecatedPluralAdditional/DeprecatedPlural.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.
*/
class DeprecatedPlural {
DeprecatedClass d;
}
|
openjdk/jdk8 | 1,113 | langtools/test/tools/javadoc/annotations/annotateMethodsFields/pkg1/E.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.
*/
package pkg1;
public enum E {
@A("econst")
econst
}
|
openjdk/jdk8 | 1,127 | langtools/test/tools/javac/HiddenAbstractMethod/one/Parent.java | /*
* Copyright (c) 1998, 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 one;
public abstract class Parent {
abstract void method();
}
|
openjdk/jdk8 | 1,131 | langtools/test/tools/javac/diags/examples/ProcOnlyNoProcs.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.warn.proc.proc-only.requested.no.procs
// options: -proc:only
|
openjdk/jdk8 | 1,142 | jdk/test/java/io/Serializable/class/SerialA.java | /*
* Copyright (c) 1998, 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.io.Serializable;
public class A implements Serializable {
int field1;
};
|
oracle/coherence | 1,082 | prj/coherence-json/src/main/java/com/oracle/coherence/io/json/SafeJsonSerializer.java | /*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package com.oracle.coherence.io.json;
import com.tangosol.io.DefaultSerializer;
import com.tangosol.io.MultiplexingSerializer;
import jakarta.inject.Named;
/**
* An extension of {@link MultiplexingSerializer} that registers the {@link JsonSerializer}
* and the {@link DefaultSerializer} (in that order).
*
* If an object can't be serialized/deserialized as JSON, then attempt it using Java serialization.
*
* @since 20.06
*/
@Named("safe-json")
public class SafeJsonSerializer
extends MultiplexingSerializer
{
// ----- constructors ---------------------------------------------------
public SafeJsonSerializer()
{
super(new JsonSerializer(), new DefaultSerializer());
}
// ----- Serializer interface -------------------------------------------
@Override
public String getName()
{
return "safe-json";
}
}
|
oracle/coherence | 1,091 | prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Ifnull.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.dev.assembler;
import java.io.IOException;
import java.io.DataInput;
import java.io.DataOutput;
/**
* The IFNULL op branches to the label if the top reference on the stack is
* null.
* <p><code><pre>
* JASM op : IFNULL (0xc6)
* JVM byte code(s): IFNULL (0xc6)
* Details :
* </pre></code>
*
* @version 0.50, 06/14/98, assembler/dis-assembler
* @author Cameron Purdy
*/
public class Ifnull extends OpBranch implements Constants
{
// ----- constructors ---------------------------------------------------
/**
* Construct the op.
*
* @param label the label to branch to
*/
public Ifnull(Label label)
{
super(IFNULL, label);
}
// ----- data members ---------------------------------------------------
/**
* The name of this class.
*/
private static final String CLASS = "Ifnull";
}
|
oracle/coherence | 1,115 | prj/coherence-core/src/main/java/com/tangosol/util/Proxyable.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.util;
import com.tangosol.util.processor.MethodInvocationProcessor;
/**
* An interface that should be implemented by the classes that are able to
* create a client-side proxy for itself.
*
* @author as 2014.11.19
* @since 12.2.1
*/
public interface Proxyable<T>
{
/**
* Return a proxy for a cached value.
* <p>
* The proxy returned will typically use {@link MethodInvocationProcessor}
* to invoke methods on a remote object, but ultimately it is up to the
* proxy implementor to decide how each individual method will be proxied.
*
* @param sCacheName the name of the cache the proxied object is in
* @param key the key associated with the proxied object
* @param <K> the type of the cache key
*
* @return a proxy for the value with a given key in the specified cache
*/
<K> T getProxy(String sCacheName, K key);
}
|
apache/commons-ognl | 1,099 | src/test/java/org/apache/commons/ognl/test/objects/SetterReturns.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.commons.ognl.test.objects;
/**
*/
public class SetterReturns
{
private String _value = "";
public String getValue()
{
return _value;
}
public SetterReturns setValue( String value )
{
_value += value;
return this;
}
}
|
apache/cxf | 1,085 | rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/WebSocketConstants.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.transport.websocket;
/**
*
*/
public final class WebSocketConstants {
public static final String DEFAULT_REQUEST_ID_KEY = "requestId";
public static final String DEFAULT_RESPONSE_ID_KEY = "responseId";
private WebSocketConstants() {
}
}
|
apache/cxf | 1,103 | core/src/main/java/org/apache/cxf/databinding/source/mime/CustomExtensionRegistry.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.databinding.source.mime;
import org.apache.ws.commons.schema.extensions.ExtensionRegistry;
public class CustomExtensionRegistry extends ExtensionRegistry {
public CustomExtensionRegistry() {
registerSerializer(MimeAttribute.class, new MimeSerializer());
}
}
|
apache/cxf | 1,108 | rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/CustomerApplication.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.jaxrs;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.UriInfo;
public class CustomerApplication extends Application {
@Context
private UriInfo uriInfo;
public UriInfo getUriInfo() {
return uriInfo;
}
}
|
apache/cxf | 1,109 | rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/EchoImpl.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.aegis.client;
import jakarta.xml.ws.Holder;
public class EchoImpl implements Echo {
public String echo(String text, Holder<String> textAgain) {
textAgain.value = text;
return text;
}
public String simpleEcho(String text) {
return text;
}
}
|
apache/directory-server | 1,081 | protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/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.
*
*/
/**
* Contains the implementation of LDAP binds
* with Simple and SASL authentication mechanisms.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
package org.apache.directory.server.ldap.handlers.sasl;
|
apache/directory-server | 1,086 | protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/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.
*
*/
/**
* Provides LDAP message handlers that implement
* {@link org.apache.mina.handler.demux.MessageHandler}.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
package org.apache.directory.server.ldap.handlers;
|
apache/dolphinscheduler | 1,079 | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/repository/IEnvironmentDao.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.dolphinscheduler.dao.repository;
import org.apache.dolphinscheduler.dao.entity.Environment;
import java.util.Optional;
public interface IEnvironmentDao extends IDao<Environment> {
Optional<Environment> queryByEnvironmentCode(Long environmentCode);
}
|
apache/drill | 1,103 | drill-yarn/src/main/java/org/apache/drill/yarn/appMaster/YarnFacadeException.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.drill.yarn.appMaster;
/**
* Exceptions thrown from the YARN facade: the wrapper around the YARN AM
* interfaces.
*/
@SuppressWarnings("serial")
public class YarnFacadeException extends Exception {
public YarnFacadeException(String msg, Exception e) {
super(msg, e);
}
} |
apache/drill | 1,114 | exec/java-exec/src/main/java/org/apache/drill/exec/coord/zk/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.
*/
/**
* Zookeeper/Curator integration code.
*
* Zookeeper is a cluster coordination service used by Drill to maintain cluster
* membership information. Curator is a library built on top of Zookeeper that
* handles some of the lower level details of using Zookeeper.
*/
package org.apache.drill.exec.coord.zk; |
apache/druid | 1,104 | processing/src/main/java/org/apache/druid/indexer/TaskMetricsGetter.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.indexer;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
public interface TaskMetricsGetter
{
@SuppressWarnings("unused")
List<String> getKeys();
@SuppressWarnings("unused")
@Nullable
Map<String, Number> getTotalMetrics();
}
|
apache/falcon | 1,107 | common/src/main/java/org/apache/falcon/workflow/util/OozieConstants.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.falcon.workflow.util;
/**
* Oozie Constants used across multiple modules.
*/
public final class OozieConstants {
/**
* Constant for the oozie running in local.
*/
public static final String LOCAL_OOZIE = "localoozie";
private OozieConstants() {
}
}
|
apache/felix-dev | 1,074 | scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_Map.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.felix.scr.integration.components.activatesignature;
import java.util.Map;
public class Signature_Package_Map extends AbstractActivateSignatureTestComponent
{
void activate(Map<?, ?> config)
{
setMethodCalled( config );
}
}
|
apache/fesod | 1,108 | fesod/src/test/java/org/apache/fesod/excel/head/NoHeadData.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.fesod.excel.head;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.fesod.excel.annotation.ExcelProperty;
/**
*
*/
@Getter
@Setter
@EqualsAndHashCode
public class NoHeadData {
@ExcelProperty("字符串")
private String string;
}
|
apache/fineract | 1,055 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanRefundPostBusinessEvent.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.fineract.test.messaging.event.loan.transaction;
public class LoanRefundPostBusinessEvent extends AbstractLoanTransactionEvent {
@Override
public String getEventName() {
return "LoanRefundPostBusinessEvent";
}
}
|
apache/fineract | 1,062 | fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformService.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.fineract.infrastructure.documentmanagement.service;
import org.apache.fineract.infrastructure.documentmanagement.data.FileData;
public interface ImageReadPlatformService {
FileData retrieveImage(String entityType, Long entityId);
}
|
apache/fineract | 1,078 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameData.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.fineract.infrastructure.jobs.service.jobname;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public class JobNameData {
private final String enumStyleName;
private final String humanReadableName;
}
|
apache/fineract | 1,083 | fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiConstants.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.fineract.portfolio.charge.api;
public final class ChargesApiConstants {
private ChargesApiConstants() {
}
public static final String glAccountIdParamName = "incomeAccountId";
public static final String taxGroupIdParamName = "taxGroupId";
}
|
apache/flink-connector-jdbc | 1,057 | flink-connector-jdbc-mysql/src/test/java/org/apache/flink/connector/jdbc/mysql/database/catalog/MySqlCatalogITCase.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.flink.connector.jdbc.mysql.database.catalog;
import org.apache.flink.connector.jdbc.mysql.MySqlTestBase;
/** E2E test for {@link MySqlCatalog}. */
class MySqlCatalogITCase extends MySqlCatalogTestBase implements MySqlTestBase {}
|
apache/flink-statefun | 1,057 | statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/StatefulFunctionsUniverseProvider.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.flink.statefun.flink.core;
import java.io.Serializable;
public interface StatefulFunctionsUniverseProvider extends Serializable {
StatefulFunctionsUniverse get(ClassLoader classLoader, StatefulFunctionsConfig configuration);
}
|
apache/flink | 1,078 | flink-end-to-end-tests/flink-end-to-end-tests-scala/src/main/java/org/apache/flink/tests/scala/NonPojo.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.flink.tests.scala;
/** Simple type that needs to go through Kryo for serialization. */
public class NonPojo {
private final int someInt = 34;
private final String someString = "hello";
public int getSomeInt() {
return someInt;
}
}
|
apache/fluss | 1,083 | fluss-filesystems/fluss-fs-s3/src/main/java/org/apache/fluss/fs/s3/token/S3ADelegationTokenReceiver.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.fluss.fs.s3.token;
/** Security token receiver for S3 filesystem, registered for the <tt>s3a://</tt> scheme. */
public class S3ADelegationTokenReceiver extends S3DelegationTokenReceiver {
@Override
public String scheme() {
return "s3a";
}
}
|
apache/geaflow | 1,072 | geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/model/RemoteFileSearch.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.geaflow.console.common.dal.model;
import lombok.Getter;
import lombok.Setter;
import org.apache.geaflow.console.common.util.type.GeaflowFileType;
@Getter
@Setter
public class RemoteFileSearch extends NameSearch {
GeaflowFileType type;
}
|
apache/geaflow | 1,079 | geaflow/geaflow-memory/src/main/java/org/apache/geaflow/memory/exception/GeaflowOutOfMemoryException.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.geaflow.memory.exception;
public final class GeaflowOutOfMemoryException extends OutOfMemoryError {
private static final long serialVersionUID = 4228264016184011555L;
public GeaflowOutOfMemoryException(String s) {
super(s);
}
}
|
apache/geaflow | 1,082 | geaflow/geaflow-core/geaflow-api/src/main/java/org/apache/geaflow/api/function/io/SinkFunction.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.geaflow.api.function.io;
import org.apache.geaflow.api.function.Function;
@FunctionalInterface
public interface SinkFunction<T> extends Function {
/**
* The write method for Outputting data t.
*/
void write(T t) throws Exception;
}
|
apache/groovy | 1,107 | src/test/groovy/org/codehaus/groovy/tools/stubgenerator/Groovy5859Support.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.codehaus.groovy.tools.stubgenerator;
import java.util.Map;
import java.util.SortedMap;
public class Groovy5859Support<K,V> {
public Groovy5859Support(SortedMap<? extends K, ? extends V> map) {}
public void putAll(final Map<? extends K, ? extends V> m) {
}
}
|
apache/hadoop-common | 1,082 | hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/service/Groups.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.hadoop.lib.service;
import org.apache.hadoop.classification.InterfaceAudience;
import java.io.IOException;
import java.util.List;
@InterfaceAudience.Private
public interface Groups {
public List<String> getGroups(String user) throws IOException;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.